diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:13:50 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:13:50 +0300 |
commit | 71cd8e3a743046573744123777061b64881bf372 (patch) | |
tree | 82522befe647f4fff186a5630cad0cad33f8ef53 /tests/misc/md5sum-parallel.sh | |
parent | c18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff) | |
download | coreutils-upstream.tar.gz |
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'tests/misc/md5sum-parallel.sh')
-rwxr-xr-x | tests/misc/md5sum-parallel.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/misc/md5sum-parallel.sh b/tests/misc/md5sum-parallel.sh index 92f66296..2a526bdf 100755 --- a/tests/misc/md5sum-parallel.sh +++ b/tests/misc/md5sum-parallel.sh @@ -2,7 +2,7 @@ # Ensure that md5sum prints each checksum atomically # so that concurrent md5sums don't intersperse their output -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,13 +20,17 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ md5sum +xargs -P2 </dev/null >/dev/null 2>&1 \ + || skip_ 'xargs -P is required' + (mkdir tmp && cd tmp && seq 500 | xargs touch) # This will output at least 16KiB per process # and start 3 processes, with 2 running concurrently, # which triggers often on Fedora 11 at least. -(find tmp tmp tmp -type f | xargs -n500 -P2 md5sum) | +(find tmp tmp tmp -type f | xargs -n500 -P2 md5sum 2>err) | sed -n '/[0-9a-f]\{32\} /!p' | grep . > /dev/null && fail=1 +compare /dev/null err || fail=1 Exit $fail |