Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen Add an isolated test case for PR lib/44248.
details: https://anonhg.NetBSD.org/src/rev/e7a1ae74ea70
branches: trunk
changeset: 759830:e7a1ae74ea70
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Dec 17 19:12:30 2010 +0000
description:
Add an isolated test case for PR lib/44248.
diffstat:
tests/lib/libc/gen/Makefile | 5 ++-
tests/lib/libc/gen/t_syslog_pthread.c | 56 +++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 1 deletions(-)
diffs (77 lines):
diff -r 17f95921b154 -r e7a1ae74ea70 tests/lib/libc/gen/Makefile
--- a/tests/lib/libc/gen/Makefile Fri Dec 17 14:51:27 2010 +0000
+++ b/tests/lib/libc/gen/Makefile Fri Dec 17 19:12:30 2010 +0000
@@ -1,9 +1,12 @@
-# $NetBSD: Makefile,v 1.1 2010/09/06 14:41:21 christos Exp $
+# $NetBSD: Makefile,v 1.2 2010/12/17 19:12:30 pooka Exp $
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/lib/libc/gen
TESTS_C+= t_glob_star
+TESTS_C+= t_syslog_pthread
+
+LDADD.t_syslog_pthread+=-lpthread
.include <bsd.test.mk>
diff -r 17f95921b154 -r e7a1ae74ea70 tests/lib/libc/gen/t_syslog_pthread.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libc/gen/t_syslog_pthread.c Fri Dec 17 19:12:30 2010 +0000
@@ -0,0 +1,56 @@
+/* $NetBSD: t_syslog_pthread.c,v 1.1 2010/12/17 19:12:30 pooka 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(basic);
+ATF_TC_HEAD(basic, 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(basic, 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, basic);
+
+ return atf_no_error();
+}
Home |
Main Index |
Thread Index |
Old Index