Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/gen On a second thought, require that close(2...



details:   https://anonhg.NetBSD.org/src/rev/b36348b5bad6
branches:  trunk
changeset: 764855:b36348b5bad6
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Mon May 09 11:05:36 2011 +0000

description:
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).

diffstat:

 tests/lib/libc/gen/t_closefrom.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 6693df0d6a36 -r b36348b5bad6 tests/lib/libc/gen/t_closefrom.c
--- a/tests/lib/libc/gen/t_closefrom.c  Mon May 09 10:50:02 2011 +0000
+++ b/tests/lib/libc/gen/t_closefrom.c  Mon May 09 11:05:36 2011 +0000
@@ -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);
 }
 



Home | Main Index | Thread Index | Old Index