Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests Convert the include tests to atf.
details: https://anonhg.NetBSD.org/src/rev/99d70026a544
branches: trunk
changeset: 756425:99d70026a544
user: jmmv <jmmv%NetBSD.org@localhost>
date: Sat Jul 17 19:26:27 2010 +0000
description:
Convert the include tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
diffstat:
tests/Makefile | 4 +-
tests/include/Makefile | 23 +
tests/include/d_bitstring_27.out | 263 +++++++++++++++++
tests/include/d_bitstring_32.out | 303 ++++++++++++++++++++
tests/include/d_bitstring_49.out | 439 +++++++++++++++++++++++++++++
tests/include/d_bitstring_64.out | 559 +++++++++++++++++++++++++++++++++++++
tests/include/d_bitstring_67.out | 583 +++++++++++++++++++++++++++++++++++++++
tests/include/d_bitstring_8.out | 111 +++++++
tests/include/sys/Makefile | 11 +
tests/include/sys/t_bootblock.c | 73 ++++
tests/include/t_bitstring.c | 305 ++++++++++++++++++++
tests/include/t_inttypes.c | 250 ++++++++++++++++
tests/include/t_limits.c | 57 +++
tests/include/t_stdint.c | 57 +++
14 files changed, 3036 insertions(+), 2 deletions(-)
diffs (truncated from 3104 to 300 lines):
diff -r e793aa8ceca4 -r 99d70026a544 tests/Makefile
--- a/tests/Makefile Sat Jul 17 19:25:26 2010 +0000
+++ b/tests/Makefile Sat Jul 17 19:26:27 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2010/07/13 21:13:21 jmmv Exp $
+# $NetBSD: Makefile,v 1.22 2010/07/17 19:26:27 jmmv Exp $
.include <bsd.own.mk>
@@ -8,7 +8,7 @@
SUBDIR= crypto games ipf util
.if ${MKATF} != "no"
-SUBDIR+= fs net kernel lib libexec rump sys syscall
+SUBDIR+= fs include kernel lib libexec net rump sys syscall
. if ${MACHINE} != "evbppc" && ${MKKMOD} != "no"
SUBDIR+= modules
diff -r e793aa8ceca4 -r 99d70026a544 tests/include/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/include/Makefile Sat Jul 17 19:26:27 2010 +0000
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1 2010/07/17 19:26:27 jmmv Exp $
+
+NOMAN= # defined
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/include
+TESTS_SUBDIRS= sys
+
+TESTS_C= t_bitstring
+TESTS_C+= t_inttypes
+TESTS_C+= t_limits
+TESTS_C+= t_stdint
+
+FILESDIR= ${TESTSDIR}
+FILES= d_bitstring_27.out
+FILES+= d_bitstring_32.out
+FILES+= d_bitstring_49.out
+FILES+= d_bitstring_64.out
+FILES+= d_bitstring_67.out
+FILES+= d_bitstring_8.out
+
+.include <bsd.test.mk>
diff -r e793aa8ceca4 -r 99d70026a544 tests/include/d_bitstring_27.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/include/d_bitstring_27.out Sat Jul 17 19:26:27 2010 +0000
@@ -0,0 +1,263 @@
+Testing with TEST_LENGTH = 27
+
+test _bit_byte, _bit_mask, and bitstr_size
+ i _bit_byte(i) _bit_mask(i) bitstr_size(i)
+ 0 0 1 0
+ 1 0 2 1
+ 2 0 4 1
+ 3 0 8 1
+ 4 0 16 1
+ 5 0 32 1
+ 6 0 64 1
+ 7 0 128 1
+ 8 1 1 1
+ 9 1 2 2
+ 10 1 4 2
+ 11 1 8 2
+ 12 1 16 2
+ 13 1 32 2
+ 14 1 64 2
+ 15 1 128 2
+ 16 2 1 2
+ 17 2 2 3
+ 18 2 4 3
+ 19 2 8 3
+ 20 2 16 3
+ 21 2 32 3
+ 22 2 64 3
+ 23 2 128 3
+ 24 3 1 3
+ 25 3 2 4
+ 26 3 4 4
+
+test bit_alloc, clearbits, bit_ffc, bit_ffs
+be: 0 -1 000000000000000000000000000
+is: 0 -1 000000000000000000000000000
+
+test bit_set
+be: 1 0 100100100100100100100100100
+is: 1 0 100100100100100100100100100
+
+test bit_clear
+be: 0 3 000100000100000100000100000
+is: 0 3 000100000100000100000100000
+
+test bit_test using previous bitstring
+ i bit_test(i)
+ 0 0
+ 1 0
+ 2 0
+ 3 8
+ 4 0
+ 5 0
+ 6 0
+ 7 0
+ 8 0
+ 9 2
+ 10 0
+ 11 0
+ 12 0
+ 13 0
+ 14 0
+ 15 128
+ 16 0
+ 17 0
+ 18 0
+ 19 0
+ 20 0
+ 21 32
+ 22 0
+ 23 0
+ 24 0
+ 25 0
+ 26 0
+
+test clearbits
+be: 0 -1 000000000000000000000000000
+is: 0 -1 000000000000000000000000000
+
+test bit_nset and bit_nclear
+be: 0 1 011111111111111111111111110
+is: 0 1 011111111111111111111111110
+be: 0 1 010000000000000000000000010
+is: 0 1 010000000000000000000000010
+be: 0 -1 000000000000000000000000000
+is: 0 -1 000000000000000000000000000
+be: 26 0 111111111111111111111111110
+is: 26 0 111111111111111111111111110
+be: 0 -1 000000000000000000000000000
+is: 0 -1 000000000000000000000000000
+
+first 1 bit should move right 1 position each line
+ 0 -1 0 111111111111111111111111111
+ 1 0 1 011111111111111111111111111
+ 2 0 2 001111111111111111111111111
+ 3 0 3 000111111111111111111111111
+ 4 0 4 000011111111111111111111111
+ 5 0 5 000001111111111111111111111
+ 6 0 6 000000111111111111111111111
+ 7 0 7 000000011111111111111111111
+ 8 0 8 000000001111111111111111111
+ 9 0 9 000000000111111111111111111
+ 10 0 10 000000000011111111111111111
+ 11 0 11 000000000001111111111111111
+ 12 0 12 000000000000111111111111111
+ 13 0 13 000000000000011111111111111
+ 14 0 14 000000000000001111111111111
+ 15 0 15 000000000000000111111111111
+ 16 0 16 000000000000000011111111111
+ 17 0 17 000000000000000001111111111
+ 18 0 18 000000000000000000111111111
+ 19 0 19 000000000000000000011111111
+ 20 0 20 000000000000000000001111111
+ 21 0 21 000000000000000000000111111
+ 22 0 22 000000000000000000000011111
+ 23 0 23 000000000000000000000001111
+ 24 0 24 000000000000000000000000111
+ 25 0 25 000000000000000000000000011
+ 26 0 26 000000000000000000000000001
+
+first 0 bit should move right 1 position each line
+ 0 0 -1 000000000000000000000000000
+ 1 1 0 100000000000000000000000000
+ 2 2 0 110000000000000000000000000
+ 3 3 0 111000000000000000000000000
+ 4 4 0 111100000000000000000000000
+ 5 5 0 111110000000000000000000000
+ 6 6 0 111111000000000000000000000
+ 7 7 0 111111100000000000000000000
+ 8 8 0 111111110000000000000000000
+ 9 9 0 111111111000000000000000000
+ 10 10 0 111111111100000000000000000
+ 11 11 0 111111111110000000000000000
+ 12 12 0 111111111111000000000000000
+ 13 13 0 111111111111100000000000000
+ 14 14 0 111111111111110000000000000
+ 15 15 0 111111111111111000000000000
+ 16 16 0 111111111111111100000000000
+ 17 17 0 111111111111111110000000000
+ 18 18 0 111111111111111111000000000
+ 19 19 0 111111111111111111100000000
+ 20 20 0 111111111111111111110000000
+ 21 21 0 111111111111111111111000000
+ 22 22 0 111111111111111111111100000
+ 23 23 0 111111111111111111111110000
+ 24 24 0 111111111111111111111111000
+ 25 25 0 111111111111111111111111100
+ 26 26 0 111111111111111111111111110
+
+first 0 bit should move left 1 position each line
+ 0 -1 0 111111111111111111111111111
+ 1 26 0 111111111111111111111111110
+ 2 25 0 111111111111111111111111100
+ 3 24 0 111111111111111111111111000
+ 4 23 0 111111111111111111111110000
+ 5 22 0 111111111111111111111100000
+ 6 21 0 111111111111111111111000000
+ 7 20 0 111111111111111111110000000
+ 8 19 0 111111111111111111100000000
+ 9 18 0 111111111111111111000000000
+ 10 17 0 111111111111111110000000000
+ 11 16 0 111111111111111100000000000
+ 12 15 0 111111111111111000000000000
+ 13 14 0 111111111111110000000000000
+ 14 13 0 111111111111100000000000000
+ 15 12 0 111111111111000000000000000
+ 16 11 0 111111111110000000000000000
+ 17 10 0 111111111100000000000000000
+ 18 9 0 111111111000000000000000000
+ 19 8 0 111111110000000000000000000
+ 20 7 0 111111100000000000000000000
+ 21 6 0 111111000000000000000000000
+ 22 5 0 111110000000000000000000000
+ 23 4 0 111100000000000000000000000
+ 24 3 0 111000000000000000000000000
+ 25 2 0 110000000000000000000000000
+ 26 1 0 100000000000000000000000000
+
+first 1 bit should move left 1 position each line
+ 0 0 -1 000000000000000000000000000
+ 1 0 26 000000000000000000000000001
+ 2 0 25 000000000000000000000000011
+ 3 0 24 000000000000000000000000111
+ 4 0 23 000000000000000000000001111
+ 5 0 22 000000000000000000000011111
+ 6 0 21 000000000000000000000111111
+ 7 0 20 000000000000000000001111111
+ 8 0 19 000000000000000000011111111
+ 9 0 18 000000000000000000111111111
+ 10 0 17 000000000000000001111111111
+ 11 0 16 000000000000000011111111111
+ 12 0 15 000000000000000111111111111
+ 13 0 14 000000000000001111111111111
+ 14 0 13 000000000000011111111111111
+ 15 0 12 000000000000111111111111111
+ 16 0 11 000000000001111111111111111
+ 17 0 10 000000000011111111111111111
+ 18 0 9 000000000111111111111111111
+ 19 0 8 000000001111111111111111111
+ 20 0 7 000000011111111111111111111
+ 21 0 6 000000111111111111111111111
+ 22 0 5 000001111111111111111111111
+ 23 0 4 000011111111111111111111111
+ 24 0 3 000111111111111111111111111
+ 25 0 2 001111111111111111111111111
+ 26 0 1 011111111111111111111111111
+
+0 bit should move right 1 position each line
+ 0 0 1 011111111111111111111111111
+ 1 1 0 101111111111111111111111111
+ 2 2 0 110111111111111111111111111
+ 3 3 0 111011111111111111111111111
+ 4 4 0 111101111111111111111111111
+ 5 5 0 111110111111111111111111111
+ 6 6 0 111111011111111111111111111
+ 7 7 0 111111101111111111111111111
+ 8 8 0 111111110111111111111111111
+ 9 9 0 111111111011111111111111111
+ 10 10 0 111111111101111111111111111
+ 11 11 0 111111111110111111111111111
+ 12 12 0 111111111111011111111111111
+ 13 13 0 111111111111101111111111111
+ 14 14 0 111111111111110111111111111
+ 15 15 0 111111111111111011111111111
+ 16 16 0 111111111111111101111111111
+ 17 17 0 111111111111111110111111111
+ 18 18 0 111111111111111111011111111
+ 19 19 0 111111111111111111101111111
+ 20 20 0 111111111111111111110111111
+ 21 21 0 111111111111111111111011111
+ 22 22 0 111111111111111111111101111
+ 23 23 0 111111111111111111111110111
+ 24 24 0 111111111111111111111111011
+ 25 25 0 111111111111111111111111101
+ 26 26 0 111111111111111111111111110
+
+1 bit should move right 1 position each line
+ 0 1 0 100000000000000000000000000
+ 1 0 1 010000000000000000000000000
+ 2 0 2 001000000000000000000000000
+ 3 0 3 000100000000000000000000000
+ 4 0 4 000010000000000000000000000
+ 5 0 5 000001000000000000000000000
+ 6 0 6 000000100000000000000000000
+ 7 0 7 000000010000000000000000000
+ 8 0 8 000000001000000000000000000
+ 9 0 9 000000000100000000000000000
+ 10 0 10 000000000010000000000000000
+ 11 0 11 000000000001000000000000000
+ 12 0 12 000000000000100000000000000
+ 13 0 13 000000000000010000000000000
+ 14 0 14 000000000000001000000000000
Home |
Main Index |
Thread Index |
Old Index