Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Test that sysctl(8) does not segfault, as reported by pgoyet...
details: https://anonhg.NetBSD.org/src/rev/0127f4d59807
branches: trunk
changeset: 778715:0127f4d59807
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue Apr 10 02:39:33 2012 +0000
description:
Test that sysctl(8) does not segfault, as reported by pgoyette@ on current
users.
diffstat:
distrib/sets/lists/tests/mi | 3 +-
tests/sbin/sysctl/Makefile | 4 +-
tests/sbin/sysctl/t_sysctl.sh | 44 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+), 3 deletions(-)
diffs (80 lines):
diff -r 6c7f0d611fde -r 0127f4d59807 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Mon Apr 09 23:18:31 2012 +0000
+++ b/distrib/sets/lists/tests/mi Tue Apr 10 02:39:33 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.462 2012/03/30 09:27:10 jruoho Exp $
+# $NetBSD: mi,v 1.463 2012/04/10 02:39:34 jruoho Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -2897,6 +2897,7 @@
./usr/tests/sbin/sysctl tests-sbin-tests
./usr/tests/sbin/sysctl/Atffile tests-sbin-tests atf
./usr/tests/sbin/sysctl/t_perm tests-sbin-tests atf
+./usr/tests/sbin/sysctl/t_sysctl 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
diff -r 6c7f0d611fde -r 0127f4d59807 tests/sbin/sysctl/Makefile
--- a/tests/sbin/sysctl/Makefile Mon Apr 09 23:18:31 2012 +0000
+++ b/tests/sbin/sysctl/Makefile Tue Apr 10 02:39:33 2012 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.1 2011/05/09 17:53:54 jruoho Exp $
+# $NetBSD: Makefile,v 1.2 2012/04/10 02:39:33 jruoho Exp $
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/sbin/sysctl
-TESTS_SH= t_perm
+TESTS_SH= t_perm t_sysctl
.include <bsd.test.mk>
diff -r 6c7f0d611fde -r 0127f4d59807 tests/sbin/sysctl/t_sysctl.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sbin/sysctl/t_sysctl.sh Tue Apr 10 02:39:33 2012 +0000
@@ -0,0 +1,44 @@
+# $NetBSD: t_sysctl.sh,v 1.1 2012/04/10 02:39:33 jruoho Exp $
+#
+# Copyright (c) 2012 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
+basic_head() {
+ atf_set "descr" "Test that sysctl(8) works"
+}
+
+basic_body() {
+
+ atf_check -s exit:0 -o ignore -e empty -x "sysctl -a"
+}
+
+atf_init_test_cases() {
+
+ atf_add_test_case basic
+}
Home |
Main Index |
Thread Index |
Old Index