From: Bruno Haible Date: Tue, 9 Sep 2025 10:37:03 +0000 (+0200) Subject: acl, file-has-acl, copy-file tests: Remove support for OSF/1. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd560c93554cee27664b2bba476c630ae03fe4f3;p=thirdparty%2Fgnulib.git acl, file-has-acl, copy-file tests: Remove support for OSF/1. * tests/test-file-has-acl.sh: Remove code for OSF/1 ACLs. * tests/test-set-mode-acl.sh: Likewise. * tests/test-copy-acl.sh: Likewise. * tests/test-copy-file.sh: Likewise. * tests/test-sameacls.c: Update comment. --- diff --git a/ChangeLog b/ChangeLog index 26fc6bb24c..382f66b9d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2025-09-09 Bruno Haible + + acl, file-has-acl, copy-file tests: Remove support for OSF/1. + * tests/test-file-has-acl.sh: Remove code for OSF/1 ACLs. + * tests/test-set-mode-acl.sh: Likewise. + * tests/test-copy-acl.sh: Likewise. + * tests/test-copy-file.sh: Likewise. + * tests/test-sameacls.c: Update comment. + 2025-09-08 Bruno Haible stdcountof-h: Add support for C++ compilers that lack _Countof. diff --git a/tests/test-copy-acl.sh b/tests/test-copy-acl.sh index 061755f124..19d6d7763c 100755 --- a/tests/test-copy-acl.sh +++ b/tests/test-copy-acl.sh @@ -65,7 +65,7 @@ cd "$builddir" || # Classification of the platform according to the programs available for # manipulating ACLs. # Possible values are: - # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none. + # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, aix, macosx, irix, none. # TODO: Support also native Windows platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then @@ -102,14 +102,8 @@ cd "$builddir" || fi else if (getacl tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64, NonStop Kernel. - if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64. - acl_flavor=osf1 - else - # NonStop Kernel. - acl_flavor=nsk - fi + # NonStop Kernel. + acl_flavor=nsk else if (aclget tmpfile0 >/dev/null) 2>/dev/null; then # AIX. @@ -162,7 +156,7 @@ cd "$builddir" || } } ;; - osf1 | nsk) + nsk) func_test_same_acls () { getacl "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1 @@ -448,57 +442,6 @@ cd "$builddir" || ;; - osf1) - - # Set an ACL for a user. - setacl -u user:$auid:1 tmpfile0 - - func_test_copy tmpfile0 tmpfile2 - - # Set an ACL for a group. - setacl -u group:$agid:4 tmpfile0 - - func_test_copy tmpfile0 tmpfile3 - - # Set an ACL for other. - setacl -u other::4 tmpfile0 - - func_test_copy tmpfile0 tmpfile4 - - # Remove the ACL for the user. - setacl -x user:$auid:1 tmpfile0 - - func_test_copy tmpfile0 tmpfile5 - - if false; then # would give an error "can't set ACL: Invalid argument" - # Remove the ACL for other. - setacl -x other::4 tmpfile0 - - func_test_copy tmpfile0 tmpfile6 - fi - - # Remove the ACL for the group. - setacl -x group:$agid:4 tmpfile0 - - func_test_copy tmpfile0 tmpfile7 - - # Delete all optional ACLs. - setacl -u user:$auid:1 tmpfile0 - setacl -b tmpfile0 - - func_test_copy tmpfile0 tmpfile8 - - # Copy ACLs from a file that has no ACLs. - echo > tmpfile9 - chmod a+x tmpfile9 - getacl tmpfile9 > tmpaclout0 - setacl -b -U tmpaclout0 tmpfile0 - rm -f tmpfile9 - - func_test_copy tmpfile0 tmpfile9 - - ;; - nsk) # Set an ACL for a user. diff --git a/tests/test-copy-file.sh b/tests/test-copy-file.sh index 9cd9e2093d..1283af7790 100755 --- a/tests/test-copy-file.sh +++ b/tests/test-copy-file.sh @@ -59,7 +59,7 @@ cd "$builddir" || # Classification of the platform according to the programs available for # manipulating ACLs. # Possible values are: - # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none. + # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, aix, macosx, irix, none. # TODO: Support also native Windows platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then @@ -96,14 +96,8 @@ cd "$builddir" || fi else if (getacl tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64, NonStop Kernel. - if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64. - acl_flavor=osf1 - else - # NonStop Kernel. - acl_flavor=nsk - fi + # NonStop Kernel. + acl_flavor=nsk else if (aclget tmpfile0 >/dev/null) 2>/dev/null; then # AIX. @@ -156,7 +150,7 @@ cd "$builddir" || } } ;; - osf1 | nsk) + nsk) func_test_same_acls () { getacl "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1 @@ -440,57 +434,6 @@ cd "$builddir" || ;; - osf1) - - # Set an ACL for a user. - setacl -u user:$auid:1 tmpfile0 - - func_test_copy tmpfile0 tmpfile2 - - # Set an ACL for a group. - setacl -u group:$agid:4 tmpfile0 - - func_test_copy tmpfile0 tmpfile3 - - # Set an ACL for other. - setacl -u other::4 tmpfile0 - - func_test_copy tmpfile0 tmpfile4 - - # Remove the ACL for the user. - setacl -x user:$auid:1 tmpfile0 - - func_test_copy tmpfile0 tmpfile5 - - if false; then # would give an error "can't set ACL: Invalid argument" - # Remove the ACL for other. - setacl -x other::4 tmpfile0 - - func_test_copy tmpfile0 tmpfile6 - fi - - # Remove the ACL for the group. - setacl -x group:$agid:4 tmpfile0 - - func_test_copy tmpfile0 tmpfile7 - - # Delete all optional ACLs. - setacl -u user:$auid:1 tmpfile0 - setacl -b tmpfile0 - - func_test_copy tmpfile0 tmpfile8 - - # Copy ACLs from a file that has no ACLs. - echo > tmpfile9 - chmod a+x tmpfile9 - getacl tmpfile9 > tmpaclout0 - setacl -b -U tmpaclout0 tmpfile0 - rm -f tmpfile9 - - func_test_copy tmpfile0 tmpfile9 - - ;; - nsk) # Set an ACL for a user. diff --git a/tests/test-file-has-acl.sh b/tests/test-file-has-acl.sh index 1ce388bbc0..76391ee6c7 100755 --- a/tests/test-file-has-acl.sh +++ b/tests/test-file-has-acl.sh @@ -65,7 +65,7 @@ cd "$builddir" || # Classification of the platform according to the programs available for # manipulating ACLs. # Possible values are: - # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none. + # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, aix, macosx, irix, none. # TODO: Support also native Windows platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then @@ -102,14 +102,8 @@ cd "$builddir" || fi else if (getacl tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64, NonStop Kernel. - if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64. - acl_flavor=osf1 - else - # NonStop Kernel. - acl_flavor=nsk - fi + # NonStop Kernel. + acl_flavor=nsk else if (aclget tmpfile0 >/dev/null) 2>/dev/null; then # AIX. @@ -299,26 +293,6 @@ cd "$builddir" || fi ;; - osf1) - - # Set an ACL for a user. - setacl -u user:$auid:1 tmpfile0 2> tmp.err - cat tmp.err 1>&2 - if grep 'Error:' tmp.err > /dev/null \ - || grep 'Operation not supported' tmp.err > /dev/null; then - : - else - - func_test_has_acl tmpfile0 yes - - # Remove the ACL for the user. - setacl -x user:$auid:1 tmpfile0 - - func_test_has_acl tmpfile0 no - - fi - ;; - nsk) # Set an ACL for a user. diff --git a/tests/test-sameacls.c b/tests/test-sameacls.c index 05dca507e9..688a267e43 100644 --- a/tests/test-sameacls.c +++ b/tests/test-sameacls.c @@ -115,7 +115,7 @@ main (int argc, char *argv[]) } } { -#if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */ +#if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX */ static const int types[] = { ACL_TYPE_ACCESS diff --git a/tests/test-set-mode-acl.sh b/tests/test-set-mode-acl.sh index 18eb72acf8..6d103fb9a3 100755 --- a/tests/test-set-mode-acl.sh +++ b/tests/test-set-mode-acl.sh @@ -65,7 +65,7 @@ cd "$builddir" || # Classification of the platform according to the programs available for # manipulating ACLs. # Possible values are: - # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none. + # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, aix, macosx, irix, none. # TODO: Support also native Windows platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then @@ -102,14 +102,8 @@ cd "$builddir" || fi else if (getacl tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64, NonStop Kernel. - if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64. - acl_flavor=osf1 - else - # NonStop Kernel. - acl_flavor=nsk - fi + # NonStop Kernel. + acl_flavor=nsk else if (aclget tmpfile0 >/dev/null) 2>/dev/null; then # AIX. @@ -196,9 +190,6 @@ cd "$builddir" || chacl -r "${orig}($auid.%,--x)" tmpfile0 \ || setacl -m user:$auid:1 tmpfile0 ;; - osf1) - setacl -u user:$auid:1 tmpfile0 - ;; nsk) setacl -m user:$auid:1 tmpfile0 ;;