Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add a test for non-critical/low PR bin/43141.
details: https://anonhg.NetBSD.org/src/rev/7dff9305c697
branches: trunk
changeset: 764756:7dff9305c697
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue May 03 06:13:06 2011 +0000
description:
Add a test for non-critical/low PR bin/43141.
diffstat:
distrib/sets/lists/tests/mi | 5 +++-
etc/mtree/NetBSD.dist.tests | 3 +-
tests/sbin/Makefile | 4 +-
tests/sbin/ifconfig/Makefile | 9 ++++++
tests/sbin/ifconfig/t_nonexistent.sh | 47 ++++++++++++++++++++++++++++++++++++
5 files changed, 64 insertions(+), 4 deletions(-)
diffs (116 lines):
diff -r 4cb931ad8fec -r 7dff9305c697 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Tue May 03 04:50:30 2011 +0000
+++ b/distrib/sets/lists/tests/mi Tue May 03 06:13:06 2011 +0000
@@ -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
diff -r 4cb931ad8fec -r 7dff9305c697 etc/mtree/NetBSD.dist.tests
--- a/etc/mtree/NetBSD.dist.tests Tue May 03 04:50:30 2011 +0000
+++ b/etc/mtree/NetBSD.dist.tests Tue May 03 06:13:06 2011 +0000
@@ -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
diff -r 4cb931ad8fec -r 7dff9305c697 tests/sbin/Makefile
--- a/tests/sbin/Makefile Tue May 03 04:50:30 2011 +0000
+++ b/tests/sbin/Makefile Tue May 03 06:13:06 2011 +0000
@@ -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>
diff -r 4cb931ad8fec -r 7dff9305c697 tests/sbin/ifconfig/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sbin/ifconfig/Makefile Tue May 03 06:13:06 2011 +0000
@@ -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>
diff -r 4cb931ad8fec -r 7dff9305c697 tests/sbin/ifconfig/t_nonexistent.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sbin/ifconfig/t_nonexistent.sh Tue May 03 06:13:06 2011 +0000
@@ -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
+}
Home |
Main Index |
Thread Index |
Old Index