Module Name: src
Committed By: jruoho
Date: Mon May 9 11:05:36 UTC 2011
Modified Files:
src/tests/lib/libc/gen: t_closefrom.c
Log Message:
On a second thought, require that close(2) fails for a descriptor already
closed with closefrom(3). For some odd reason (yet to be determined), this
check fails on 5.99.51 (amd64).
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_closefrom.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/gen/t_closefrom.c
diff -u src/tests/lib/libc/gen/t_closefrom.c:1.2 src/tests/lib/libc/gen/t_closefrom.c:1.3
--- src/tests/lib/libc/gen/t_closefrom.c:1.2 Mon May 9 10:50:02 2011
+++ src/tests/lib/libc/gen/t_closefrom.c Mon May 9 11:05:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_closefrom.c,v 1.2 2011/05/09 10:50:02 jruoho Exp $ */
+/* $NetBSD: t_closefrom.c,v 1.3 2011/05/09 11:05:36 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_closefrom.c,v 1.2 2011/05/09 10:50:02 jruoho Exp $");
+__RCSID("$NetBSD: t_closefrom.c,v 1.3 2011/05/09 11:05:36 jruoho Exp $");
#include <atf-c.h>
#include <errno.h>
@@ -61,6 +61,8 @@
ATF_REQUIRE(cur2 >= 0);
ATF_REQUIRE(cur1 - 1 == cur2);
+
+ ATF_REQUIRE(close(fd) == -1);
ATF_REQUIRE(unlink(path) == 0);
}