1*57718be8SEnji Cooper /* $NetBSD: t_syslog.c,v 1.2 2012/03/18 07:00:51 jruoho Exp $ */ 2*57718be8SEnji Cooper 3*57718be8SEnji Cooper /*- 4*57718be8SEnji Cooper * Copyright (c) 2010 The NetBSD Foundation, Inc. 5*57718be8SEnji Cooper * All rights reserved. 6*57718be8SEnji Cooper * 7*57718be8SEnji Cooper * Redistribution and use in source and binary forms, with or without 8*57718be8SEnji Cooper * modification, are permitted provided that the following conditions 9*57718be8SEnji Cooper * are met: 10*57718be8SEnji Cooper * 1. Redistributions of source code must retain the above copyright 11*57718be8SEnji Cooper * notice, this list of conditions and the following disclaimer. 12*57718be8SEnji Cooper * 2. Redistributions in binary form must reproduce the above copyright 13*57718be8SEnji Cooper * notice, this list of conditions and the following disclaimer in 14*57718be8SEnji Cooper * the documentation and/or other materials provided with the 15*57718be8SEnji Cooper * distribution. 16*57718be8SEnji Cooper * 17*57718be8SEnji Cooper * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18*57718be8SEnji Cooper * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19*57718be8SEnji Cooper * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20*57718be8SEnji Cooper * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 21*57718be8SEnji Cooper * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22*57718be8SEnji Cooper * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 23*57718be8SEnji Cooper * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24*57718be8SEnji Cooper * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 25*57718be8SEnji Cooper * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26*57718be8SEnji Cooper * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 27*57718be8SEnji Cooper * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28*57718be8SEnji Cooper * SUCH DAMAGE. 29*57718be8SEnji Cooper */ 30*57718be8SEnji Cooper 31*57718be8SEnji Cooper #include <sys/types.h> 32*57718be8SEnji Cooper 33*57718be8SEnji Cooper #include <atf-c.h> 34*57718be8SEnji Cooper #include <syslog.h> 35*57718be8SEnji Cooper 36*57718be8SEnji Cooper ATF_TC(syslog_pthread); 37*57718be8SEnji Cooper ATF_TC_HEAD(syslog_pthread, tc) 38*57718be8SEnji Cooper { 39*57718be8SEnji Cooper 40*57718be8SEnji Cooper atf_tc_set_md_var(tc, "descr", "Test that syslog(3) " 41*57718be8SEnji Cooper "works when linked to pthread(3) (PR lib/44248)"); 42*57718be8SEnji Cooper atf_tc_set_md_var(tc, "timeout", "2"); 43*57718be8SEnji Cooper } 44*57718be8SEnji Cooper 45*57718be8SEnji Cooper ATF_TC_BODY(syslog_pthread, tc) 46*57718be8SEnji Cooper { 47*57718be8SEnji Cooper syslog(LOG_DEBUG, "from tests/lib/libc/gen/t_syslog"); 48*57718be8SEnji Cooper } 49*57718be8SEnji Cooper 50*57718be8SEnji Cooper ATF_TP_ADD_TCS(tp) 51*57718be8SEnji Cooper { 52*57718be8SEnji Cooper 53*57718be8SEnji Cooper ATF_TP_ADD_TC(tp, syslog_pthread); 54*57718be8SEnji Cooper 55*57718be8SEnji Cooper return atf_no_error(); 56*57718be8SEnji Cooper } 57