Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Follow the real tree with the test directory structure.
details: https://anonhg.NetBSD.org/src/rev/d3d5e0de1c8c
branches: trunk
changeset: 764796:d3d5e0de1c8c
user: jruoho <jruoho%NetBSD.org@localhost>
date: Thu May 05 05:24:44 2011 +0000
description:
Follow the real tree with the test directory structure.
diffstat:
distrib/sets/lists/tests/mi | 8 +-
tests/include/Makefile | 3 +-
tests/include/sys/Makefile | 4 +-
tests/include/sys/t_types.c | 149 ++++++++++++++++++++++++++++++++++++++++++++
tests/include/t_types.c | 149 --------------------------------------------
5 files changed, 157 insertions(+), 156 deletions(-)
diffs (truncated from 383 to 300 lines):
diff -r b619e4bae154 -r d3d5e0de1c8c distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Thu May 05 04:38:20 2011 +0000
+++ b/distrib/sets/lists/tests/mi Thu May 05 05:24:44 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.326 2011/05/03 15:13:51 jruoho Exp $
+# $NetBSD: mi,v 1.327 2011/05/05 05:24:45 jruoho Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -283,6 +283,7 @@
./usr/libdata/debug/usr/tests/include/sys tests-ipf-tests
./usr/libdata/debug/usr/tests/include/sys/t_bitops.debug tests-ipf-tests debug,atf
./usr/libdata/debug/usr/tests/include/sys/t_bootblock.debug tests-ipf-tests debug,atf
+./usr/libdata/debug/usr/tests/include/sys/t_types.debug tests-ipf-tests debug,atf
./usr/libdata/debug/usr/tests/include/t_bitstring.debug tests-ipf-tests debug,atf
./usr/libdata/debug/usr/tests/include/t_bswap.debug tests-ipf-tests debug,atf
./usr/libdata/debug/usr/tests/include/t_errno.debug tests-ipf-tests debug,atf
@@ -292,7 +293,7 @@
./usr/libdata/debug/usr/tests/include/t_netdb.debug tests-ipf-tests debug,atf
./usr/libdata/debug/usr/tests/include/t_paths.debug tests-ipf-tests debug,atf
./usr/libdata/debug/usr/tests/include/t_stdint.debug tests-ipf-tests debug,atf
-./usr/libdata/debug/usr/tests/include/t_types.debug tests-ipf-tests debug,atf
+./usr/libdata/debug/usr/tests/include/t_types.debug tests-obsolete obsolete
./usr/libdata/debug/usr/tests/ipf tests-ipf-tests
./usr/libdata/debug/usr/tests/kernel tests-kernel-tests
./usr/libdata/debug/usr/tests/kernel/h_ps_strings1.debug tests-kernel-tests debug,atf
@@ -1384,6 +1385,7 @@
./usr/tests/include/sys/Atffile tests-include-tests atf
./usr/tests/include/sys/t_bitops tests-include-tests atf
./usr/tests/include/sys/t_bootblock tests-include-tests atf
+./usr/tests/include/sys/t_types tests-include-tests atf
./usr/tests/include/t_bitstring tests-include-tests atf
./usr/tests/include/t_bswap tests-include-tests atf
./usr/tests/include/t_errno tests-include-tests atf
@@ -1393,7 +1395,7 @@
./usr/tests/include/t_netdb tests-include-tests atf
./usr/tests/include/t_paths tests-include-tests atf
./usr/tests/include/t_stdint tests-include-tests atf
-./usr/tests/include/t_types tests-include-tests atf
+./usr/tests/include/t_types tests-obsolete obsolete
./usr/tests/ipf tests-ipf-tests
./usr/tests/ipf/Atffile tests-ipf-tests
./usr/tests/ipf/expected tests-ipf-tests
diff -r b619e4bae154 -r d3d5e0de1c8c tests/include/Makefile
--- a/tests/include/Makefile Thu May 05 04:38:20 2011 +0000
+++ b/tests/include/Makefile Thu May 05 05:24:44 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2011/05/03 04:50:31 jruoho Exp $
+# $NetBSD: Makefile,v 1.8 2011/05/05 05:24:44 jruoho Exp $
NOMAN= # defined
@@ -16,7 +16,6 @@
TESTS_C+= t_netdb
TESTS_C+= t_paths
TESTS_C+= t_stdint
-TESTS_C+= t_types
FILESDIR= ${TESTSDIR}
FILES= d_bitstring_27.out
diff -r b619e4bae154 -r d3d5e0de1c8c tests/include/sys/Makefile
--- a/tests/include/sys/Makefile Thu May 05 04:38:20 2011 +0000
+++ b/tests/include/sys/Makefile Thu May 05 05:24:44 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2011/03/19 06:39:17 jruoho Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/05 05:24:45 jruoho Exp $
NOMAN= # defined
@@ -7,6 +7,6 @@
TESTSDIR= ${TESTSBASE}/include/sys
LDADD.t_bitops+= -lm
-TESTS_C= t_bitops t_bootblock
+TESTS_C= t_bitops t_bootblock t_types
.include <bsd.test.mk>
diff -r b619e4bae154 -r d3d5e0de1c8c tests/include/sys/t_types.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/include/sys/t_types.c Thu May 05 05:24:44 2011 +0000
@@ -0,0 +1,149 @@
+/* $NetBSD: t_types.c,v 1.1 2011/05/05 05:24:45 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jukka Ruohonen.
+ *
+ * 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>
+__RCSID("$NetBSD: t_types.c,v 1.1 2011/05/05 05:24:45 jruoho Exp $");
+
+#include <sys/types.h>
+
+#include <atf-c.h>
+#include <limits.h>
+#include <stdint.h>
+
+#include <stdio.h>
+
+ATF_TC(types_limits);
+ATF_TC_HEAD(types_limits, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Known limits for types(3)");
+}
+
+ATF_TC_BODY(types_limits, tc)
+{
+ useconds_t usec;
+ ssize_t size;
+
+ /*
+ * IEEE Std 1003.1-2008:
+ *
+ * "The type ssize_t shall be capable of storing
+ * values at least in the range [-1, {SSIZE_MAX}]."
+ *
+ */
+ size = SSIZE_MAX;
+ ATF_REQUIRE(size > 0);
+
+ size = size + 1;
+ ATF_REQUIRE(size < 0);
+
+ /*
+ * IEEE Std 1003.1-2008:
+ *
+ * "The type suseconds_t shall be a signed integer type capable
+ * of storing values at least in the range [-1, 1000000]."
+ */
+ usec = 1000000;
+ ATF_REQUIRE(usec > 0);
+}
+
+ATF_TC(types_signed);
+ATF_TC_HEAD(types_signed, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Signed types(3)");
+}
+
+ATF_TC_BODY(types_signed, tc)
+{
+ blkcnt_t bc;
+ blksize_t bs;
+ ssize_t size;
+ off_t off;
+ pid_t pid;
+
+ /*
+ * As noted in types(3), the following
+ * types should be signed integers.
+ */
+ atf_tc_expect_fail("PR standards/44847");
+
+ bc = 0;
+ bs = 0;
+ off = 0;
+ pid = 0;
+ size = 0;
+
+ ATF_REQUIRE((bc - 1) <= 0);
+ ATF_REQUIRE((bs - 1) <= 0);
+ ATF_REQUIRE((off - 1) <= 0);
+ ATF_REQUIRE((pid - 1) <= 0);
+ ATF_REQUIRE((size - 1) <= 0);
+}
+
+ATF_TC(types_unsigned);
+ATF_TC_HEAD(types_unsigned, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Unsigned types(3)");
+}
+
+ATF_TC_BODY(types_unsigned, tc)
+{
+ fsblkcnt_t fb;
+ fsfilcnt_t ff;
+ size_t size;
+ rlim_t lim;
+ ino_t ino;
+
+ fb = 0;
+ ff = 0;
+ ino = 0;
+ size = 0;
+
+ ATF_REQUIRE((fb - 1) > 0);
+ ATF_REQUIRE((ff - 1) > 0);
+ ATF_REQUIRE((ino - 1) > 0);
+ ATF_REQUIRE((size - 1) > 0);
+
+ /*
+ * Test also rlim_t; PR standards/18067.
+ */
+ lim = 0;
+
+ ATF_REQUIRE((lim - 1) > 0);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+ ATF_TP_ADD_TC(tp, types_limits);
+ ATF_TP_ADD_TC(tp, types_signed);
+ ATF_TP_ADD_TC(tp, types_unsigned);
+
+ return atf_no_error();
+}
diff -r b619e4bae154 -r d3d5e0de1c8c tests/include/t_types.c
--- a/tests/include/t_types.c Thu May 05 04:38:20 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/* $NetBSD: t_types.c,v 1.2 2011/04/10 08:11:34 jruoho Exp $ */
-
-/*-
- * Copyright (c) 2011 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jukka Ruohonen.
- *
- * 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>
-__RCSID("$NetBSD: t_types.c,v 1.2 2011/04/10 08:11:34 jruoho Exp $");
-
-#include <sys/types.h>
-
-#include <atf-c.h>
-#include <limits.h>
-#include <stdint.h>
-
-#include <stdio.h>
-
-ATF_TC(types_limits);
-ATF_TC_HEAD(types_limits, tc)
-{
- atf_tc_set_md_var(tc, "descr", "Known limits for types(3)");
-}
-
-ATF_TC_BODY(types_limits, tc)
-{
- useconds_t usec;
- ssize_t size;
-
- /*
- * IEEE Std 1003.1-2008:
- *
- * "The type ssize_t shall be capable of storing
- * values at least in the range [-1, {SSIZE_MAX}]."
- *
- */
- size = SSIZE_MAX;
- ATF_REQUIRE(size > 0);
-
- size = size + 1;
- ATF_REQUIRE(size < 0);
-
- /*
Home |
Main Index |
Thread Index |
Old Index