summaryrefslogtreecommitdiffstats
path: root/tools/regression/lib/libc
diff options
context:
space:
mode:
authornik <nik@FreeBSD.org>2004-11-11 19:47:55 +0000
committernik <nik@FreeBSD.org>2004-11-11 19:47:55 +0000
commit3e959a33f972bdc48cced73e8f76eb9ce7ce64eb (patch)
treecfebca4a0526247931bc6bdde73f15f72f3e92d0 /tools/regression/lib/libc
parent6e5bd296a6ca375161a672ed141aa5e414ffbc16 (diff)
downloadFreeBSD-src-3e959a33f972bdc48cced73e8f76eb9ce7ce64eb.zip
FreeBSD-src-3e959a33f972bdc48cced73e8f76eb9ce7ce64eb.tar.gz
Switch over to a different, more flexible test output protocol that's
understood by Perl's Test::Harness module and prove(1) commands. Update README to describe the new protocol. The work's broken down into two main sets of changes. First, update the existing test programs (shell scripts and C programs) to produce output in the ok/not ok format, and to, where possible, also produce a header describing the number of tests that are expected to be run. Second, provide the .t files that actually run the tests. In some cases these are copies of, or very similar too, scripts that already existed. I've kept the old scripts around so that it's possible to verify that behaviour under this new system (in terms of whether or not a test fails) is identical to the behaviour under the old system. Add a TODO file.
Diffstat (limited to 'tools/regression/lib/libc')
-rw-r--r--tools/regression/lib/libc/locale/test-btowc.c6
-rw-r--r--tools/regression/lib/libc/locale/test-btowc.t10
-rw-r--r--tools/regression/lib/libc/locale/test-iswctype.c6
-rw-r--r--tools/regression/lib/libc/locale/test-iswctype.t10
-rw-r--r--tools/regression/lib/libc/locale/test-mblen.c4
-rw-r--r--tools/regression/lib/libc/locale/test-mblen.t10
-rw-r--r--tools/regression/lib/libc/locale/test-mbrlen.c4
-rw-r--r--tools/regression/lib/libc/locale/test-mbrlen.t10
-rw-r--r--tools/regression/lib/libc/locale/test-mbrtowc.c4
-rw-r--r--tools/regression/lib/libc/locale/test-mbrtowc.t10
-rw-r--r--tools/regression/lib/libc/locale/test-mbsnrtowcs.c4
-rw-r--r--tools/regression/lib/libc/locale/test-mbsnrtowcs.t10
-rw-r--r--tools/regression/lib/libc/locale/test-mbsrtowcs.c4
-rw-r--r--tools/regression/lib/libc/locale/test-mbsrtowcs.t10
-rw-r--r--tools/regression/lib/libc/locale/test-mbstowcs.c4
-rw-r--r--tools/regression/lib/libc/locale/test-mbstowcs.t10
-rw-r--r--tools/regression/lib/libc/locale/test-mbtowc.c4
-rw-r--r--tools/regression/lib/libc/locale/test-mbtowc.t10
-rw-r--r--tools/regression/lib/libc/locale/test-sgetrune.c4
-rw-r--r--tools/regression/lib/libc/locale/test-sgetrune.t10
-rw-r--r--tools/regression/lib/libc/locale/test-sputrune.c4
-rw-r--r--tools/regression/lib/libc/locale/test-sputrune.t10
-rw-r--r--tools/regression/lib/libc/locale/test-towctrans.c6
-rw-r--r--tools/regression/lib/libc/locale/test-towctrans.t10
-rw-r--r--tools/regression/lib/libc/locale/test-wcrtomb.c4
-rw-r--r--tools/regression/lib/libc/locale/test-wcrtomb.t10
-rw-r--r--tools/regression/lib/libc/locale/test-wcsnrtombs.c4
-rw-r--r--tools/regression/lib/libc/locale/test-wcsnrtombs.t10
-rw-r--r--tools/regression/lib/libc/locale/test-wcsrtombs.c4
-rw-r--r--tools/regression/lib/libc/locale/test-wcsrtombs.t10
-rw-r--r--tools/regression/lib/libc/locale/test-wcstombs.c4
-rw-r--r--tools/regression/lib/libc/locale/test-wcstombs.t10
-rw-r--r--tools/regression/lib/libc/locale/test-wctomb.c4
-rw-r--r--tools/regression/lib/libc/locale/test-wctomb.t10
-rw-r--r--tools/regression/lib/libc/net/test-eui64_aton.c11
-rw-r--r--tools/regression/lib/libc/net/test-eui64_aton.t10
-rw-r--r--tools/regression/lib/libc/net/test-eui64_line.c13
-rw-r--r--tools/regression/lib/libc/net/test-eui64_line.t10
-rw-r--r--tools/regression/lib/libc/net/test-eui64_ntoa.c8
-rw-r--r--tools/regression/lib/libc/net/test-eui64_ntoa.t10
-rw-r--r--tools/regression/lib/libc/stdio/test-perror.c4
-rw-r--r--tools/regression/lib/libc/stdio/test-perror.t10
-rw-r--r--tools/regression/lib/libc/stdio/test-printfloat.c3
-rw-r--r--tools/regression/lib/libc/stdio/test-printfloat.t10
-rw-r--r--tools/regression/lib/libc/stdio/test-scanfloat.c4
-rw-r--r--tools/regression/lib/libc/stdio/test-scanfloat.t10
-rw-r--r--tools/regression/lib/libc/stdlib/test-heapsort.c3
-rw-r--r--tools/regression/lib/libc/stdlib/test-heapsort.t10
-rw-r--r--tools/regression/lib/libc/stdlib/test-mergesort.c3
-rw-r--r--tools/regression/lib/libc/stdlib/test-mergesort.t10
-rw-r--r--tools/regression/lib/libc/stdlib/test-qsort.c3
-rw-r--r--tools/regression/lib/libc/stdlib/test-qsort.t10
-rw-r--r--tools/regression/lib/libc/string/test-strerror.c6
-rw-r--r--tools/regression/lib/libc/string/test-strerror.t10
54 files changed, 364 insertions, 38 deletions
diff --git a/tools/regression/lib/libc/locale/test-btowc.c b/tools/regression/lib/libc/locale/test-btowc.c
index a28e4f5..9ed4582 100644
--- a/tools/regression/lib/libc/locale/test-btowc.c
+++ b/tools/regression/lib/libc/locale/test-btowc.c
@@ -46,6 +46,8 @@ main(int argc, char *argv[])
{
int i;
+ printf("1..2\n");
+
/*
* C/POSIX locale.
*/
@@ -63,8 +65,8 @@ main(int argc, char *argv[])
assert(btowc('A') == L'A' && wctob(L'A') == 'A');
assert(btowc(0xa3) == WEOF && wctob(0xa3c1) == EOF);
- printf("PASS btowc()\n");
- printf("PASS wctob()\n");
+ printf("ok 1 - btowc()\n");
+ printf("ok 2 - wctob()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-btowc.t b/tools/regression/lib/libc/locale/test-btowc.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-btowc.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-iswctype.c b/tools/regression/lib/libc/locale/test-iswctype.c
index 26ca883..ca9621a 100644
--- a/tools/regression/lib/libc/locale/test-iswctype.c
+++ b/tools/regression/lib/libc/locale/test-iswctype.c
@@ -63,6 +63,8 @@ main(int argc, char *argv[])
{ "xdigit", iswxdigit }
};
+ printf("1..2\n");
+
/*
* C/POSIX locale.
*/
@@ -92,8 +94,8 @@ main(int argc, char *argv[])
for (i = 0; i < 65536; i++)
assert(iswctype(i, t) == 0);
- printf("PASS iswctype()\n");
- printf("PASS wctype()\n");
+ printf("ok 1 - iswctype()\n");
+ printf("ok 2 - wctype()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-iswctype.t b/tools/regression/lib/libc/locale/test-iswctype.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-iswctype.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-mblen.c b/tools/regression/lib/libc/locale/test-mblen.c
index 236cbc7..dd07359 100644
--- a/tools/regression/lib/libc/locale/test-mblen.c
+++ b/tools/regression/lib/libc/locale/test-mblen.c
@@ -52,6 +52,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
assert(MB_CUR_MAX == 1);
/* No shift states in C locale. */
@@ -106,7 +108,7 @@ main(int argc, char *argv[])
buf[1] = 0xc1;
assert(mblen(buf, 2) == 2);
- printf("PASS mblen()\n");
+ printf("ok 1 - mblen()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-mblen.t b/tools/regression/lib/libc/locale/test-mblen.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-mblen.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-mbrlen.c b/tools/regression/lib/libc/locale/test-mbrlen.c
index c18df64..3198a77 100644
--- a/tools/regression/lib/libc/locale/test-mbrlen.c
+++ b/tools/regression/lib/libc/locale/test-mbrlen.c
@@ -54,6 +54,8 @@ main(int argc, char *argv[])
/*
* C/POSIX locale.
*/
+
+ printf("1..1\n");
assert(MB_CUR_MAX == 1);
@@ -121,7 +123,7 @@ main(int argc, char *argv[])
memset(&s, 0, sizeof(s));
assert(mbrlen(buf, 2, &s) == 2);
- printf("PASS mbrlen()\n");
+ printf("ok 1 - mbrlen()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-mbrlen.t b/tools/regression/lib/libc/locale/test-mbrlen.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-mbrlen.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-mbrtowc.c b/tools/regression/lib/libc/locale/test-mbrtowc.c
index ec6132d..e9a2ea0 100644
--- a/tools/regression/lib/libc/locale/test-mbrtowc.c
+++ b/tools/regression/lib/libc/locale/test-mbrtowc.c
@@ -56,6 +56,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
assert(MB_CUR_MAX == 1);
/* Null wide character, internal state. */
@@ -155,7 +157,7 @@ main(int argc, char *argv[])
assert(mbrtowc(&wc, buf, 1, &s) == 1);
assert(wc == 0xa3c1);
- printf("PASS mbrtowc()\n");
+ printf("ok 1 - mbrtowc()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-mbrtowc.t b/tools/regression/lib/libc/locale/test-mbrtowc.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-mbrtowc.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-mbsnrtowcs.c b/tools/regression/lib/libc/locale/test-mbsnrtowcs.c
index 2f1b027..585dd4e 100644
--- a/tools/regression/lib/libc/locale/test-mbsnrtowcs.c
+++ b/tools/regression/lib/libc/locale/test-mbsnrtowcs.c
@@ -55,6 +55,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
/* Simple null terminated string. */
memset(srcbuf, 0xcc, sizeof(srcbuf));
strcpy(srcbuf, "hello");
@@ -186,7 +188,7 @@ main(int argc, char *argv[])
sizeof(*dstbuf), &s) == 0);
assert(src == NULL);
- printf("PASS mbsnrtowcs()\n");
+ printf("ok 1 - mbsnrtowcs()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-mbsnrtowcs.t b/tools/regression/lib/libc/locale/test-mbsnrtowcs.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-mbsnrtowcs.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-mbsrtowcs.c b/tools/regression/lib/libc/locale/test-mbsrtowcs.c
index 6579be0..dd6a7e1 100644
--- a/tools/regression/lib/libc/locale/test-mbsrtowcs.c
+++ b/tools/regression/lib/libc/locale/test-mbsrtowcs.c
@@ -56,6 +56,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
/* Simple null terminated string. */
memset(srcbuf, 0xcc, sizeof(srcbuf));
strcpy(srcbuf, "hello");
@@ -142,7 +144,7 @@ main(int argc, char *argv[])
dstbuf[3] == 0x20 && dstbuf[4] == 0xA3C3 && dstbuf[5] == 0);
assert(src == NULL);
- printf("PASS mbsrtowcs()\n");
+ printf("ok 1 - mbsrtowcs()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-mbsrtowcs.t b/tools/regression/lib/libc/locale/test-mbsrtowcs.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-mbsrtowcs.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-mbstowcs.c b/tools/regression/lib/libc/locale/test-mbstowcs.c
index 1b75be6..18039dd 100644
--- a/tools/regression/lib/libc/locale/test-mbstowcs.c
+++ b/tools/regression/lib/libc/locale/test-mbstowcs.c
@@ -54,6 +54,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
/* Simple null terminated string. */
memset(srcbuf, 0xcc, sizeof(srcbuf));
strcpy(srcbuf, "hello");
@@ -104,7 +106,7 @@ main(int argc, char *argv[])
assert(dstbuf[0] == 0xA3C1 && dstbuf[1] == 0x20 && dstbuf[2] == 0x42 &&
dstbuf[3] == 0x20 && dstbuf[4] == 0xA3C3 && dstbuf[5] == 0);
- printf("PASS mbstowcs()\n");
+ printf("ok 1 - mbstowcs()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-mbstowcs.t b/tools/regression/lib/libc/locale/test-mbstowcs.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-mbstowcs.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-mbtowc.c b/tools/regression/lib/libc/locale/test-mbtowc.c
index a58d261..5ee070c 100644
--- a/tools/regression/lib/libc/locale/test-mbtowc.c
+++ b/tools/regression/lib/libc/locale/test-mbtowc.c
@@ -53,6 +53,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
assert(MB_CUR_MAX == 1);
/* No shift states in C locale. */
@@ -116,7 +118,7 @@ main(int argc, char *argv[])
assert(mbtowc(&wc, buf, 2) == 2);
assert(wc == 0xa3c1);
- printf("PASS mbtowc()\n");
+ printf("ok 1 - mbtowc()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-mbtowc.t b/tools/regression/lib/libc/locale/test-mbtowc.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-mbtowc.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-sgetrune.c b/tools/regression/lib/libc/locale/test-sgetrune.c
index feb6edf..1bfc28d 100644
--- a/tools/regression/lib/libc/locale/test-sgetrune.c
+++ b/tools/regression/lib/libc/locale/test-sgetrune.c
@@ -54,6 +54,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
assert(MB_CUR_MAX == 1);
/* Incomplete character sequence. */
@@ -127,7 +129,7 @@ main(int argc, char *argv[])
assert(cres == buf + 2);
assert(sgetrune(buf, 2, NULL) == 0xa3c1);
- printf("PASS sgetrune()\n");
+ printf("ok 1 - sgetrune()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-sgetrune.t b/tools/regression/lib/libc/locale/test-sgetrune.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-sgetrune.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-sputrune.c b/tools/regression/lib/libc/locale/test-sputrune.c
index dc910e3..6aa00c7 100644
--- a/tools/regression/lib/libc/locale/test-sputrune.c
+++ b/tools/regression/lib/libc/locale/test-sputrune.c
@@ -54,6 +54,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
assert(MB_CUR_MAX == 1);
/* Null wide character. */
@@ -127,7 +129,7 @@ main(int argc, char *argv[])
assert((unsigned char)buf[0] == 0xcc);
- printf("PASS sputrune()\n");
+ printf("ok 1 - sputrune()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-sputrune.t b/tools/regression/lib/libc/locale/test-sputrune.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-sputrune.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-towctrans.c b/tools/regression/lib/libc/locale/test-towctrans.c
index 0ac0022..6c0e428 100644
--- a/tools/regression/lib/libc/locale/test-towctrans.c
+++ b/tools/regression/lib/libc/locale/test-towctrans.c
@@ -53,6 +53,8 @@ main(int argc, char *argv[])
{ "toupper", towupper },
};
+ printf("1..2\n");
+
/*
* C/POSIX locale.
*/
@@ -82,8 +84,8 @@ main(int argc, char *argv[])
for (i = 0; i < 65536; i++)
assert(towctrans(i, t) == i);
- printf("PASS towctrans()\n");
- printf("PASS wctrans()\n");
+ printf("ok 1 - towctrans()\n");
+ printf("ok 2 - wctrans()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-towctrans.t b/tools/regression/lib/libc/locale/test-towctrans.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-towctrans.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-wcrtomb.c b/tools/regression/lib/libc/locale/test-wcrtomb.c
index c00792b..d7ec029 100644
--- a/tools/regression/lib/libc/locale/test-wcrtomb.c
+++ b/tools/regression/lib/libc/locale/test-wcrtomb.c
@@ -55,6 +55,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
assert(MB_CUR_MAX == 1);
/*
@@ -126,7 +128,7 @@ main(int argc, char *argv[])
(unsigned char)buf[1] == 0xc1 &&
(unsigned char)buf[2] == 0xcc);
- printf("PASS wcrtomb()\n");
+ printf("ok 1 - wcrtomb()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-wcrtomb.t b/tools/regression/lib/libc/locale/test-wcrtomb.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-wcrtomb.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-wcsnrtombs.c b/tools/regression/lib/libc/locale/test-wcsnrtombs.c
index f84c046..2290cac 100644
--- a/tools/regression/lib/libc/locale/test-wcsnrtombs.c
+++ b/tools/regression/lib/libc/locale/test-wcsnrtombs.c
@@ -55,6 +55,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
/* Simple null terminated string. */
wmemset(srcbuf, 0xcc, sizeof(srcbuf) / sizeof(*srcbuf));
wcscpy(srcbuf, L"hello");
@@ -186,7 +188,7 @@ main(int argc, char *argv[])
assert((unsigned char)dstbuf[5] == 0xcc);
assert(src == srcbuf + 4);
- printf("PASS wcsnrtombs()\n");
+ printf("ok 1 - wcsnrtombs()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-wcsnrtombs.t b/tools/regression/lib/libc/locale/test-wcsnrtombs.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-wcsnrtombs.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-wcsrtombs.c b/tools/regression/lib/libc/locale/test-wcsrtombs.c
index 9ed3ff9..48fe366 100644
--- a/tools/regression/lib/libc/locale/test-wcsrtombs.c
+++ b/tools/regression/lib/libc/locale/test-wcsrtombs.c
@@ -56,6 +56,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
/* Simple null terminated string. */
wmemset(srcbuf, 0xcc, sizeof(srcbuf) / sizeof(*srcbuf));
wcscpy(srcbuf, L"hello");
@@ -147,7 +149,7 @@ main(int argc, char *argv[])
assert((unsigned char)dstbuf[8] == 0xcc);
assert(src == NULL);
- printf("PASS wcsrtombs()\n");
+ printf("ok 1 - wcsrtombs()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-wcsrtombs.t b/tools/regression/lib/libc/locale/test-wcsrtombs.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-wcsrtombs.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-wcstombs.c b/tools/regression/lib/libc/locale/test-wcstombs.c
index 29a5af9..f4a5770 100644
--- a/tools/regression/lib/libc/locale/test-wcstombs.c
+++ b/tools/regression/lib/libc/locale/test-wcstombs.c
@@ -54,6 +54,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
/* Simple null terminated string. */
wmemset(srcbuf, 0xcc, sizeof(srcbuf) / sizeof(*srcbuf));
wcscpy(srcbuf, L"hello");
@@ -121,7 +123,7 @@ main(int argc, char *argv[])
assert(strcmp(dstbuf, "\xA3\xC1 B \xA3\xC3") == 0);
assert((unsigned char)dstbuf[8] == 0xcc);
- printf("PASS wcstombs()\n");
+ printf("ok 1 - wcstombs()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-wcstombs.t b/tools/regression/lib/libc/locale/test-wcstombs.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-wcstombs.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/locale/test-wctomb.c b/tools/regression/lib/libc/locale/test-wctomb.c
index 8227f90..d55b3db 100644
--- a/tools/regression/lib/libc/locale/test-wctomb.c
+++ b/tools/regression/lib/libc/locale/test-wctomb.c
@@ -53,6 +53,8 @@ main(int argc, char *argv[])
* C/POSIX locale.
*/
+ printf("1..1\n");
+
assert(MB_CUR_MAX == 1);
/* No shift states in C locale. */
@@ -104,7 +106,7 @@ main(int argc, char *argv[])
(unsigned char)buf[1] == 0xc1 &&
(unsigned char)buf[2] == 0xcc);
- printf("PASS wctomb()\n");
+ printf("ok 1 - wctomb()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/locale/test-wctomb.t b/tools/regression/lib/libc/locale/test-wctomb.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/locale/test-wctomb.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/net/test-eui64_aton.c b/tools/regression/lib/libc/net/test-eui64_aton.c
index 7957d57..e10f985 100644
--- a/tools/regression/lib/libc/net/test-eui64_aton.c
+++ b/tools/regression/lib/libc/net/test-eui64_aton.c
@@ -40,15 +40,18 @@ test_str( const char *str, const struct eui64 *eui)
{
struct eui64 e;
char buf[EUI64_SIZ];
+ static int test = 0;
+
+ test++;
if (eui64_aton(str, &e) != 0 &&
memcmp(&e, &eui, sizeof(struct eui64)) != 0) {
- printf("FAIL: eui64_aton(%s)\n", str);
+ printf("not ok %d - : eui64_aton(%s)\n", test, str);
eui64_ntoa(&e, buf, sizeof(buf));
- printf("got: %s\n", buf);
+ printf("# got: %s\n", buf);
return (0);
} else {
- printf("PASS: eui64_aton(%s)\n", str);
+ printf("ok %d - eui64_aton(%s)\n", test, str);
return (1);
}
@@ -58,6 +61,8 @@ int
main(int argc, char **argv)
{
+ printf("1..5\n");
+
test_str(test_eui64_id_ascii, &test_eui64_id);
test_str(test_eui64_id_colon_ascii, &test_eui64_id);
test_str(test_eui64_mac_ascii, &test_eui64_eui48);
diff --git a/tools/regression/lib/libc/net/test-eui64_aton.t b/tools/regression/lib/libc/net/test-eui64_aton.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/net/test-eui64_aton.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/net/test-eui64_line.c b/tools/regression/lib/libc/net/test-eui64_line.c
index 463042a..714b460 100644
--- a/tools/regression/lib/libc/net/test-eui64_line.c
+++ b/tools/regression/lib/libc/net/test-eui64_line.c
@@ -40,17 +40,20 @@ test_line(const char *line, const struct eui64 *eui, const char *host)
{
struct eui64 e;
char buf[256];
+ static int test = 0;
+
+ test++;
if (eui64_line(line, &e, buf, sizeof(buf)) != 0 ||
memcmp(&e, eui, sizeof(struct eui64)) != 0 ||
strcmp(buf, host) != 0) {
- printf("FAIL: eui64_line(\"%s\")\n", line);
- printf("host = %s\n", buf);
+ printf("not ok %d - eui64_line(\"%s\")\n", test, line);
+ printf("# host = %s\n", buf);
eui64_ntoa(&e, buf, sizeof(buf));
- printf("e = %s\n", buf);
+ printf("# e = %s\n", buf);
return (0);
} else {
- printf("PASS: eui64_line(\"%s\")\n", line);
+ printf("ok %d - eui64_line(\"%s\")\n", test, line);
return (1);
}
}
@@ -59,6 +62,8 @@ int
main(int argc, char **argv)
{
+ printf("1..6\n");
+
test_line(test_eui64_line_id, &test_eui64_id,
test_eui64_id_host);
test_line(test_eui64_line_id_colon, &test_eui64_id,
diff --git a/tools/regression/lib/libc/net/test-eui64_line.t b/tools/regression/lib/libc/net/test-eui64_line.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/net/test-eui64_line.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/net/test-eui64_ntoa.c b/tools/regression/lib/libc/net/test-eui64_ntoa.c
index c320329d..f7582f0 100644
--- a/tools/regression/lib/libc/net/test-eui64_ntoa.c
+++ b/tools/regression/lib/libc/net/test-eui64_ntoa.c
@@ -40,13 +40,15 @@ main(int argc, char **argv)
{
char a[EUI64_SIZ];
+ printf("1..1\n");
+
if (eui64_ntoa(&test_eui64_id, a, sizeof(a)) == 0 &&
strcmp(a, test_eui64_id_ascii) == 0) {
- printf("PASS: eui64_ntoa\n");
+ printf("ok 1 - eui64_ntoa\n");
return (0);
}
- printf("a = '%s'\n", a);
+ printf("# a = '%s'\n", a);
- printf("FAIL: eui64_ntoa\n");
+ printf("not ok 1 - eui64_ntoa\n");
return (0);
}
diff --git a/tools/regression/lib/libc/net/test-eui64_ntoa.t b/tools/regression/lib/libc/net/test-eui64_ntoa.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/net/test-eui64_ntoa.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdio/test-perror.c b/tools/regression/lib/libc/stdio/test-perror.c
index 7d83155..992b734 100644
--- a/tools/regression/lib/libc/stdio/test-perror.c
+++ b/tools/regression/lib/libc/stdio/test-perror.c
@@ -51,6 +51,8 @@ main(int argc, char *argv[])
int i;
char *s;
+ printf("1..1\n");
+
strcpy(tmpfil, _PATH_TMP "perror.XXXXXXXX");
if (mkstemp(tmpfil) < 0)
err(1, "mkstemp");
@@ -92,7 +94,7 @@ main(int argc, char *argv[])
assert(s == NULL);
fclose(stderr);
- printf("PASS perror()\n");
+ printf("ok 1 - perror()\n");
return (0);
}
diff --git a/tools/regression/lib/libc/stdio/test-perror.t b/tools/regression/lib/libc/stdio/test-perror.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdio/test-perror.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdio/test-printfloat.c b/tools/regression/lib/libc/stdio/test-printfloat.c
index 3aa73e8..cd0f71c 100644
--- a/tools/regression/lib/libc/stdio/test-printfloat.c
+++ b/tools/regression/lib/libc/stdio/test-printfloat.c
@@ -52,6 +52,7 @@ int
main(int argc, char *argv[])
{
+ printf("1..1\n");
assert(setlocale(LC_NUMERIC, ""));
testfmt(" 1.000000E+00", "%13E", 1.0);
@@ -203,7 +204,7 @@ main(int argc, char *argv[])
testfmt("0x2.00p-1030", "%.2a", 0x1.fffp-1030);
testfmt("0x1.00p-1026", "%.2a", 0xf.fffp-1030);
- printf("PASS printfloat\n");
+ printf("ok 1 - printfloat\n");
return (0);
}
diff --git a/tools/regression/lib/libc/stdio/test-printfloat.t b/tools/regression/lib/libc/stdio/test-printfloat.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdio/test-printfloat.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdio/test-scanfloat.c b/tools/regression/lib/libc/stdio/test-scanfloat.c
index 791a33a..1071b2c 100644
--- a/tools/regression/lib/libc/stdio/test-scanfloat.c
+++ b/tools/regression/lib/libc/stdio/test-scanfloat.c
@@ -52,6 +52,8 @@ main(int argc, char *argv[])
double d = 0.0;
float f = 0.0;
+ printf("1..1\n");
+
buf[0] = '\0';
assert(setlocale(LC_NUMERIC, ""));
@@ -174,7 +176,7 @@ main(int argc, char *argv[])
sscanf("0x1.2345678p-1050", "%le", &d);
assert(d == 0x1.234568p-1050);
- printf("PASS scanfloat\n");
+ printf("ok 1 - scanfloat\n");
return (0);
}
diff --git a/tools/regression/lib/libc/stdio/test-scanfloat.t b/tools/regression/lib/libc/stdio/test-scanfloat.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdio/test-scanfloat.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdlib/test-heapsort.c b/tools/regression/lib/libc/stdlib/test-heapsort.c
index ad6dc89..6ce8924 100644
--- a/tools/regression/lib/libc/stdlib/test-heapsort.c
+++ b/tools/regression/lib/libc/stdlib/test-heapsort.c
@@ -44,6 +44,7 @@ main(int argc, char *argv[])
int testvector[IVEC_LEN];
int sresvector[IVEC_LEN];
+ printf("1..1\n");
for (j = 2; j < IVEC_LEN; j++) {
/* Populate test vectors */
for (i = 0; i < j; i++)
@@ -59,7 +60,7 @@ main(int argc, char *argv[])
assert(testvector[i] == sresvector[i]);
}
- printf("PASS heapsort\n");
+ printf("ok 1 - heapsort\n");
return(0);
}
diff --git a/tools/regression/lib/libc/stdlib/test-heapsort.t b/tools/regression/lib/libc/stdlib/test-heapsort.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdlib/test-heapsort.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdlib/test-mergesort.c b/tools/regression/lib/libc/stdlib/test-mergesort.c
index c9817ca..729d481 100644
--- a/tools/regression/lib/libc/stdlib/test-mergesort.c
+++ b/tools/regression/lib/libc/stdlib/test-mergesort.c
@@ -44,6 +44,7 @@ main(int argc, char *argv[])
int testvector[IVEC_LEN];
int sresvector[IVEC_LEN];
+ printf("1..1\n");
for (j = 2; j < IVEC_LEN; j++) {
/* Populate test vectors */
for (i = 0; i < j; i++)
@@ -59,7 +60,7 @@ main(int argc, char *argv[])
assert(testvector[i] == sresvector[i]);
}
- printf("PASS mergesort\n");
+ printf("ok 1 - mergesort\n");
return(0);
}
diff --git a/tools/regression/lib/libc/stdlib/test-mergesort.t b/tools/regression/lib/libc/stdlib/test-mergesort.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdlib/test-mergesort.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdlib/test-qsort.c b/tools/regression/lib/libc/stdlib/test-qsort.c
index 8002549..8a508e8 100644
--- a/tools/regression/lib/libc/stdlib/test-qsort.c
+++ b/tools/regression/lib/libc/stdlib/test-qsort.c
@@ -44,6 +44,7 @@ main(int argc, char *argv[])
int testvector[IVEC_LEN];
int sresvector[IVEC_LEN];
+ printf("1..1\n");
for (j = 2; j < IVEC_LEN; j++) {
/* Populate test vectors */
for (i = 0; i < j; i++)
@@ -59,7 +60,7 @@ main(int argc, char *argv[])
assert(testvector[i] == sresvector[i]);
}
- printf("PASS qsort\n");
+ printf("ok 1 - qsort\n");
return(0);
}
diff --git a/tools/regression/lib/libc/stdlib/test-qsort.t b/tools/regression/lib/libc/stdlib/test-qsort.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdlib/test-qsort.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/string/test-strerror.c b/tools/regression/lib/libc/string/test-strerror.c
index 375ca64..6c429c3 100644
--- a/tools/regression/lib/libc/string/test-strerror.c
+++ b/tools/regression/lib/libc/string/test-strerror.c
@@ -40,6 +40,8 @@ main(void)
char *sret;
int iret;
+ printf("1..2\n");
+
/*
* strerror() failure tests.
*/
@@ -71,7 +73,7 @@ main(void)
sret = strerror(ELAST);
assert(errno == 0);
- printf("PASS strerror()\n");
+ printf("ok 1 - strerror()\n");
/*
* strerror_r() failure tests.
@@ -124,7 +126,7 @@ main(void)
assert(strcmp(buf, "Too many processes") == 0);
assert(iret == 0);
- printf("PASS strerror_r()\n");
+ printf("ok 2 - strerror_r()\n");
exit(0);
}
diff --git a/tools/regression/lib/libc/string/test-strerror.t b/tools/regression/lib/libc/string/test-strerror.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/string/test-strerror.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
OpenPOWER on IntegriCloud