guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 02/02: in ftw test, skip EACCESS test on MinGW


From: Mike Gran
Subject: [Guile-commits] 02/02: in ftw test, skip EACCESS test on MinGW
Date: Tue, 20 Sep 2022 23:24:21 -0400 (EDT)

mike121 pushed a commit to branch main
in repository guile.

commit 426ed4068afaf9d134a90f25b0f5c84f4fe7df77
Author: Mike Gran <spk121@yahoo.com>
AuthorDate: Tue Sep 20 19:33:55 2022 -0700

    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")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]