Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc Do close fd 4 in cerror_64 testcase too.



details:   https://anonhg.NetBSD.org/src/rev/adc1e0fd69e0
branches:  trunk
changeset: 760665:adc1e0fd69e0
user:      njoly <njoly%NetBSD.org@localhost>
date:      Mon Jan 10 16:54:02 2011 +0000

description:
Do close fd 4 in cerror_64 testcase too.

diffstat:

 tests/lib/libc/t_cerror.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r be433d78966f -r adc1e0fd69e0 tests/lib/libc/t_cerror.c
--- a/tests/lib/libc/t_cerror.c Mon Jan 10 16:43:29 2011 +0000
+++ b/tests/lib/libc/t_cerror.c Mon Jan 10 16:54:02 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cerror.c,v 1.1 2011/01/07 02:47:40 pgoyette Exp $ */
+/* $NetBSD: t_cerror.c,v 1.2 2011/01/10 16:54:02 njoly Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #include <sys/cdefs.h>
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_cerror.c,v 1.1 2011/01/07 02:47:40 pgoyette Exp $");
+__RCSID("$NetBSD: t_cerror.c,v 1.2 2011/01/10 16:54:02 njoly Exp $");
 
 #include <errno.h>
 #include <unistd.h>
@@ -97,6 +97,9 @@
 }
 ATF_TC_BODY(cerror_64, tc)
 {
+       /* Make sure file desc 4 is closed. */
+       (void)close(4);
+
        /* Check error and 64-bit return code.*/
        errno = 0;
        ATF_REQUIRE_EQ(lseek(4, (off_t) 0, SEEK_SET), (off_t) -1);



Home | Main Index | Thread Index | Old Index