Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc Move the references to PRs from code comments...



details:   https://anonhg.NetBSD.org/src/rev/2b21c642eb3f
branches:  trunk
changeset: 778163:2b21c642eb3f
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Mar 18 07:00:51 2012 +0000

description:
Move the references to PRs from code comments to the test description. Once
ATF has the ability to output the metadata in the HTML reports, it should be
easy to traverse between releng and gnats -reports via links.

diffstat:

 tests/lib/libc/gen/t_nice.c         |  10 +++++-----
 tests/lib/libc/gen/t_syslog.c       |   9 +++------
 tests/lib/libc/stdio/t_printf.c     |   8 ++++----
 tests/lib/libc/stdio/t_scanf.c      |   5 ++---
 tests/lib/libc/stdlib/t_strtod.c    |  31 ++++++-------------------------
 tests/lib/libc/sys/t_dup.c          |  10 ++++------
 tests/lib/libc/sys/t_fsync.c        |   9 +++++----
 tests/lib/libc/sys/t_kevent.c       |  15 ++++++---------
 tests/lib/libc/sys/t_listen.c       |   5 +++--
 tests/lib/libc/sys/t_mknod.c        |  10 ++++------
 tests/lib/libc/sys/t_poll.c         |   6 ++----
 tests/lib/libc/sys/t_select.c       |   6 ++----
 tests/lib/libc/sys/t_timer_create.c |   6 +++---
 13 files changed, 49 insertions(+), 81 deletions(-)

diffs (truncated from 462 to 300 lines):

diff -r 3317e2f84fbd -r 2b21c642eb3f tests/lib/libc/gen/t_nice.c
--- a/tests/lib/libc/gen/t_nice.c       Sun Mar 18 06:20:51 2012 +0000
+++ b/tests/lib/libc/gen/t_nice.c       Sun Mar 18 07:00:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_nice.c,v 1.7 2011/05/01 06:42:29 jruoho Exp $ */
+/*     $NetBSD: t_nice.c,v 1.8 2012/03/18 07:00:51 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_nice.c,v 1.7 2011/05/01 06:42:29 jruoho Exp $");
+__RCSID("$NetBSD: t_nice.c,v 1.8 2012/03/18 07:00:51 jruoho Exp $");
 
 #include <sys/resource.h>
 #include <sys/wait.h>
@@ -63,7 +63,8 @@
 ATF_TC(nice_err);
 ATF_TC_HEAD(nice_err, tc)
 {
-       atf_tc_set_md_var(tc, "descr", "Test nice(3) for invalid parameters");
+       atf_tc_set_md_var(tc, "descr",
+           "Test nice(3) for invalid parameters (PR lib/42587)");
        atf_tc_set_md_var(tc, "require.user", "unprivileged");
 }
 
@@ -74,8 +75,7 @@
        /*
         * The call should fail with EPERM if the
         * supplied parameter is negative and the
-        * caller does not have privileges; see
-        * the closed PR lib/42587.
+        * caller does not have privileges.
         */
        for (i = -20; i < 0; i++) {
 
diff -r 3317e2f84fbd -r 2b21c642eb3f tests/lib/libc/gen/t_syslog.c
--- a/tests/lib/libc/gen/t_syslog.c     Sun Mar 18 06:20:51 2012 +0000
+++ b/tests/lib/libc/gen/t_syslog.c     Sun Mar 18 07:00:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_syslog.c,v 1.1 2011/07/07 10:02:53 jruoho Exp $ */
+/*     $NetBSD: t_syslog.c,v 1.2 2012/03/18 07:00:51 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -37,16 +37,13 @@
 ATF_TC_HEAD(syslog_pthread, tc)
 {
 
-       atf_tc_set_md_var(tc, "descr", "Test that syslog works at all");
+       atf_tc_set_md_var(tc, "descr", "Test that syslog(3) "
+           "works when linked to pthread(3) (PR lib/44248)");
        atf_tc_set_md_var(tc, "timeout", "2");
 }
 
 ATF_TC_BODY(syslog_pthread, tc)
 {
-
-       /*
-        * See the old PR lib/44248; syslog(3) fails with pthread(3).
-        */
        syslog(LOG_DEBUG, "from tests/lib/libc/gen/t_syslog");
 }
 
