Source-Changes-HG archive

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

[src/trunk]: src Verify that PR bin/42628 is no longer an issue.



details:   https://anonhg.NetBSD.org/src/rev/18e2a0e1a251
branches:  trunk
changeset: 764757:18e2a0e1a251
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue May 03 07:23:19 2011 +0000

description:
Verify that PR bin/42628 is no longer an issue.

diffstat:

 distrib/sets/lists/tests/mi       |   7 ++++-
 etc/mtree/NetBSD.dist.tests       |   3 +-
 tests/usr.bin/Makefile            |   4 +-
 tests/usr.bin/unifdef/Makefile    |   9 +++++++
 tests/usr.bin/unifdef/d_basic.in  |  25 ++++++++++++++++++++
 tests/usr.bin/unifdef/d_basic.out |   6 ++++
 tests/usr.bin/unifdef/t_basic.sh  |  48 +++++++++++++++++++++++++++++++++++++++
 7 files changed, 98 insertions(+), 4 deletions(-)

diffs (158 lines):

diff -r 7dff9305c697 -r 18e2a0e1a251 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Tue May 03 06:13:06 2011 +0000
+++ b/distrib/sets/lists/tests/mi       Tue May 03 07:23:19 2011 +0000
@@ -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
diff -r 7dff9305c697 -r 18e2a0e1a251 etc/mtree/NetBSD.dist.tests
--- a/etc/mtree/NetBSD.dist.tests       Tue May 03 06:13:06 2011 +0000
+++ b/etc/mtree/NetBSD.dist.tests       Tue May 03 07:23:19 2011 +0000
@@ -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
diff -r 7dff9305c697 -r 18e2a0e1a251 tests/usr.bin/Makefile
--- a/tests/usr.bin/Makefile    Tue May 03 06:13:06 2011 +0000
+++ b/tests/usr.bin/Makefile    Tue May 03 07:23:19 2011 +0000
@@ -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>
diff -r 7dff9305c697 -r 18e2a0e1a251 tests/usr.bin/unifdef/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/unifdef/Makefile    Tue May 03 07:23:19 2011 +0000
@@ -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>
diff -r 7dff9305c697 -r 18e2a0e1a251 tests/usr.bin/unifdef/d_basic.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/unifdef/d_basic.in  Tue May 03 07:23:19 2011 +0000
@@ -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
diff -r 7dff9305c697 -r 18e2a0e1a251 tests/usr.bin/unifdef/d_basic.out
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/unifdef/d_basic.out Tue May 03 07:23:19 2011 +0000
@@ -0,0 +1,6 @@
+#include <net/if_fddi.h>
+
+#include <stdint.h>
+
+
+#include <inttypes.h>
diff -r 7dff9305c697 -r 18e2a0e1a251 tests/usr.bin/unifdef/t_basic.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/unifdef/t_basic.sh  Tue May 03 07:23:19 2011 +0000
@@ -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
+}



Home | Main Index | Thread Index | Old Index