X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-linkat.c;h=6d55f10374b17e449c0e5344a4ab9b08c9362f16;hb=dbf55f6694dbf710b44e3ae76a46fd8b8f993f7c;hp=40b837147c73defbc06cb44815b188c57161d11c;hpb=204966e4dadc046098cb5deea7031e307028ad7f;p=gnulib.git diff --git a/tests/test-linkat.c b/tests/test-linkat.c index 40b837147..6d55f1037 100644 --- a/tests/test-linkat.c +++ b/tests/test-linkat.c @@ -1,5 +1,5 @@ /* Tests of linkat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -102,6 +102,7 @@ main (void) ASSERT (errno == EBADF); } { + close (99); errno = 0; ASSERT (linkat (99, "foo", AT_FDCWD, "bar", 0) == -1); ASSERT (errno == EBADF); @@ -117,6 +118,7 @@ main (void) ASSERT (linkat (AT_FDCWD, BASE "oo", 99, "bar", 0) == -1); ASSERT (errno == EBADF); } + ASSERT (unlink (BASE "oo") == 0); /* Test basic link functionality, without mentioning symlinks. */ result = test_link (do_link, true);