diff -r 3317e2f84fbd -r 2b21c642eb3f tests/lib/libc/stdio/t_printf.c
--- a/tests/lib/libc/stdio/t_printf.c   Sun Mar 18 06:20:51 2012 +0000
+++ b/tests/lib/libc/stdio/t_printf.c   Sun Mar 18 07:00:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_printf.c,v 1.5 2012/03/15 01:44:44 joerg Exp $ */
+/* $NetBSD: t_printf.c,v 1.6 2012/03/18 07:00:51 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -137,8 +137,8 @@
 ATF_TC(sprintf_zeropad);
 ATF_TC_HEAD(sprintf_zeropad, tc)
 {
- 
-       atf_tc_set_md_var(tc, "descr", "output format zero padding");
+       atf_tc_set_md_var(tc, "descr",
+           "Test output format zero padding (PR lib/44113)");
 }
 
 ATF_TC_BODY(sprintf_zeropad, tc)
@@ -150,7 +150,7 @@
 
        /* ieeefp */
 #ifndef __vax__
-       /* PR/44113: printf(3) should ignore zero padding for nan/inf */
+       /* printf(3) should ignore zero padding for nan/inf */
        ATF_CHECK(sprintf(str, "%010f", NAN) == 10);
        ATF_REQUIRE_STREQ(str, "       nan");
        ATF_CHECK(sprintf(str, "%010f", INFINITY) == 10);
diff -r 3317e2f84fbd -r 2b21c642eb3f tests/lib/libc/stdio/t_scanf.c
--- a/tests/lib/libc/stdio/t_scanf.c    Sun Mar 18 06:20:51 2012 +0000
+++ b/tests/lib/libc/stdio/t_scanf.c    Sun Mar 18 07:00:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_scanf.c,v 1.2 2012/03/15 01:44:44 joerg Exp $ */
+/* $NetBSD: t_scanf.c,v 1.3 2012/03/18 07:00:51 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -37,8 +37,7 @@
 ATF_TC(sscanf_neghex);
 ATF_TC_HEAD(sscanf_neghex, tc)
 {
-
-       atf_tc_set_md_var(tc, "descr", \
+       atf_tc_set_md_var(tc, "descr",
            "PR lib/21691: %%i and %%x fail with negative hex numbers");
 }
 
diff -r 3317e2f84fbd -r 2b21c642eb3f tests/lib/libc/stdlib/t_strtod.c
--- a/tests/lib/libc/stdlib/t_strtod.c  Sun Mar 18 06:20:51 2012 +0000
+++ b/tests/lib/libc/stdlib/t_strtod.c  Sun Mar 18 07:00:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_strtod.c,v 1.27 2011/09/30 14:50:20 jruoho Exp $ */
+/*     $NetBSD: t_strtod.c,v 1.28 2012/03/18 07:00:51 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 /* Public domain, Otto Moerbeek <otto%drijf.net@localhost>, 2006. */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_strtod.c,v 1.27 2011/09/30 14:50:20 jruoho Exp $");
+__RCSID("$NetBSD: t_strtod.c,v 1.28 2012/03/18 07:00:51 jruoho Exp $");
 
 #include <errno.h>
 #include <math.h>
