diff --git a/tests/cp/existing-perm-race.sh b/tests/cp/existing-perm-race.sh index d45a5a368..2a5a9215f 100755 --- a/tests/cp/existing-perm-race.sh +++ b/tests/cp/existing-perm-race.sh @@ -44,7 +44,7 @@ cleanup_() { kill $pid 2>/dev/null && wait $pid; } # Copy a fifo's contents. That way, we can examine the # destination permissions before they're finalized. -cp -p --copy-contents fifo fifo-copy & pid=$! +timeout 60 cp -p --copy-contents fifo fifo-copy & pid=$! ( # Now 'cp' is reading the fifo. Wait for the destination file to diff --git a/tests/cp/file-perm-race.sh b/tests/cp/file-perm-race.sh index 2b4d1eb4b..5c34e5b4a 100755 --- a/tests/cp/file-perm-race.sh +++ b/tests/cp/file-perm-race.sh @@ -30,7 +30,7 @@ cleanup_() { kill $pid 2>/dev/null && wait $pid; } # Copy a fifo's contents. That way, we can examine the # destination permissions before they're finalized. -cp -p --copy-contents fifo fifo-copy & pid=$! +timeout 60 cp -p --copy-contents fifo fifo-copy & pid=$! ( # Now 'cp' is reading the fifo. Wait for the destination file to