On native Windows, the first run of 'test-access.exe' succeeds, but the second and subsequent runs fail. The cause is a left-over file 'test-access.tf2' with mode 'r-xr-xr-x'.
The original mistake is that we did not check the success of one of the cleanup statements. This patch fixes it. 2020-11-30 Bruno Haible <br...@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. diff --git a/tests/test-access.c b/tests/test-access.c index 76d1455..1c23892 100644 --- a/tests/test-access.c +++ b/tests/test-access.c @@ -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; }