Module Name: src
Committed By: jruoho
Date: Tue May 3 07:23:19 UTC 2011
Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/unifdef: Makefile d_basic.in d_basic.out t_basic.sh
Log Message:
Verify that PR bin/42628 is no longer an issue.
To generate a diff of this commit:
cvs rdiff -u -r1.322 -r1.323 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.42 -r1.43 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/unifdef/Makefile \
src/tests/usr.bin/unifdef/d_basic.in \
src/tests/usr.bin/unifdef/d_basic.out \
src/tests/usr.bin/unifdef/t_basic.sh
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.322 src/distrib/sets/lists/tests/mi:1.323
--- src/distrib/sets/lists/tests/mi:1.322 Tue May 3 06:13:06 2011
+++ src/distrib/sets/lists/tests/mi Tue May 3 07:23:19 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.322 2011/05/03 06:13:06 jruoho Exp $
+# $NetBSD: mi,v 1.323 2011/05/03 07:23:19 jruoho Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -2320,6 +2320,11 @@
./usr/tests/usr.bin/shmif_dumpbus/d_pkthdrs.out.bz2.uue tests-util-tests atf
./usr/tests/usr.bin/shmif_dumpbus/shmbus.bz2.uue tests-util-tests atf
./usr/tests/usr.bin/shmif_dumpbus/t_basic tests-util-tests atf
+./usr/tests/usr.bin/unifdef tests-util-tests
+./usr/tests/usr.bin/unifdef/Atffile tests-util-tests atf
+./usr/tests/usr.bin/unifdef/d_basic.in tests-util-tests atf
+./usr/tests/usr.bin/unifdef/d_basic.out tests-util-tests atf
+./usr/tests/usr.bin/unifdef/t_basic tests-util-tests atf
./usr/tests/usr.sbin tests-util-tests
./usr/tests/usr.sbin/Atffile tests-sbin-tests atf
./usr/tests/usr.sbin/traceroute tests-util-tests
Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.42 src/etc/mtree/NetBSD.dist.tests:1.43
--- src/etc/mtree/NetBSD.dist.tests:1.42 Tue May 3 06:13:06 2011
+++ src/etc/mtree/NetBSD.dist.tests Tue May 3 07:23:19 2011
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.dist.tests,v 1.42 2011/05/03 06:13:06 jruoho Exp $
+# $NetBSD: NetBSD.dist.tests,v 1.43 2011/05/03 07:23:19 jruoho Exp $
./usr/libdata/debug/usr/tests
./usr/libdata/debug/usr/tests/atf
@@ -239,6 +239,7 @@
./usr/tests/usr.bin
./usr/tests/usr.bin/rump_server
./usr/tests/usr.bin/shmif_dumpbus
+./usr/tests/usr.bin/unifdef
./usr/tests/usr.sbin
./usr/tests/usr.sbin/traceroute
./usr/tests/util
Index: src/tests/usr.bin/Makefile
diff -u src/tests/usr.bin/Makefile:1.2 src/tests/usr.bin/Makefile:1.3
--- src/tests/usr.bin/Makefile:1.2 Thu Mar 10 11:13:33 2011
+++ src/tests/usr.bin/Makefile Tue May 3 07:23:19 2011
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.2 2011/03/10 11:13:33 pooka Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/03 07:23:19 jruoho Exp $
#
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/usr.bin
-TESTS_SUBDIRS+= rump_server shmif_dumpbus
+TESTS_SUBDIRS+= rump_server shmif_dumpbus unifdef
.include <bsd.test.mk>
Added files:
Index: src/tests/usr.bin/unifdef/Makefile
diff -u /dev/null src/tests/usr.bin/unifdef/Makefile:1.1
--- /dev/null Tue May 3 07:23:19 2011
+++ src/tests/usr.bin/unifdef/Makefile Tue May 3 07:23:19 2011
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2011/05/03 07:23:19 jruoho Exp $
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/unifdef
+
+TESTS_SH= t_basic
+
+.include <bsd.test.mk>
Index: src/tests/usr.bin/unifdef/d_basic.in
diff -u /dev/null src/tests/usr.bin/unifdef/d_basic.in:1.1
--- /dev/null Tue May 3 07:23:19 2011
+++ src/tests/usr.bin/unifdef/d_basic.in Tue May 3 07:23:19 2011
@@ -0,0 +1,25 @@
+#if defined(__FreeBSD__)
+#include <netinet/if_fddi.h>
+#else
+#include <net/if_fddi.h>
+#endif
+
+#if defined(__FreeBSD__)
+ #include <stdbool.h>
+ #include <stdbool.h>
+ #include <stdbool.h>
+ #include <stdbool.h>
+ #include <stdbool.h>
+ #include <stdbool.h>
+#else
+#include <stdint.h>
+#endif
+
+#if defined(__FreeBSD__)
+#endif
+
+#ifdef __FreeBSD__
+#include <unistd.h>
+#else
+#include <inttypes.h>
+#endif
Index: src/tests/usr.bin/unifdef/d_basic.out
diff -u /dev/null src/tests/usr.bin/unifdef/d_basic.out:1.1
--- /dev/null Tue May 3 07:23:19 2011
+++ src/tests/usr.bin/unifdef/d_basic.out Tue May 3 07:23:19 2011
@@ -0,0 +1,6 @@
+#include <net/if_fddi.h>
+
+#include <stdint.h>
+
+
+#include <inttypes.h>
Index: src/tests/usr.bin/unifdef/t_basic.sh
diff -u /dev/null src/tests/usr.bin/unifdef/t_basic.sh:1.1
--- /dev/null Tue May 3 07:23:19 2011
+++ src/tests/usr.bin/unifdef/t_basic.sh Tue May 3 07:23:19 2011
@@ -0,0 +1,48 @@
+#! /usr/bin/atf-sh
+#
+# $NetBSD: t_basic.sh,v 1.1 2011/05/03 07:23:19 jruoho Exp $
+#
+# Copyright (c) 2011 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Jukka Ruohonen.
+#
+# 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+#
+
+atf_test_case basic
+nonexistent_head() {
+ atf_set "descr" "A basic test of unifdef(1)"
+}
+
+basic_body() {
+
+ # See PR bin/42628.
+ #
+ atf_check -s ignore -o file:$(atf_get_srcdir)/d_basic.out \
+ -x "unifdef -U__FreeBSD__ $(atf_get_srcdir)/d_basic.in"
+}
+
+atf_init_test_cases() {
+ atf_add_test_case basic
+}