Mercurial > hg > octave-lojdl > gnulib-hg
changeset 12071:8ae42b7a9fe9
test-linkat: make test more robust
* tests/test-linkat.c (main): Avoid collision with EEXIST.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Thu, 24 Sep 2009 16:49:49 -0600 |
parents | f098f1865179 |
children | 7ea9796cd1d7 |
files | ChangeLog tests/test-linkat.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-09-24 Eric Blake <ebb9@byu.net> + 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.
--- a/tests/test-linkat.c +++ b/tests/test-linkat.c @@ -302,6 +302,7 @@ 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 @@ ASSERT (unlink (BASE "link3") == 0); ASSERT (unlink (BASE "link4") == 0); ASSERT (unlink (BASE "link5") == 0); - ASSERT (unlink (BASE "file") == 0); free (cwd); return result; }