Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src A test for non-critical/low PR bin/42179.
details: https://anonhg.NetBSD.org/src/rev/d308d0c7d595
branches: trunk
changeset: 764758:d308d0c7d595
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue May 03 07:56:42 2011 +0000
description:
A test for non-critical/low PR bin/42179.
diffstat:
distrib/sets/lists/tests/mi | 9 +++++--
etc/mtree/NetBSD.dist.tests | 3 +-
tests/sbin/Makefile | 4 +-
tests/sbin/route/Makefile | 9 +++++++
tests/sbin/route/t_missing.sh | 49 +++++++++++++++++++++++++++++++++++++++++++
5 files changed, 68 insertions(+), 6 deletions(-)
diffs (122 lines):
diff -r 18e2a0e1a251 -r d308d0c7d595 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Tue May 03 07:23:19 2011 +0000
+++ b/distrib/sets/lists/tests/mi Tue May 03 07:56:42 2011 +0000
@@ -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
diff -r 18e2a0e1a251 -r d308d0c7d595 etc/mtree/NetBSD.dist.tests
--- a/etc/mtree/NetBSD.dist.tests Tue May 03 07:23:19 2011 +0000
+++ b/etc/mtree/NetBSD.dist.tests Tue May 03 07:56:42 2011 +0000
@@ -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
diff -r 18e2a0e1a251 -r d308d0c7d595 tests/sbin/Makefile
--- a/tests/sbin/Makefile Tue May 03 07:23:19 2011 +0000
+++ b/tests/sbin/Makefile Tue May 03 07:56:42 2011 +0000
@@ -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>
diff -r 18e2a0e1a251 -r d308d0c7d595 tests/sbin/route/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sbin/route/Makefile Tue May 03 07:56:42 2011 +0000
@@ -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>
diff -r 18e2a0e1a251 -r d308d0c7d595 tests/sbin/route/t_missing.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sbin/route/t_missing.sh Tue May 03 07:56:42 2011 +0000
@@ -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
+}
Home |
Main Index |
Thread Index |
Old Index