On Cygwin 3.4.6 I see three test failures:
FAIL: test-file-has-acl.sh
==========================
setfacl: Invalid argument
file_has_acl("tmpfile0") returned yes, expected no
FAIL test-file-has-acl.sh (exit status: 1)
FAIL: test-file-has-acl-1.sh
============================
setfacl: Invalid argument
file_has_acl("tmpfile0") returned yes, expected no
FAIL test-file-has-acl-1.sh (exit status: 1)
FAIL: test-file-has-acl-2.sh
============================
setfacl: Invalid argument
file_has_acl("tmpfile0") returned yes, expected no
FAIL test-file-has-acl-2.sh (exit status: 1)
The reason is that the test script confuses Cygwin's setfacl with the Linux
setfacl, because Cygwin's setfacl now supports a --set-file option as well.
This patch fixes it.
2023-04-18 Bruno Haible <[email protected]>
file-has-acl tests: Avoid test failures on Cygwin 3.4.6.
* tests/test-file-has-acl.sh: Fix distinction between Linux setfacl and
Cygwin setfacl.
diff --git a/tests/test-file-has-acl.sh b/tests/test-file-has-acl.sh
index 9e723b89ba..8703b02e88 100755
--- a/tests/test-file-has-acl.sh
+++ b/tests/test-file-has-acl.sh
@@ -73,7 +73,7 @@ cd "$builddir" ||
# Linux, FreeBSD, Solaris, Cygwin.
if (setfacl --help >/dev/null) 2>/dev/null; then
# Linux, Cygwin.
- if (LC_ALL=C setfacl --help | grep ' --set-file' >/dev/null)
2>/dev/null; then
+ if (LC_ALL=C setfacl --help | grep ' --test' >/dev/null) 2>/dev/null;
then
# Linux.
acl_flavor=linux
else