Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Move the writev(2) test to the right place.
details: https://anonhg.NetBSD.org/src/rev/d632c37be2de
branches: trunk
changeset: 770380:d632c37be2de
user: jruoho <jruoho%NetBSD.org@localhost>
date: Sat Oct 15 06:50:52 2011 +0000
description:
Move the writev(2) test to the right place.
diffstat:
distrib/sets/lists/tests/mi | 8 +++-
tests/kernel/Makefile | 3 +-
tests/kernel/t_writev.c | 70 --------------------------------------------
tests/lib/libc/sys/Makefile | 3 +-
tests/lib/libc/sys/t_write.c | 70 ++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 78 insertions(+), 76 deletions(-)
diffs (225 lines):
diff -r 8cce2122f131 -r d632c37be2de distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Sat Oct 15 06:42:16 2011 +0000
+++ b/distrib/sets/lists/tests/mi Sat Oct 15 06:50:52 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.406 2011/10/15 06:42:17 jruoho Exp $
+# $NetBSD: mi,v 1.407 2011/10/15 06:50:52 jruoho Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -334,7 +334,7 @@
./usr/libdata/debug/usr/tests/kernel/t_sigaction.debug tests-kernel-tests debug,atf
./usr/libdata/debug/usr/tests/kernel/t_time.debug tests-obsolete obsolete
./usr/libdata/debug/usr/tests/kernel/t_ucontext.debug tests-kernel-tests debug,atf
-./usr/libdata/debug/usr/tests/kernel/t_writev.debug tests-kernel-tests debug,atf
+./usr/libdata/debug/usr/tests/kernel/t_writev.debug tests-obsolete obsolete
./usr/libdata/debug/usr/tests/kernel/tty tests-kernel-tests
./usr/libdata/debug/usr/tests/kernel/tty/t_pr.debug tests-kernel-tests debug,atf
./usr/libdata/debug/usr/tests/lib tests-lib-debug
@@ -525,6 +525,7 @@
./usr/libdata/debug/usr/tests/lib/libc/sys/t_truncate.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/sys/t_umask.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/sys/t_unlink.debug tests-lib-debug debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_write.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/termios tests-lib-debug
./usr/libdata/debug/usr/tests/lib/libc/termios/t_tcsetpgrp.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/tls tests-lib-debug
@@ -1863,7 +1864,7 @@
./usr/tests/kernel/t_time tests-obsolete obsolete
./usr/tests/kernel/t_ucontext tests-kernel-tests atf
./usr/tests/kernel/t_umount tests-kernel-tests atf
-./usr/tests/kernel/t_writev tests-kernel-tests atf
+./usr/tests/kernel/t_writev tests-obsolete obsolete
./usr/tests/kernel/tty tests-kernel-tests
./usr/tests/kernel/tty/Atffile tests-kernel-tests atf
./usr/tests/kernel/tty/t_pr tests-kernel-tests atf
@@ -2141,6 +2142,7 @@
./usr/tests/lib/libc/sys/t_truncate tests-lib-tests atf
./usr/tests/lib/libc/sys/t_umask tests-lib-tests atf
./usr/tests/lib/libc/sys/t_unlink tests-lib-tests atf
+./usr/tests/lib/libc/sys/t_write tests-lib-tests atf
./usr/tests/lib/libc/termios tests-lib-tests
./usr/tests/lib/libc/termios/Atffile tests-lib-tests atf
./usr/tests/lib/libc/termios/t_tcsetpgrp tests-lib-tests atf
diff -r 8cce2122f131 -r d632c37be2de tests/kernel/Makefile
--- a/tests/kernel/Makefile Sat Oct 15 06:42:16 2011 +0000
+++ b/tests/kernel/Makefile Sat Oct 15 06:50:52 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2011/10/15 06:42:16 jruoho Exp $
+# $NetBSD: Makefile,v 1.19 2011/10/15 06:50:52 jruoho Exp $
NOMAN= # defined
@@ -13,7 +13,6 @@
TESTS_C+= t_pty
TESTS_C+= t_rnd
TESTS_C+= t_ucontext
-TESTS_C+= t_writev
TESTS_C+= t_extattrctl
TESTS_C+= t_sigaction
TESTS_C+= t_filedesc
diff -r 8cce2122f131 -r d632c37be2de tests/kernel/t_writev.c
--- a/tests/kernel/t_writev.c Sat Oct 15 06:42:16 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/* $NetBSD: t_writev.c,v 1.2 2011/06/11 18:03:17 christos Exp $ */
-
-/*-
- * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__COPYRIGHT("@(#) Copyright (c) 2008\
- The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_writev.c,v 1.2 2011/06/11 18:03:17 christos Exp $");
-
-#include <sys/uio.h>
-#include <sys/syslimits.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <atf-c.h>
-
-ATF_TC(writev);
-ATF_TC_HEAD(writev, tc)
-{
- atf_tc_set_md_var(tc, "timeout", "10");
- atf_tc_set_md_var(tc, "descr",
- "Checks that file descriptor is properly FILE_UNUSE()d "
- "when iovcnt is greater than IOV_MAX");
-}
-ATF_TC_BODY(writev, tc)
-{
- ssize_t retval;
-
- (void)printf("Calling writev(2, NULL, IOV_MAX + 1)...\n");
-
- errno = 0;
- retval = writev(2, NULL, IOV_MAX + 1);
-
- ATF_REQUIRE_EQ_MSG(retval, -1, "got: %zd", retval);
- ATF_REQUIRE_EQ_MSG(errno, EINVAL, "got: %s", strerror(errno));
-}
-
-ATF_TP_ADD_TCS(tp)
-{
- ATF_TP_ADD_TC(tp, writev);
-
- return atf_no_error();
-}
diff -r 8cce2122f131 -r d632c37be2de tests/lib/libc/sys/Makefile
--- a/tests/lib/libc/sys/Makefile Sat Oct 15 06:42:16 2011 +0000
+++ b/tests/lib/libc/sys/Makefile Sat Oct 15 06:50:52 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2011/10/15 06:42:16 jruoho Exp $
+# $NetBSD: Makefile,v 1.14 2011/10/15 06:50:52 jruoho Exp $
MKMAN= no
@@ -46,6 +46,7 @@
TESTS_C+= t_truncate
TESTS_C+= t_umask
TESTS_C+= t_unlink
+TESTS_C+= t_write
SRCS.t_mprotect= t_mprotect.c ${SRCS_EXEC_PROT}
diff -r 8cce2122f131 -r d632c37be2de tests/lib/libc/sys/t_write.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libc/sys/t_write.c Sat Oct 15 06:50:52 2011 +0000
@@ -0,0 +1,70 @@
+/* $NetBSD: t_write.c,v 1.1 2011/10/15 06:50:52 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__COPYRIGHT("@(#) Copyright (c) 2008\
+ The NetBSD Foundation, inc. All rights reserved.");
+__RCSID("$NetBSD: t_write.c,v 1.1 2011/10/15 06:50:52 jruoho Exp $");
+
+#include <sys/uio.h>
+#include <sys/syslimits.h>
+
+#include <atf-c.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+ATF_TC(writev_iovmax);
+ATF_TC_HEAD(writev_iovmax, tc)
+{
+ atf_tc_set_md_var(tc, "timeout", "10");
+ atf_tc_set_md_var(tc, "descr",
+ "Checks that file descriptor is properly FILE_UNUSE()d "
+ "when iovcnt is greater than IOV_MAX");
+}
+
+ATF_TC_BODY(writev_iovmax, tc)
+{
+ ssize_t retval;
+
+ (void)printf("Calling writev(2, NULL, IOV_MAX + 1)...\n");
+
+ errno = 0;
+ retval = writev(2, NULL, IOV_MAX + 1);
+
+ ATF_REQUIRE_EQ_MSG(retval, -1, "got: %zd", retval);
+ ATF_REQUIRE_EQ_MSG(errno, EINVAL, "got: %s", strerror(errno));
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ ATF_TP_ADD_TC(tp, writev_iovmax);
+
+ return atf_no_error();
+}
Home |
Main Index |
Thread Index |
Old Index