]> Savannah Git Hosting - gnulib.git/commitdiff
test-faccessat.c: avoid test failure if prior partial run
authorPádraig Brady <P@draigBrady.com>
Mon, 11 Dec 2017 01:59:32 +0000 (17:59 -0800)
committerPádraig Brady <P@draigBrady.com>
Mon, 11 Dec 2017 01:59:32 +0000 (17:59 -0800)
* tests/test-faccessat.c: Remove the file if present
to ensure not present from a prior (partial) run.

tests/test-faccessat.c

index e880faee5835529179954f6087f73ecd0f7ccdfa..edf766bcf32d2f7a24d0d8009a9b4b28d362d6ed 100644 (file)
@@ -45,6 +45,7 @@ main (void)
   }
 
   /* Test behavior with trailing slash.  */
+  unlink (BASE "file");
   ASSERT (faccessat (AT_FDCWD, ".", X_OK, 0) == 0);
   ASSERT (faccessat (AT_FDCWD, "./", X_OK, 0) == 0);
   ASSERT (close (open (BASE "file", O_CREAT | O_WRONLY, 0)) == 0);