Source-Changes-HG archive

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

[src/trunk]: src Move 't_syslog_pthread' to 't_syslog' for consistency with l...



details:   https://anonhg.NetBSD.org/src/rev/63e812f24bbe
branches:  trunk
changeset: 767045:63e812f24bbe
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Thu Jul 07 10:02:52 2011 +0000

description:
Move 't_syslog_pthread' to 't_syslog' for consistency with libc.

diffstat:

 distrib/sets/lists/tests/mi           |   8 ++-
 tests/lib/libc/gen/Makefile           |   6 +-
 tests/lib/libc/gen/t_syslog.c         |  59 +++++++++++++++++++++++++++++++++++
 tests/lib/libc/gen/t_syslog_pthread.c |  57 ---------------------------------
 tests/lib/libc/gen/t_vis.c            |  11 ++---
 5 files changed, 72 insertions(+), 69 deletions(-)

diffs (214 lines):

diff -r 76f7264e7238 -r 63e812f24bbe distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Thu Jul 07 09:49:59 2011 +0000
+++ b/distrib/sets/lists/tests/mi       Thu Jul 07 10:02:52 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.368 2011/07/07 08:59:30 jruoho Exp $
+# $NetBSD: mi,v 1.369 2011/07/07 10:02:52 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -372,7 +372,8 @@
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_setdomainname.debug       tests-lib-debug         debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_sethostname.debug         tests-lib-debug         debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_siginfo.debug             tests-lib-debug         debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/gen/t_syslog_pthread.debug      tests-lib-debug         debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/gen/t_syslog.debug              tests-lib-debug         debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/gen/t_syslog_pthread.debug      tests-obsolete          obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_ttyname.debug             tests-lib-debug         debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/t_vis.debug                 tests-lib-debug         debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/getaddrinfo                     tests-obsolete          obsolete
@@ -1872,7 +1873,8 @@
 ./usr/tests/lib/libc/gen/t_setdomainname       tests-lib-tests         atf
 ./usr/tests/lib/libc/gen/t_sethostname         tests-lib-tests         atf
 ./usr/tests/lib/libc/gen/t_siginfo             tests-lib-tests         atf
-./usr/tests/lib/libc/gen/t_syslog_pthread      tests-lib-tests         atf
+./usr/tests/lib/libc/gen/t_syslog              tests-lib-tests         atf
+./usr/tests/lib/libc/gen/t_syslog_pthread      tests-obsolete          obsolete
 ./usr/tests/lib/libc/gen/t_ttyname             tests-lib-tests         atf
 ./usr/tests/lib/libc/gen/t_vis                 tests-lib-tests         atf
 ./usr/tests/lib/libc/getaddrinfo               tests-obsolete          obsolete
diff -r 76f7264e7238 -r 63e812f24bbe tests/lib/libc/gen/Makefile
--- a/tests/lib/libc/gen/Makefile       Thu Jul 07 09:49:59 2011 +0000
+++ b/tests/lib/libc/gen/Makefile       Thu Jul 07 10:02:52 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2011/06/14 05:25:21 jruoho Exp $
+# $NetBSD: Makefile,v 1.27 2011/07/07 10:02:53 jruoho Exp $
 
 .include <bsd.own.mk>
 
@@ -22,12 +22,12 @@
 TESTS_C+=      t_setdomainname
 TESTS_C+=      t_sethostname
 TESTS_C+=      t_siginfo
-TESTS_C+=      t_syslog_pthread
+TESTS_C+=      t_syslog
 TESTS_C+=      t_ttyname
 TESTS_C+=      t_vis
 
 LDADD.t_ldexp+=                -lm
 LDADD.t_nice+=         -lpthread
-LDADD.t_syslog_pthread+=-lpthread
+LDADD.t_syslog+=       -lpthread
 
 .include <bsd.test.mk>
diff -r 76f7264e7238 -r 63e812f24bbe tests/lib/libc/gen/t_syslog.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libc/gen/t_syslog.c     Thu Jul 07 10:02:52 2011 +0000
@@ -0,0 +1,59 @@
+/*     $NetBSD: t_syslog.c,v 1.1 2011/07/07 10:02:53 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2010 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 COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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/types.h>
+
+#include <atf-c.h>
+#include <syslog.h>
+
+ATF_TC(syslog_pthread);
+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, "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");
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+       ATF_TP_ADD_TC(tp, syslog_pthread);
+
+       return atf_no_error();
+}
diff -r 76f7264e7238 -r 63e812f24bbe tests/lib/libc/gen/t_syslog_pthread.c
--- a/tests/lib/libc/gen/t_syslog_pthread.c     Thu Jul 07 09:49:59 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*     $NetBSD: t_syslog_pthread.c,v 1.3 2011/07/07 09:49:59 jruoho Exp $      */
-
-/*-
- * Copyright (c) 2010 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 COPYRIGHT HOLDERS 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
- * COPYRIGHT HOLDERS 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/types.h>
-
-#include <atf-c.h>
-#include <syslog.h>
-
-ATF_TC(syslog_pthread);
-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, "timeout", "2");
-}
-
-ATF_TC_BODY(syslog_pthread, tc)
-{
-
-       //atf_tc_expect_timeout("PR lib/44248");
-       syslog(LOG_DEBUG, "from tests/lib/libc/gen/t_syslog_pthread");
-}
-
-ATF_TP_ADD_TCS(tp)
-{
-
-       ATF_TP_ADD_TC(tp, syslog_pthread);
-
-       return atf_no_error();
-}
diff -r 76f7264e7238 -r 63e812f24bbe tests/lib/libc/gen/t_vis.c
--- a/tests/lib/libc/gen/t_vis.c        Thu Jul 07 09:49:59 2011 +0000
+++ b/tests/lib/libc/gen/t_vis.c        Thu Jul 07 10:02:52 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_vis.c,v 1.2 2011/03/12 19:52:48 christos Exp $       */
+/*     $NetBSD: t_vis.c,v 1.3 2011/07/07 10:02:53 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -53,15 +53,14 @@
 
 #define SIZE   256
 
-ATF_TC(vis);
-
-ATF_TC_HEAD(vis, tc)
+ATF_TC(strvis_basic);
+ATF_TC_HEAD(strvis_basic, tc)
 {
 
        atf_tc_set_md_var(tc, "descr", "Test strvis(3)");
 }
 
-ATF_TC_BODY(vis, tc)
+ATF_TC_BODY(strvis_basic, tc)
 {
        char *srcbuf, *dstbuf, *visbuf;
        unsigned int i, j;
@@ -86,7 +85,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 
-       ATF_TP_ADD_TC(tp, vis);
+       ATF_TP_ADD_TC(tp, strvis_basic);
 
        return atf_no_error();
 }



Home | Main Index | Thread Index | Old Index