From: Bruno Haible Date: Mon, 30 Nov 2020 22:32:36 +0000 (+0100) Subject: access tests: Fix test failure on native Windows. X-Git-Tag: v1.0~3445 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=0a24fb61d361911e9b194ffda17d5a2c358f0363;p=gnulib.git 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/ChangeLog b/ChangeLog index 85bc48ff26..b08614eb26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-11-30 Bruno Haible + + 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 faccessat: link with $(LIB_EACCESS) diff --git a/tests/test-access.c b/tests/test-access.c index 76d1455b54..1c23892ad3 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; }