Module Name: src
Committed By: jruoho
Date: Thu Jul 7 10:02:53 UTC 2011
Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/gen: Makefile t_vis.c
Added Files:
src/tests/lib/libc/gen: t_syslog.c
Removed Files:
src/tests/lib/libc/gen: t_syslog_pthread.c
Log Message:
Move 't_syslog_pthread' to 't_syslog' for consistency with libc.
To generate a diff of this commit:
cvs rdiff -u -r1.368 -r1.369 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.26 -r1.27 src/tests/lib/libc/gen/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/t_syslog.c
cvs rdiff -u -r1.3 -r0 src/tests/lib/libc/gen/t_syslog_pthread.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_vis.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.368 src/distrib/sets/lists/tests/mi:1.369
--- src/distrib/sets/lists/tests/mi:1.368 Thu Jul 7 08:59:30 2011
+++ src/distrib/sets/lists/tests/mi Thu Jul 7 10:02:52 2011
@@ -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
Index: src/tests/lib/libc/gen/Makefile
diff -u src/tests/lib/libc/gen/Makefile:1.26 src/tests/lib/libc/gen/Makefile:1.27
--- src/tests/lib/libc/gen/Makefile:1.26 Tue Jun 14 05:25:21 2011
+++ src/tests/lib/libc/gen/Makefile Thu Jul 7 10:02:53 2011
@@ -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>
Index: src/tests/lib/libc/gen/t_vis.c
diff -u src/tests/lib/libc/gen/t_vis.c:1.2 src/tests/lib/libc/gen/t_vis.c:1.3
--- src/tests/lib/libc/gen/t_vis.c:1.2 Sat Mar 12 19:52:48 2011
+++ src/tests/lib/libc/gen/t_vis.c Thu Jul 7 10:02:53 2011
@@ -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();
}
Added files:
Index: src/tests/lib/libc/gen/t_syslog.c
diff -u /dev/null src/tests/lib/libc/gen/t_syslog.c:1.1
--- /dev/null Thu Jul 7 10:02:53 2011
+++ src/tests/lib/libc/gen/t_syslog.c Thu Jul 7 10:02:53 2011
@@ -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();
+}