Source-Changes-HG archive

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

[src/trunk]: src Move the ucontext(2) test to the right place.



details:   https://anonhg.NetBSD.org/src/rev/7567e93d2760
branches:  trunk
changeset: 770381:7567e93d2760
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sat Oct 15 06:54:52 2011 +0000

description:
Move the ucontext(2) test to the right place.

diffstat:

 distrib/sets/lists/tests/mi     |   8 ++-
 tests/kernel/Makefile           |   3 +-
 tests/kernel/t_ucontext.c       |  76 -----------------------------------------
 tests/lib/libc/sys/Makefile     |   3 +-
 tests/lib/libc/sys/t_ucontext.c |  76 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 84 insertions(+), 82 deletions(-)

diffs (237 lines):

diff -r d632c37be2de -r 7567e93d2760 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Sat Oct 15 06:50:52 2011 +0000
+++ b/distrib/sets/lists/tests/mi       Sat Oct 15 06:54:52 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.407 2011/10/15 06:50:52 jruoho Exp $
+# $NetBSD: mi,v 1.408 2011/10/15 06:54:53 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -333,7 +333,7 @@
 ./usr/libdata/debug/usr/tests/kernel/t_rnd.debug                       tests-kernel-tests      debug,atf
 ./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_ucontext.debug                  tests-obsolete          obsolete
 ./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
@@ -523,6 +523,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_stat.debug                        tests-lib-debug         debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_timer_create.debug                tests-lib-debug         debug,atf
 ./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_ucontext.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
@@ -1862,7 +1863,7 @@
 ./usr/tests/kernel/t_rnd                       tests-kernel-tests              atf
 ./usr/tests/kernel/t_sigaction                 tests-kernel-tests              atf
 ./usr/tests/kernel/t_time                      tests-obsolete                  obsolete
-./usr/tests/kernel/t_ucontext                  tests-kernel-tests              atf
+./usr/tests/kernel/t_ucontext                  tests-obsolete                  obsolete
 ./usr/tests/kernel/t_umount                    tests-kernel-tests              atf
 ./usr/tests/kernel/t_writev                    tests-obsolete                  obsolete
 ./usr/tests/kernel/tty                         tests-kernel-tests
@@ -2140,6 +2141,7 @@
 ./usr/tests/lib/libc/sys/t_stat                        tests-lib-tests         atf
 ./usr/tests/lib/libc/sys/t_timer_create                tests-lib-tests         atf
 ./usr/tests/lib/libc/sys/t_truncate            tests-lib-tests         atf
+./usr/tests/lib/libc/sys/t_ucontext            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
diff -r d632c37be2de -r 7567e93d2760 tests/kernel/Makefile
--- a/tests/kernel/Makefile     Sat Oct 15 06:50:52 2011 +0000
+++ b/tests/kernel/Makefile     Sat Oct 15 06:54:52 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2011/10/15 06:50:52 jruoho Exp $
+# $NetBSD: Makefile,v 1.20 2011/10/15 06:54:53 jruoho Exp $
 
 NOMAN=         # defined
 
@@ -12,7 +12,6 @@
 TESTS_C+=      t_lwpctl
 TESTS_C+=      t_pty
 TESTS_C+=      t_rnd
-TESTS_C+=      t_ucontext
 TESTS_C+=      t_extattrctl
 TESTS_C+=      t_sigaction
 TESTS_C+=      t_filedesc
diff -r d632c37be2de -r 7567e93d2760 tests/kernel/t_ucontext.c
--- a/tests/kernel/t_ucontext.c Sat Oct 15 06:50:52 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/* $NetBSD: t_ucontext.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */
-
-/*
- * Copyright (c) 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_ucontext.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
-
-#include <stdio.h>
-#include <ucontext.h>
-
-#include <atf-c.h>
-
-ATF_TC(ucontext);
-ATF_TC_HEAD(ucontext, tc)
-{
-       atf_tc_set_md_var(tc, "descr", "Checks {get,set}context(2)");
-}
-ATF_TC_BODY(ucontext, tc)
-{
-       ucontext_t u, v, w;
-       volatile int x, y;
-
-       x = 0;
-       y = 0;
-
-       printf("Start\n");
-
-       getcontext(&u);
-       y++;
-
-       printf("x == %d\n", x);
-
-       getcontext(&v);
-
-       if ( x < 20 ) {
-               x++;
-               getcontext(&w);
-               setcontext(&u);
-       }
-
-       printf("End, y = %d\n", y);
-       ATF_REQUIRE_EQ(y, 21);
-}
-
-ATF_TP_ADD_TCS(tp)
-{
-       ATF_TP_ADD_TC(tp, ucontext);
-
-       return atf_no_error();
-}
diff -r d632c37be2de -r 7567e93d2760 tests/lib/libc/sys/Makefile
--- a/tests/lib/libc/sys/Makefile       Sat Oct 15 06:50:52 2011 +0000
+++ b/tests/lib/libc/sys/Makefile       Sat Oct 15 06:54:52 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2011/10/15 06:50:52 jruoho Exp $
+# $NetBSD: Makefile,v 1.15 2011/10/15 06:54:52 jruoho Exp $
 
 MKMAN= no
 
@@ -44,6 +44,7 @@
 TESTS_C+=              t_stat
 TESTS_C+=              t_timer_create
 TESTS_C+=              t_truncate
+TESTS_C+=              t_ucontext
 TESTS_C+=              t_umask
 TESTS_C+=              t_unlink
 TESTS_C+=              t_write
diff -r d632c37be2de -r 7567e93d2760 tests/lib/libc/sys/t_ucontext.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libc/sys/t_ucontext.c   Sat Oct 15 06:54:52 2011 +0000
@@ -0,0 +1,76 @@
+/* $NetBSD: t_ucontext.c,v 1.1 2011/10/15 06:54:52 jruoho Exp $ */
+
+/*
+ * Copyright (c) 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_ucontext.c,v 1.1 2011/10/15 06:54:52 jruoho Exp $");
+
+#include <atf-c.h>
+#include <stdio.h>
+#include <ucontext.h>
+
+ATF_TC(ucontext_basic);
+ATF_TC_HEAD(ucontext_basic, tc)
+{
+       atf_tc_set_md_var(tc, "descr", "Checks {get,set}context(2)");
+}
+
+ATF_TC_BODY(ucontext_basic, tc)
+{
+       ucontext_t u, v, w;
+       volatile int x, y;
+
+       x = 0;
+       y = 0;
+
+       printf("Start\n");
+
+       getcontext(&u);
+       y++;
+
+       printf("x == %d\n", x);
+
+       getcontext(&v);
+
+       if ( x < 20 ) {
+               x++;
+               getcontext(&w);
+               setcontext(&u);
+       }
+
+       printf("End, y = %d\n", y);
+       ATF_REQUIRE_EQ(y, 21);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+       ATF_TP_ADD_TC(tp, ucontext_basic);
+
+       return atf_no_error();
+}



Home | Main Index | Thread Index | Old Index