diff --git a/tests/Watchfd_-_Single_descriptor.test b/tests/Watchfd_-_Single_descriptor.test index 7ba8dcd..c5362b3 100755 --- a/tests/Watchfd_-_Single_descriptor.test +++ b/tests/Watchfd_-_Single_descriptor.test @@ -3,7 +3,7 @@ # Check that watching a single file descriptor works as expected. # Dummy assignments for "shellcheck". -testSubject="${testSubject:-false}"; workFile1="${workFile1:-.tmp1}"; workFile2="${workFile1:-.tmp2}" +testSubject="${testSubject:-false}"; workFile1="${workFile1:-.tmp1}"; workFile2="${workFile2:-.tmp2}" # Skip the test if "-d" is not available. if ! "${testSubject}" -h | grep -Fq ' -d'; then @@ -18,6 +18,7 @@ seq 1 100 > "${workFile1}" (export line; sleep 1; read -r line; sleep 1; read -r line; sleep 1) <"${workFile1}" & pid=$! +sleep 0.1 "${testSubject}" -d "${pid}:0" -f -i 0.5 >/dev/null 2>"${workFile2}" # There should be at least 2 different numbers starting the output lines.