]> Savannah Git Hosting - gnulib.git/commitdiff
access tests: Fix test failure on native Windows.
authorBruno Haible <bruno@clisp.org>
Mon, 30 Nov 2020 22:32:36 +0000 (23:32 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 30 Nov 2020 22:32:36 +0000 (23:32 +0100)
* tests/test-access.c (main): Change permissions of f2 file before
attempting to remove it.

ChangeLog
tests/test-access.c

index 85bc48ff260a86db979b21dfbf0008f3bc118385..b08614eb261ad00765439e87f3eef1e41e63967d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-11-30  Bruno Haible  <bruno@clisp.org>
+
+       access tests: Fix test failure on native Windows.
+       * tests/test-access.c (main): Change permissions of f2 file before
+       attempting to remove it.
+
 2020-11-30  Paul Eggert  <eggert@cs.ucla.edu>
 
        faccessat: link with $(LIB_EACCESS)
index 76d1455b54fe9bedded4a787856b7fee7eec1b14..1c23892ad3a6d97a64827e00649120d7249e30c4 100644 (file)
@@ -40,6 +40,7 @@ main ()
   /* Remove anything from prior partial run.  */
   unlink (BASE "f");
   unlink (BASE "f1");
+  chmod (BASE "f2", 0600);
   unlink (BASE "f2");
 
   {
@@ -86,8 +87,9 @@ main ()
   }
 
   /* Cleanup.  */
-  unlink (BASE "f1");
-  unlink (BASE "f2");
+  ASSERT (unlink (BASE "f1") == 0);
+  ASSERT (chmod (BASE "f2", 0600) == 0);
+  ASSERT (unlink (BASE "f2") == 0);
 
   return 0;
 }