]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: sync: also test that -d and -f don't block on a FIFO
authorCollin Funk <collin.funk1@gmail.com>
Sun, 18 Jan 2026 21:58:27 +0000 (13:58 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Mon, 19 Jan 2026 19:07:28 +0000 (11:07 -0800)
* tests/misc/sync.sh: Check 'sync fifo' with no arguments, -d, and -f
separately. Only perform the check for -f if RUN_EXPENSIVE_TESTS=yes
since it may be expensive.

tests/misc/sync.sh

index b3785e0f34981898bfbb018250643a7199b4388e..dcf12e55edef9aa0d17966adcef55a9984b13a35 100755 (executable)
@@ -52,7 +52,10 @@ fi
 if test "$fail" != '1'; then
   # Ensure a fifo doesn't block
   mkfifo_or_skip_ fifo
-  returns_ 124 timeout 10 sync fifo && fail=1
+  for opt in '' '-f' '-d'; do
+    test "$opt" = '-f' && test "$RUN_EXPENSIVE_TESTS" != yes && continue
+    returns_ 124 timeout 10 sync $opt fifo && fail=1
+  done
 fi
 
 Exit $fail