@@ -112,15 +112,12 @@
 ATF_TC(strtod_inf);
 ATF_TC_HEAD(strtod_inf, tc)
 {
-       atf_tc_set_md_var(tc, "descr", "A strtod(3) with INF");
+       atf_tc_set_md_var(tc, "descr", "A strtod(3) with INF (PR lib/33262)");
 }
 
 ATF_TC_BODY(strtod_inf, tc)
 {
 #ifndef __vax__
-       /*
-        * See the closed PR lib/33262.
-        */
        for (size_t i = 0; i < __arraycount(inf_strings); i++) {
                double d = strtod(inf_strings[i], NULL);
                ATF_REQUIRE(isinf(d) != 0);
@@ -133,15 +130,12 @@
 ATF_TC(strtof_inf);
 ATF_TC_HEAD(strtof_inf, tc)
 {
-       atf_tc_set_md_var(tc, "descr", "A strtof(3) with INF");
+       atf_tc_set_md_var(tc, "descr", "A strtof(3) with INF (PR lib/33262)");
 }
 
 ATF_TC_BODY(strtof_inf, tc)
 {
 #ifndef __vax__
-       /*
-        * See the closed PR lib/33262.
-        */
        for (size_t i = 0; i < __arraycount(inf_strings); i++) {
                float f = strtof(inf_strings[i], NULL);
                ATF_REQUIRE(isinf(f) != 0);
@@ -154,19 +148,13 @@
 ATF_TC(strtold_inf);
 ATF_TC_HEAD(strtold_inf, tc)
 {
-       atf_tc_set_md_var(tc, "descr", "A strtold(3) with INF");
+       atf_tc_set_md_var(tc, "descr", "A strtold(3) with INF (PR lib/33262)");
 }
 
 ATF_TC_BODY(strtold_inf, tc)
 {
 #ifndef __vax__
 #   ifdef __HAVE_LONG_DOUBLE
-
-       /*
-        * See the closed PR lib/33262.
-        *
-        * This may also fail under QEMU; cf. PR misc/44767.
-        */
        if (system("cpuctl identify 0 | grep -q QEMU") == 0)
                atf_tc_expect_fail("PR misc/44767");
 
@@ -223,7 +211,7 @@
 ATF_TC(strtold_nan);
 ATF_TC_HEAD(strtold_nan, tc)
 {
-       atf_tc_set_md_var(tc, "descr", "A strtold(3) with NaN");
+       atf_tc_set_md_var(tc, "descr", "A strtold(3) with NaN (PR lib/45020)");
 }
 
 ATF_TC_BODY(strtold_nan, tc)
@@ -233,11 +221,6 @@
 
        char *end;
 
-       /*
-        * See PR lib/45020.
-        *
-        * This may also fail under QEMU; cf. PR misc/44767.
-        */
        if (system("cpuctl identify 0 | grep -q QEMU") == 0)
                atf_tc_expect_fail("PR misc/44767");
 
@@ -266,8 +249,6 @@
        /*
         * Test that strtod(3) honors the current rounding mode.
         * The used value is somewhere near 1 + DBL_EPSILON + FLT_EPSILON.
-        *
-        * May fail under QEMU; cf. PR misc/44767.
         */
        const char *val =
            "1.00000011920928977282585492503130808472633361816406";
diff -r 3317e2f84fbd -r 2b21c642eb3f tests/lib/libc/sys/t_dup.c
--- a/tests/lib/libc/sys/t_dup.c        Sun Mar 18 06:20:51 2012 +0000
+++ b/tests/lib/libc/sys/t_dup.c        Sun Mar 18 07:00:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dup.c,v 1.7 2011/10/17 17:58:43 njoly Exp $ */
+/* $NetBSD: t_dup.c,v 1.8 2012/03/18 07:00:51 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_dup.c,v 1.7 2011/10/17 17:58:43 njoly Exp $");
+__RCSID("$NetBSD: t_dup.c,v 1.8 2012/03/18 07:00:51 jruoho Exp $");
 
 #include <sys/resource.h>
 #include <sys/stat.h>
@@ -195,7 +195,8 @@
 ATF_TC(dup3_err);
 ATF_TC_HEAD(dup3_err, tc)
 {
-       atf_tc_set_md_var(tc, "descr", "Test error conditions of dup3(2)");
+       atf_tc_set_md_var(tc, "descr",
+           "Test error conditions of dup3(2) (PR lib/45148)");
 }
 
 ATF_TC_BODY(dup3_err, tc)
@@ -217,9 +218,6 @@
        errno = 0;
        ATF_REQUIRE_ERRNO(EBADF, dup3(-1, fd, O_CLOEXEC) == -1);
 
-       /*
-        * See the closed PR lib/45148.
-        */
        errno = 0;
        ATF_REQUIRE_ERRNO(EINVAL, dup3(fd, 1, O_NOFOLLOW) == -1);
 
diff -r 3317e2f84fbd -r 2b21c642eb3f tests/lib/libc/sys/t_fsync.c
--- a/tests/lib/libc/sys/t_fsync.c      Sun Mar 18 06:20:51 2012 +0000
+++ b/tests/lib/libc/sys/t_fsync.c      Sun Mar 18 07:00:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fsync.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
+/* $NetBSD: t_fsync.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_fsync.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
+__RCSID("$NetBSD: t_fsync.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $");
 
 #include <errno.h>
 #include <fcntl.h>
@@ -43,7 +43,8 @@
 ATF_TC(fsync_err);
 ATF_TC_HEAD(fsync_err, tc)
 {
-       atf_tc_set_md_var(tc, "descr", "Test error conditions of fsync(2)");
+       atf_tc_set_md_var(tc, "descr",
+           "Test error conditions of fsync(2) (PR kern/30)");
 }
 
 ATF_TC_BODY(fsync_err, tc)
@@ -65,7 +66,7 @@
        /*
         * On the other hand, EINVAL should follow
         * if the operation is not possible with
-        * the file descriptor (cf. PR kern/30).
+        * the file descriptor.
         */
        ATF_REQUIRE(pipe(fd) == 0);
 
diff -r 3317e2f84fbd -r 2b21c642eb3f tests/lib/libc/sys/t_kevent.c
--- a/tests/lib/libc/sys/t_kevent.c     Sun Mar 18 06:20:51 2012 +0000
+++ b/tests/lib/libc/sys/t_kevent.c     Sun Mar 18 07:00:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_kevent.c,v 1.1 2011/11/17 01:14:12 christos Exp $ */
+/*     $NetBSD: t_kevent.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */
 
 /*-



Home | Main Index | Thread Index | Old Index