From 3150ec900c4b8f84978ca4fb80eb109ae0df875c Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Sat, 6 Jun 2015 14:17:14 +0100 Subject: tests: fix false failure in recent test adjustment * configure.ac: Comment on why we link rather than run the test, and remove the moot __ELF__ check since we never ran it anyway, and the new CFLAGS and LDFLAGS are a more direct test of support. * tests/misc/wc-parallel.sh: Fix a syntax error in the previous change. * tests/misc/md5sum-parallel.sh: Use better error checking, consistent with that used in wc-parallel.sh. --- tests/misc/md5sum-parallel.sh | 6 +++++- tests/misc/wc-parallel.sh | 5 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/misc/md5sum-parallel.sh b/tests/misc/md5sum-parallel.sh index 86f5af76f..2a526bdf2 100755 --- a/tests/misc/md5sum-parallel.sh +++ b/tests/misc/md5sum-parallel.sh @@ -20,13 +20,17 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ md5sum +xargs -P2 /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 diff --git a/tests/misc/wc-parallel.sh b/tests/misc/wc-parallel.sh index 98c36b9fa..19497e047 100755 --- a/tests/misc/wc-parallel.sh +++ b/tests/misc/wc-parallel.sh @@ -20,9 +20,8 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ wc -if xargs -P2 /dev/null 2>&1 - skip_ 'xargs -P is required' -fi +xargs -P2 /dev/null 2>&1 \ + || skip_ 'xargs -P is required' (mkdir tmp && cd tmp && seq 2000 | xargs touch) -- cgit v1.2.3-70-g09d2