From 0e0dd023066b7cd3b8355e153c9ef768e131dff7 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 11 Jan 2017 07:22:21 +0000 Subject: [PATCH] Partially revert r311236 There's no sense in trying to close a file descriptor from the negative cases with unlink_test; it's best to ignore these cases. The mkfifo case does make sense to keep though. MFC after: 3 days --- contrib/netbsd-tests/lib/libc/sys/t_unlink.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_unlink.c b/contrib/netbsd-tests/lib/libc/sys/t_unlink.c index e72974c7d13..b504bb06deb 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_unlink.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_unlink.c @@ -63,12 +63,7 @@ ATF_TC_BODY(unlink_basic, tc) ATF_REQUIRE(unlink(path) == 0); errno = 0; -#ifdef __FreeBSD__ - ATF_REQUIRE_ERRNO(ENOENT, (fd = open(path, O_RDONLY)) == -1); - (void)close(fd); -#else ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1); -#endif } } @@ -128,12 +123,7 @@ ATF_TC_BODY(unlink_fifo, tc) ATF_REQUIRE(unlink(path) == 0); errno = 0; -#ifdef __FreeBSD__ - ATF_REQUIRE_ERRNO(ENOENT, (fd = open(path, O_RDONLY)) == -1); - (void)close(fd); -#else ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1); -#endif } ATF_TC_CLEANUP(unlink_fifo, tc)