From: Gilles Espinasse Date: Fri, 18 Feb 2011 12:52:21 +0000 (+0100) Subject: tests: correct racy sparse-to-pipe test X-Git-Tag: v8.11~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6067bcb040f110238bd7cbf9f3781f2e149e0c0;p=thirdparty%2Fcoreutils.git tests: correct racy sparse-to-pipe test * tests/cp/sparse-to-pipe: Wait for backgrounded "cat" to complete before comparing the results. --- diff --git a/tests/cp/sparse-to-pipe b/tests/cp/sparse-to-pipe index 4d39458e70..9bbaafa0ea 100755 --- a/tests/cp/sparse-to-pipe +++ b/tests/cp/sparse-to-pipe @@ -26,6 +26,10 @@ timeout 10 cat pipe > copy & truncate -s1M sparse || framework_failure_ cp sparse pipe || fail=1 + +# Ensure that the cat has completed before comparing. +wait + cmp sparse copy || fail=1 Exit $fail