Module Name: src
Committed By: jruoho
Date: Tue May 3 06:13:06 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/ifconfig: Makefile t_nonexistent.sh
Log Message:
Add a test for non-critical/low PR bin/43141.
To generate a diff of this commit:
cvs rdiff -u -r1.321 -r1.322 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.41 -r1.42 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/sbin/ifconfig/Makefile \
src/tests/sbin/ifconfig/t_nonexistent.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.321 src/distrib/sets/lists/tests/mi:1.322
--- src/distrib/sets/lists/tests/mi:1.321 Tue May 3 04:50:30 2011
+++ src/distrib/sets/lists/tests/mi Tue May 3 06:13:06 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.321 2011/05/03 04:50:30 jruoho Exp $
+# $NetBSD: mi,v 1.322 2011/05/03 06:13:06 jruoho Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -2258,6 +2258,9 @@
./usr/tests/sbin/fsck_ffs/Atffile tests-sbin-tests atf
./usr/tests/sbin/fsck_ffs/t_check_quotas tests-sbin-tests atf
./usr/tests/sbin/fsck_ffs/t_enable_quotas tests-sbin-tests atf
+./usr/tests/sbin/ifconfig tests-sbin-tests
+./usr/tests/sbin/ifconfig/Atffile tests-sbin-tests atf
+./usr/tests/sbin/ifconfig/t_nonexistent tests-sbin-tests atf
./usr/tests/sbin/newfs tests-sbin-tests
./usr/tests/sbin/newfs/Atffile tests-sbin-tests atf
./usr/tests/sbin/newfs/t_enable_quotas tests-sbin-tests atf
Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.41 src/etc/mtree/NetBSD.dist.tests:1.42
--- src/etc/mtree/NetBSD.dist.tests:1.41 Mon May 2 11:55:15 2011
+++ src/etc/mtree/NetBSD.dist.tests Tue May 3 06:13:06 2011
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.dist.tests,v 1.41 2011/05/02 11:55:15 njoly Exp $
+# $NetBSD: NetBSD.dist.tests,v 1.42 2011/05/03 06:13:06 jruoho Exp $
./usr/libdata/debug/usr/tests
./usr/libdata/debug/usr/tests/atf
@@ -228,6 +228,7 @@
./usr/tests/rump/rumpvfs
./usr/tests/sbin
./usr/tests/sbin/fsck_ffs
+./usr/tests/sbin/ifconfig
./usr/tests/sbin/newfs
./usr/tests/sbin/resize_ffs
./usr/tests/sys
Index: src/tests/sbin/Makefile
diff -u src/tests/sbin/Makefile:1.2 src/tests/sbin/Makefile:1.3
--- src/tests/sbin/Makefile:1.2 Sun Mar 6 17:08:41 2011
+++ src/tests/sbin/Makefile Tue May 3 06:13:06 2011
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.2 2011/03/06 17:08:41 bouyer Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/03 06:13:06 jruoho Exp $
#
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/sbin
-TESTS_SUBDIRS+= fsck_ffs newfs resize_ffs
+TESTS_SUBDIRS+= fsck_ffs ifconfig newfs resize_ffs
.include <bsd.test.mk>
Added files:
Index: src/tests/sbin/ifconfig/Makefile
diff -u /dev/null src/tests/sbin/ifconfig/Makefile:1.1
--- /dev/null Tue May 3 06:13:06 2011
+++ src/tests/sbin/ifconfig/Makefile Tue May 3 06:13:06 2011
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2011/05/03 06:13:06 jruoho Exp $
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/sbin/ifconfig
+
+TESTS_SH= t_nonexistent
+
+.include <bsd.test.mk>
Index: src/tests/sbin/ifconfig/t_nonexistent.sh
diff -u /dev/null src/tests/sbin/ifconfig/t_nonexistent.sh:1.1
--- /dev/null Tue May 3 06:13:06 2011
+++ src/tests/sbin/ifconfig/t_nonexistent.sh Tue May 3 06:13:06 2011
@@ -0,0 +1,47 @@
+#! /usr/bin/atf-sh
+#
+# $NetBSD: t_nonexistent.sh,v 1.1 2011/05/03 06:13:06 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 nonexistent
+nonexistent_head() {
+ atf_set "descr" "Check ifconfig(8) with nonexistent interface"
+}
+
+nonexistent_body() {
+
+ atf_expect_fail "PR bin/43141"
+
+ atf_check -s not-exit:0 ifconfig nonexistent0 1.2.3.4/24
+}
+
+atf_init_test_cases() {
+ atf_add_test_case nonexistent
+}