From 772a85a912a2bd5a25406d9f24a587269ea3b709 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 24 Sep 2009 16:49:49 -0600 Subject: [PATCH] test-linkat: make test more robust * tests/test-linkat.c (main): Avoid collision with EEXIST. Signed-off-by: Eric Blake --- ChangeLog | 3 +++ tests/test-linkat.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 35f84c42e..76978025e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-09-24 Eric Blake + test-linkat: make test more robust + * tests/test-linkat.c (main): Avoid collision with EEXIST. + getopt: fix inclusion guards for cygwin * modules/getopt-posix (Depends-on): Add include-next. (Makefile.am): Substitute more items in replacement header. diff --git a/tests/test-linkat.c b/tests/test-linkat.c index afb179941..f5c4c7761 100644 --- a/tests/test-linkat.c +++ b/tests/test-linkat.c @@ -302,6 +302,7 @@ main () errno = 0; ASSERT (areadlink (BASE "file") == NULL); ASSERT (errno == EINVAL); + ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link5") == 0); ASSERT (symlink (BASE "link3", BASE "link5") == 0); errno = 0; @@ -346,7 +347,6 @@ main () ASSERT (unlink (BASE "link3") == 0); ASSERT (unlink (BASE "link4") == 0); ASSERT (unlink (BASE "link5") == 0); - ASSERT (unlink (BASE "file") == 0); free (cwd); return result; } -- 2.11.0