]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: Avoid accidental matching of the vendor field of $host master
authorBruno Haible <bruno@clisp.org>
Fri, 10 Apr 2026 06:13:24 +0000 (08:13 +0200)
committerPádraig Brady <P@draigBrady.com>
Fri, 10 Apr 2026 10:09:10 +0000 (11:09 +0100)
* tests/chgrp/basic.sh: Test $host_os, not $host_triplet.
* tests/chown/separator.sh: Likewise.
* tests/rm/r-root.sh: Likewise.
* tests/tail/pipe-f.sh: Likewise.
* tests/tail/tail-c.sh: Likewise.
* tests/tee/tee.sh: Likewise.
* tests/touch/dangling-symlink.sh: Likewise.

tests/chgrp/basic.sh
tests/chown/separator.sh
tests/rm/r-root.sh
tests/tail/pipe-f.sh
tests/tail/tail-c.sh
tests/tee/tee.sh
tests/touch/dangling-symlink.sh

index a186a70cd68cf228678a4630d69a48054440065f..1d8715efea7d3bc21f6bd74f6e30f453bfb225e7 100755 (executable)
@@ -98,9 +98,9 @@ chgrp $g1 f
 chgrp '' f
 test "$(ls -C -c -t f g)" = 'f  g' || \
   {
 chgrp '' f
 test "$(ls -C -c -t f g)" = 'f  g' || \
   {
-    case $host_triplet in
-      *openbsd*) echo ignoring known OpenBSD-specific chgrp failure 1>&2 ;;
-      *darwin7.9.*|*darwin8.*)
+    case $host_os in
+      openbsd*) echo ignoring known OpenBSD-specific chgrp failure 1>&2 ;;
+      darwin7.9.*|darwin8.*)
         echo ignoring known MacOS X-specific chgrp failure 1>&2 ;;
       *) echo $host_triplet: no-change chgrp failed to update ctime 1>&2;
             fail=1 ;;
         echo ignoring known MacOS X-specific chgrp failure 1>&2 ;;
       *) echo $host_triplet: no-change chgrp failed to update ctime 1>&2;
             fail=1 ;;
index 617ca0fa5f08d41c5361cae31df24b51193cc40b..22e71d2745521736aeaf06ea5b277aec5395bc6c 100755 (executable)
@@ -40,8 +40,8 @@ test $(getent group | grep "^$id_gn:" | wc -l) = 1 ||
 # FreeBSD 6.x's getgrnam fails to look up a group name containing
 # a space. On such a system, skip this test if the group name contains
 # a byte not in the portable filename character set.
 # FreeBSD 6.x's getgrnam fails to look up a group name containing
 # a space. On such a system, skip this test if the group name contains
 # a byte not in the portable filename character set.
-case $host_triplet in
-  *-freebsd6.*)
+case $host_os in
+  freebsd6.*)
     case $id_gn in
       *[^a-zA-Z0-9._-]*) skip_ "invalid group name: $id_gn";;
     esac;;
     case $id_gn in
       *[^a-zA-Z0-9._-]*) skip_ "invalid group name: $id_gn";;
     esac;;
index 9954ac92614c104c8d919a7ff4633960dc032dc0..aaf063ddc29c9b1ed4dbc03beb913ee8817bea3f 100755 (executable)
@@ -41,8 +41,8 @@ unset CU_TEST_SKIP_EXIT
 USE_GDB=1
 
 if test $USE_GDB = 1; then
 USE_GDB=1
 
 if test $USE_GDB = 1; then
-  case $host_triplet in
-    *darwin*) skip_ 'avoiding due to potentially non functioning gdb' ;;
+  case $host_os in
+    darwin*) skip_ 'avoiding due to potentially non functioning gdb' ;;
     *) ;;
   esac
 
     *) ;;
   esac
 
index e5742c1fa1258121ae35706dd8544d481e013261..eeaa92b60a02f46c0a003609a64896430a3d86a7 100755 (executable)
@@ -41,8 +41,8 @@ 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.
 # 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' ;;
+case $host_os in
+  aix*) echo  'avoiding due to no way to detect closed outputs on AIX' ;;
   *)
 for disposition in '' '-'; do
   (trap "$disposition" PIPE;
   *)
 for disposition in '' '-'; do
   (trap "$disposition" PIPE;
index 56f97d79f6f06586aadd70eea7eac929d461d702..33058751f24f7f2258a1bc98c9059d9f3f3283fa 100755 (executable)
@@ -49,8 +49,8 @@ if test -r /dev/urandom; then
       # Solaris 11 allows negative seek but then gives EINVAL on read
       1) grep 'Invalid argument' err || fail=1;;
       *)
       # Solaris 11 allows negative seek but then gives EINVAL on read
       1) grep 'Invalid argument' err || fail=1;;
       *)
-        case $host_triplet in
-          *linux-gnu*)
+        case $host_os in
+          linux-gnu*)
             case "$(uname -r)" in
               [12].*) ;;  # Older Linux versions timeout
               *) fail=1 ;;
             case "$(uname -r)" in
               [12].*) ;;  # Older Linux versions timeout
               *) fail=1 ;;
index 81b6d902beb7b55abb10fed512f4c2d05351d954..eccfdb87555197ff7635d674c90b651b0de95821 100755 (executable)
@@ -68,8 +68,8 @@ if test -w /dev/full && test -c /dev/full; then
   test $(wc -l < err) = 1 || { cat err; fail=1; }
 fi
 
   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' ;;
+case $host_os 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; }
   *)
 # Test iopoll-powered early exit for closed pipes
 tee_exited() { sleep $1; test -f tee.exited; }
index 863cf4fc90843b2a55bb661103ddddb1c5a2fedc..e57e2641e6ec97974db085db221ba861265688f8 100755 (executable)
@@ -30,8 +30,8 @@ test -f touch-target || fail=1
 rm -f touch-target t-symlink
 
 if test $fail = 1; then
 rm -f touch-target t-symlink
 
 if test $fail = 1; then
-  case $host_triplet in
-    *linux-gnu*)
+  case $host_os in
+    linux-gnu*)
       case "$(uname -r)" in
         2.3.9[0-9]*)
           skip_ \
       case "$(uname -r)" in
         2.3.9[0-9]*)
           skip_ \