mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
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:
1 parent
43066fe2ca
commit
e6067bcb04
1 file changed
+4
@@ -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
|
||||
Reference in new issue
Block a user