tests: correct racy sparse-to-pipe test

* tests/cp/sparse-to-pipe: Wait for backgrounded "cat" to complete
before comparing the results.
This commit is contained in:
Gilles Espinasse authored and Jim Meyering committed 2011-02-18 13:52:21 +01:00
1 parent 43066fe2ca
commit e6067bcb04
1 file changed
+4
+4
View File
@@ -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