From 426ed4068afaf9d134a90f25b0f5c84f4fe7df77 Mon Sep 17 00:00:00 2001 From: Mike Gran Date: Tue, 20 Sep 2022 19:33:55 -0700 Subject: in ftw test, skip EACCESS test on MinGW MinGW ACL-based permissions don't follow POSIX standard, so 'chmod' has unexpected behavior. * test-suite/tests/ftw.test (mingw?): new define ("file system fold: EACCES"): skip test on MinGW --- test-suite/tests/ftw.test | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test-suite/tests/ftw.test b/test-suite/tests/ftw.test index 454013a29..c35cba28b 100644 --- a/test-suite/tests/ftw.test +++ b/test-suite/tests/ftw.test @@ -23,6 +23,8 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26)) +(define mingw? + (string-contains %host-type "-mingw32")) ;; the procedure-source checks here ensure the vector indexes we write match ;; what ice-9/posix.scm stat:dev and stat:ino do (which in turn match @@ -238,9 +240,13 @@ (let ((name (string-append %top-builddir "/test-EACCES"))) (pass-if-equal "EACCES" `((error ,name ,EACCES)) - (if (and (defined? 'getuid) (zero? (getuid))) - ;; When run as root, this test would fail because root can - ;; list the contents of #o000 directories. + (if (or (and (defined? 'getuid) (zero? (getuid))) + ;; When run as root, this test would fail because root can + ;; list the contents of #o000 directories. + mingw? + ;; MinGW uses ACLs for directory control, which + ;; chmod doesn't emulate. + ) (throw 'unresolved) (with-file-tree %top-builddir '(directory "test-EACCES" #o000 (("a") ("b"))) -- cgit v1.2.1