]> Savannah Git Hosting - gnulib.git/commitdiff
acl, file-has-acl tests: Strengthen tests on Cygwin.
authorBruno Haible <bruno@clisp.org>
Mon, 31 Mar 2025 09:30:12 +0000 (11:30 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 31 Mar 2025 09:30:12 +0000 (11:30 +0200)
Suggested by Corinna Vinschen in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00126.html>.

* 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.

ChangeLog
tests/test-copy-acl.sh
tests/test-file-has-acl.sh
tests/test-set-mode-acl.sh

index a611d62e87afbc4036c82634031351dd21b45008..de89f8eb99bd50141f9bfb950937260f0a606db2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-03-31  Bruno Haible  <bruno@clisp.org>
+
+       acl, file-has-acl tests: Strengthen tests on Cygwin.
+       Suggested by Corinna Vinschen in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00126.html>.
+       * 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  <bruno@clisp.org>
 
        file-has-acl: Update comments regarding Cygwin.
index 8efe202afb887f461fcaede21e05410de225731a..061755f1241db7ac6f7fc1543ddd4ea56c70d2a5 100755 (executable)
@@ -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.
+        # <https://learn.microsoft.com/en-us/windows/win32/secauthz/well-known-sids>).
+        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
 
index 1e791f3ae8cd3c8ea256dce920956357ee077f01..1ce388bbc084a8a0fd3a70438db39546422b9851 100755 (executable)
@@ -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.
+        # <https://learn.microsoft.com/en-us/windows/win32/secauthz/well-known-sids>).
+        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
 
index fa9771e034ebcc853fd4e50b1d9c3511b0a0142a..18eb72acf88844e1ea03a48c68da726bf7bbe2cf 100755 (executable)
@@ -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.
+            # <https://learn.microsoft.com/en-us/windows/win32/secauthz/well-known-sids>).
+            setfacl -m group:1:1 tmpfile0
             ;;
           hpux)
             orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`