From: Bruno Haible Date: Mon, 31 Mar 2025 09:30:12 +0000 (+0200) Subject: acl, file-has-acl tests: Strengthen tests on Cygwin. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=69f8655960fad37fea768be925b0e28e0c687d02;p=gnulib.git acl, file-has-acl tests: Strengthen tests on Cygwin. Suggested by Corinna Vinschen in . * tests/test-set-mode-acl.sh: On Cygwin, use group 1 instead of the non-existent group 0. * tests/test-copy-acl.sh: Likewise. * tests/test-file-has-acl.sh: Likewise. --- diff --git a/ChangeLog b/ChangeLog index a611d62e87..de89f8eb99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2025-03-31 Bruno Haible + + acl, file-has-acl tests: Strengthen tests on Cygwin. + Suggested by Corinna Vinschen in + . + * tests/test-set-mode-acl.sh: On Cygwin, use group 1 instead of the + non-existent group 0. + * tests/test-copy-acl.sh: Likewise. + * tests/test-file-has-acl.sh: Likewise. + 2025-03-30 Bruno Haible file-has-acl: Update comments regarding Cygwin. diff --git a/tests/test-copy-acl.sh b/tests/test-copy-acl.sh index 8efe202afb..061755f124 100755 --- a/tests/test-copy-acl.sh +++ b/tests/test-copy-acl.sh @@ -310,7 +310,9 @@ cd "$builddir" || cygwin) # Set an ACL for a group. - setfacl -m group:0:1 tmpfile0 + # Group 1 in Cygwin corresponds to the DIALUP users (cf. + # ). + setfacl -m group:1:1 tmpfile0 func_test_copy tmpfile0 tmpfile2 @@ -320,7 +322,7 @@ cd "$builddir" || func_test_copy tmpfile0 tmpfile4 # Remove the ACL for the group. - setfacl -d group:0 tmpfile0 + setfacl -d group:1 tmpfile0 func_test_copy tmpfile0 tmpfile5 diff --git a/tests/test-file-has-acl.sh b/tests/test-file-has-acl.sh index 1e791f3ae8..1ce388bbc0 100755 --- a/tests/test-file-has-acl.sh +++ b/tests/test-file-has-acl.sh @@ -255,12 +255,14 @@ cd "$builddir" || cygwin) # Set an ACL for a group. - if setfacl -m group:0:1 tmpfile0; then + # Group 1 in Cygwin corresponds to the DIALUP users (cf. + # ). + if setfacl -m group:1:1 tmpfile0; then func_test_has_acl tmpfile0 yes # Remove the ACL for the group. - setfacl -d group:0 tmpfile0 + setfacl -d group:1 tmpfile0 func_test_has_acl tmpfile0 no diff --git a/tests/test-set-mode-acl.sh b/tests/test-set-mode-acl.sh index fa9771e034..18eb72acf8 100755 --- a/tests/test-set-mode-acl.sh +++ b/tests/test-set-mode-acl.sh @@ -183,7 +183,9 @@ cd "$builddir" || setfacl -m user:$auid:1 tmpfile0 ;; cygwin) - setfacl -m group:0:1 tmpfile0 + # Group 1 in Cygwin corresponds to the DIALUP users (cf. + # ). + setfacl -m group:1:1 tmpfile0 ;; hpux) orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`