]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: aix: avoid unsupported functionality
authorPádraig Brady <P@draigBrady.com>
Fri, 17 Mar 2023 19:57:18 +0000 (19:57 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 18 Mar 2023 11:44:24 +0000 (11:44 +0000)
* tests/misc/tee.sh: AIX doesn't support detecting
closed outputs either with poll() or select() so avoid
testing that functionality.
* tests/tail-2/pipe-f.sh: Likewise.

tests/misc/tee.sh
tests/tail-2/pipe-f.sh

index ce0cfd41d60f760f9430c3a861fa0f4af76b73c9..e01c27ecce14c41587cad84a6593422ef2e87aa3 100755 (executable)
@@ -63,6 +63,9 @@ if test -w /dev/full && test -c /dev/full; then
   test $(wc -l < err) = 1 || { cat err; fail=1; }
 fi
 
+case $host_triplet in
+  *aix*) echo  'avoiding due to no way to detect closed outputs on AIX' ;;
+  *)
 # Test iopoll-powered early exit for closed pipes
 tee_exited() { sleep $1; test -f tee.exited; }
 # Currently this functionality is most useful with
@@ -72,7 +75,8 @@ tee_exited() { sleep $1; test -f tee.exited; }
 retry_delay_ tee_exited .1 7 | # 12.7s (Must be > following timeout)
 { timeout 10 tee -p 2>err && touch tee.exited; } | :
 test $(wc -l < err) = 0 || { cat err; fail=1; }
-test -f tee.exited || fail=1
+test -f tee.exited || fail=1 ;;
+esac
 
 # Test with unwriteable files
 touch file.ro || framework_failure_
index 61812d1aa068b6051c8505ec7a724039d5ce0d73..46bcbbeaef25ef7b3b8f84c09822cb4d22a36953 100755 (executable)
@@ -41,6 +41,9 @@ compare exp out || fail=1
 # Also check tail exits if SIGPIPE is being ignored.
 # Note 'trap - SIGPIPE' is ineffective if the initiating shell
 # has ignored SIGPIPE, but that's not the normal case.
+case $host_triplet in
+  *aix*) echo  'avoiding due to no way to detect closed outputs on AIX' ;;
+  *)
 for disposition in '' '-'; do
   (trap "$disposition" PIPE;
    returns_ 124 timeout 10 \
@@ -49,7 +52,8 @@ for disposition in '' '-'; do
   test -e timed_out && fail=1
   compare exp out2 || fail=1
   rm -f timed_out
-done
+done ;;
+esac
 
 # This would wait indefinitely before v8.28 (until first write)
 # test -w /dev/stdout is used to check that >&- is effective