Module Name:    src
Committed By:   jruoho
Date:           Tue May  3 07:56:42 UTC 2011

Modified Files:
        src/distrib/sets/lists/tests: mi
        src/etc/mtree: NetBSD.dist.tests
        src/tests/sbin: Makefile
Added Files:
        src/tests/sbin/route: Makefile t_missing.sh

Log Message:
A test for non-critical/low PR bin/42179.


To generate a diff of this commit:
cvs rdiff -u -r1.323 -r1.324 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.43 -r1.44 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/sbin/route/Makefile \
    src/tests/sbin/route/t_missing.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.323 src/distrib/sets/lists/tests/mi:1.324
--- src/distrib/sets/lists/tests/mi:1.323	Tue May  3 07:23:19 2011
+++ src/distrib/sets/lists/tests/mi	Tue May  3 07:56:42 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.323 2011/05/03 07:23:19 jruoho Exp $
+# $NetBSD: mi,v 1.324 2011/05/03 07:56:42 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2273,8 +2273,11 @@
 ./usr/tests/sbin/resize_ffs/t_shrink_swapped	tests-sbin-tests	atf
 ./usr/tests/sbin/resize_ffs/testdata.md5	tests-sbin-tests	atf
 ./usr/tests/sbin/resize_ffs/testdata.tar.gz.base64	tests-sbin-tests	atf
-./usr/tests/sys				tests-sys-tests
-./usr/tests/sys/Atffile			tests-sys-tests	atf
+./usr/tests/sbin/route				tests-sbin-tests
+./usr/tests/sbin/route/Atffile			tests-sbin-tests	atf
+./usr/tests/sbin/route/t_missing		tests-sbin-tests	atf
+./usr/tests/sys					tests-sys-tests
+./usr/tests/sys/Atffile				tests-sys-tests	atf
 ./usr/tests/sys/rc				tests-sys-tests
 ./usr/tests/sys/rc/Atffile			tests-sys-tests	atf
 ./usr/tests/sys/rc/h_args			tests-sys-tests	atf

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.43 src/etc/mtree/NetBSD.dist.tests:1.44
--- src/etc/mtree/NetBSD.dist.tests:1.43	Tue May  3 07:23:19 2011
+++ src/etc/mtree/NetBSD.dist.tests	Tue May  3 07:56:42 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.43 2011/05/03 07:23:19 jruoho Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.44 2011/05/03 07:56:42 jruoho Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -231,6 +231,7 @@
 ./usr/tests/sbin/ifconfig
 ./usr/tests/sbin/newfs
 ./usr/tests/sbin/resize_ffs
+./usr/tests/sbin/route
 ./usr/tests/sys
 ./usr/tests/sys/rc
 ./usr/tests/syscall

Index: src/tests/sbin/Makefile
diff -u src/tests/sbin/Makefile:1.3 src/tests/sbin/Makefile:1.4
--- src/tests/sbin/Makefile:1.3	Tue May  3 06:13:06 2011
+++ src/tests/sbin/Makefile	Tue May  3 07:56:42 2011
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.3 2011/05/03 06:13:06 jruoho Exp $
+#	$NetBSD: Makefile,v 1.4 2011/05/03 07:56:42 jruoho Exp $
 #
 
 .include <bsd.own.mk>
 
 TESTSDIR=	${TESTSBASE}/sbin
 
-TESTS_SUBDIRS+=	fsck_ffs ifconfig newfs resize_ffs
+TESTS_SUBDIRS+=	fsck_ffs ifconfig newfs resize_ffs route
 
 .include <bsd.test.mk>

Added files:

Index: src/tests/sbin/route/Makefile
diff -u /dev/null src/tests/sbin/route/Makefile:1.1
--- /dev/null	Tue May  3 07:56:42 2011
+++ src/tests/sbin/route/Makefile	Tue May  3 07:56:42 2011
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2011/05/03 07:56:42 jruoho Exp $
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/sbin/route
+
+TESTS_SH=	t_missing
+
+.include <bsd.test.mk>
Index: src/tests/sbin/route/t_missing.sh
diff -u /dev/null src/tests/sbin/route/t_missing.sh:1.1
--- /dev/null	Tue May  3 07:56:42 2011
+++ src/tests/sbin/route/t_missing.sh	Tue May  3 07:56:42 2011
@@ -0,0 +1,49 @@
+#! /usr/bin/atf-sh
+#
+# $NetBSD: t_missing.sh,v 1.1 2011/05/03 07:56:42 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 missing
+missing_head() {
+	atf_set "descr" "Check route(8) with a missing argument"
+}
+
+missing_body() {
+
+	atf_expect_fail "PR bin/42179"
+
+	atf_check -s exit:1 \
+	-e not-inline:"route: writing to routing socket: Invalid argument\n" \
+	route -n get
+}
+
+atf_init_test_cases() {
+	atf_add_test_case missing
+}

Reply via email to