CVS commit: src/tests/sbin/ifconfig

2020-09-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep  8 06:11:32 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_woptions.sh

Log Message:
disable these tests unless ATF_SBIN_IFCONFIG_WIFI_ENABLE=yes is
in the environment.  they change wifi configuration, restart
wpa_supplicant and hostapd, and, on broken wifi chipsets, may
hang the test run.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_woptions.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_woptions.sh
diff -u src/tests/sbin/ifconfig/t_woptions.sh:1.1 src/tests/sbin/ifconfig/t_woptions.sh:1.2
--- src/tests/sbin/ifconfig/t_woptions.sh:1.1	Sat Jun 27 05:07:08 2020
+++ src/tests/sbin/ifconfig/t_woptions.sh	Tue Sep  8 06:11:32 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_woptions.sh,v 1.1 2020/06/27 05:07:08 jruoho Exp $
+# $NetBSD: t_woptions.sh,v 1.2 2020/09/08 06:11:32 mrg Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,6 +27,14 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
+# These tests play around with the wifi configuration on a system
+# which may not be safe, destroy configuration or hang.
+check_ifconfig_tests_enabled() {
+	if [ "${ATF_SBIN_IFCONFIG_WIFI_ENABLE}" != "yes" ]; then
+		atf_skip "Test triggers real device activity and may destroy configuration or hang."
+	fi
+}
+
 atf_test_case chan
 chan_head() {
 	atf_set "require.user" "root"
@@ -35,6 +43,7 @@ chan_head() {
 }
 
 chan_body() {
+	check_ifconfig_tests_enabled
 
 	# This sequence covers both valid and invalid channels.
 	# Different 802.11 modes are not taken into account, and
@@ -97,6 +106,7 @@ mediaopt_head() {
 }
 
 mediaopt_body() {
+	check_ifconfig_tests_enabled
 
 	# Again, also non-802.11 interfaces are tested.
 	#
@@ -158,6 +168,7 @@ modes_head() {
 }
 
 modes_body() {
+	check_ifconfig_tests_enabled
 
 	# Although 11n is not yet supported, the system
 	# should not panic from invalid input parameters.



CVS commit: src/tests/sbin/ifconfig

2020-09-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep  8 06:11:32 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_woptions.sh

Log Message:
disable these tests unless ATF_SBIN_IFCONFIG_WIFI_ENABLE=yes is
in the environment.  they change wifi configuration, restart
wpa_supplicant and hostapd, and, on broken wifi chipsets, may
hang the test run.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_woptions.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-07-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jul 27 16:57:45 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Skip the repeated_link_addr test by default as it causes the
evbarm-aarch64 testbed to hang (PR port-evbarm/55521), and will not be
safe to run by default even after that bug is fixed, for similar
reasons as t_repeated_updown.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_repeated_link_addr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_link_addr.sh
diff -u src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.3 src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.4
--- src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.3	Mon Jul  6 10:35:00 2020
+++ src/tests/sbin/ifconfig/t_repeated_link_addr.sh	Mon Jul 27 16:57:44 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_link_addr.sh,v 1.3 2020/07/06 10:35:00 jruoho Exp $
+# $NetBSD: t_repeated_link_addr.sh,v 1.4 2020/07/27 16:57:44 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,6 +37,11 @@ repeated_link_addr_head() {
 
 repeated_link_addr_body() {
 
+	if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]
+	then
+		atf_skip "can disrupt networking; also PR port-evbarm/55521"
+	fi
+
 	fail=0
 	addrs="00:11:00:00:00:00 \
 	   00:11:11:00:00:00 \



CVS commit: src/tests/sbin/ifconfig

2020-07-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jul 27 16:57:45 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Skip the repeated_link_addr test by default as it causes the
evbarm-aarch64 testbed to hang (PR port-evbarm/55521), and will not be
safe to run by default even after that bug is fixed, for similar
reasons as t_repeated_updown.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_repeated_link_addr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-07-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jul 27 06:52:48 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_updown.sh

Log Message:
Instead of just skipping interfaces that are "up", skip the whole
repeated_updown test case unless explicitly enabled with "atf-run -v
run_unsafe=yes".  Gratuitously configuring interfaces "up" is no more
safe than gratuitously configuring them "down"; for example, it could
lead to accidentally connecting to an insecure network or diverting
traffic from the desired route.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/sbin/ifconfig/t_repeated_updown.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_updown.sh
diff -u src/tests/sbin/ifconfig/t_repeated_updown.sh:1.4 src/tests/sbin/ifconfig/t_repeated_updown.sh:1.5
--- src/tests/sbin/ifconfig/t_repeated_updown.sh:1.4	Wed Jul 22 05:47:24 2020
+++ src/tests/sbin/ifconfig/t_repeated_updown.sh	Mon Jul 27 06:52:48 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_updown.sh,v 1.4 2020/07/22 05:47:24 martin Exp $
+# $NetBSD: t_repeated_updown.sh,v 1.5 2020/07/27 06:52:48 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,18 +36,25 @@ repeated_updown_head() {
 
 repeated_updown_body() {
 
+	if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]
+	then
+		atf_skip "can disrupt networking; also PR port-evbarm/55504"
+	fi
+
 	# Try to avoid stalling any automated test runs.
 	#
 	n=35
 
 	for i in $(ifconfig -l); do
 
-		# skip all interfaces that are already marked UP
-		ifconfig $i | fgrep -q UP >/dev/null && continue
+		state="up"
+		ifconfig -s $i
 
-		state="down"
-		ifconfig $i up
-		echo "Initialized $i up"
+		if [ $? -eq 1 ]; then
+			state="down"
+			ifconfig $i up
+			echo "Initialized $i up"
+		fi
 
 		while [ $n -gt 0 ]; do
 			ifconfig $i down



CVS commit: src/tests/sbin/ifconfig

2020-07-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jul 27 06:52:48 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_updown.sh

Log Message:
Instead of just skipping interfaces that are "up", skip the whole
repeated_updown test case unless explicitly enabled with "atf-run -v
run_unsafe=yes".  Gratuitously configuring interfaces "up" is no more
safe than gratuitously configuring them "down"; for example, it could
lead to accidentally connecting to an insecure network or diverting
traffic from the desired route.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/sbin/ifconfig/t_repeated_updown.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-07-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 22 05:47:24 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_updown.sh

Log Message:
Skip interfaces that are already UP before the test starts. We can
not change state of the test host this way, it breaks e.g. test systems
with the root filesystem on NFS.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_repeated_updown.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_updown.sh
diff -u src/tests/sbin/ifconfig/t_repeated_updown.sh:1.3 src/tests/sbin/ifconfig/t_repeated_updown.sh:1.4
--- src/tests/sbin/ifconfig/t_repeated_updown.sh:1.3	Sat Jun 27 04:15:17 2020
+++ src/tests/sbin/ifconfig/t_repeated_updown.sh	Wed Jul 22 05:47:24 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_updown.sh,v 1.3 2020/06/27 04:15:17 jruoho Exp $
+# $NetBSD: t_repeated_updown.sh,v 1.4 2020/07/22 05:47:24 martin Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -42,14 +42,12 @@ repeated_updown_body() {
 
 	for i in $(ifconfig -l); do
 
-		state="up"
-		ifconfig -s $i
+		# skip all interfaces that are already marked UP
+		ifconfig $i | fgrep -q UP >/dev/null && continue
 
-		if [ $? -eq 1 ]; then
-			state="down"
-			ifconfig $i up
-			echo "Initialized $i up"
-		fi
+		state="down"
+		ifconfig $i up
+		echo "Initialized $i up"
 
 		while [ $n -gt 0 ]; do
 			ifconfig $i down



CVS commit: src/tests/sbin/ifconfig

2020-07-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 22 05:47:24 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_updown.sh

Log Message:
Skip interfaces that are already UP before the test starts. We can
not change state of the test host this way, it breaks e.g. test systems
with the root filesystem on NFS.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_repeated_updown.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-07-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul  6 10:35:01 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Remove the expected timeout; there is something more sinister behind the
timeouts seen on the Qemu/evbarm-aarch64 runs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_repeated_link_addr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_link_addr.sh
diff -u src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.2 src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.3
--- src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.2	Fri Jul  3 02:51:13 2020
+++ src/tests/sbin/ifconfig/t_repeated_link_addr.sh	Mon Jul  6 10:35:00 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_link_addr.sh,v 1.2 2020/07/03 02:51:13 jruoho Exp $
+# $NetBSD: t_repeated_link_addr.sh,v 1.3 2020/07/06 10:35:00 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,12 +37,6 @@ repeated_link_addr_head() {
 
 repeated_link_addr_body() {
 
-	case $(uname -m) in
-		evbarm)
-			atf_expect_timeout "reason for timeout unknown"
-			;;
-	esac
-
 	fail=0
 	addrs="00:11:00:00:00:00 \
 	   00:11:11:00:00:00 \



CVS commit: src/tests/sbin/ifconfig

2020-07-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul  6 10:35:01 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Remove the expected timeout; there is something more sinister behind the
timeouts seen on the Qemu/evbarm-aarch64 runs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_repeated_link_addr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-07-02 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jul  3 02:51:13 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Expect a timeout for evbarm-aarch64, as seen in the recent Qemu runs.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_repeated_link_addr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_link_addr.sh
diff -u src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.1 src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.2
--- src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.1	Tue Jun 30 11:48:20 2020
+++ src/tests/sbin/ifconfig/t_repeated_link_addr.sh	Fri Jul  3 02:51:13 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_link_addr.sh,v 1.1 2020/06/30 11:48:20 jruoho Exp $
+# $NetBSD: t_repeated_link_addr.sh,v 1.2 2020/07/03 02:51:13 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,6 +37,12 @@ repeated_link_addr_head() {
 
 repeated_link_addr_body() {
 
+	case $(uname -m) in
+		evbarm)
+			atf_expect_timeout "reason for timeout unknown"
+			;;
+	esac
+
 	fail=0
 	addrs="00:11:00:00:00:00 \
 	   00:11:11:00:00:00 \



CVS commit: src/tests/sbin/ifconfig

2020-07-02 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Jul  3 02:51:13 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Expect a timeout for evbarm-aarch64, as seen in the recent Qemu runs.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_repeated_link_addr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-06-27 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jun 27 14:04:17 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_random_garbage.sh

Log Message:
Ups. Fix shell parameter.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_random_garbage.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_random_garbage.sh
diff -u src/tests/sbin/ifconfig/t_random_garbage.sh:1.1 src/tests/sbin/ifconfig/t_random_garbage.sh:1.2
--- src/tests/sbin/ifconfig/t_random_garbage.sh:1.1	Sat Jun 27 13:53:43 2020
+++ src/tests/sbin/ifconfig/t_random_garbage.sh	Sat Jun 27 14:04:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_random_garbage.sh,v 1.1 2020/06/27 13:53:43 jruoho Exp $
+# $NetBSD: t_random_garbage.sh,v 1.2 2020/06/27 14:04:17 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -38,10 +38,10 @@ getrstr() {
 write_garbage() {
 	val=$(getrint)
 	echo "Test $3: write to $1 opt $2 -> $val"
-	ifconfig $1 $opt $val >/dev/null 2>&1
+	ifconfig $1 $2 $val >/dev/null 2>&1
 	val=$(getrstr)
 	echo "Test $3: write to $1 opt $2 -> $val"
-	ifconfig $1 $opt $val >/dev/null 2>&1
+	ifconfig $1 $2 $val >/dev/null 2>&1
 }
 
 atf_test_case random_garbage



CVS commit: src/tests/sbin/ifconfig

2020-06-27 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jun 27 14:04:17 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_random_garbage.sh

Log Message:
Ups. Fix shell parameter.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_random_garbage.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-06-26 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jun 27 04:15:17 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_scan.sh t_repeated_updown.sh

Log Message:
Use atf_pass to avoid test failure in case there are no suitable interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/sbin/ifconfig/t_repeated_scan.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_repeated_updown.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_scan.sh
diff -u src/tests/sbin/ifconfig/t_repeated_scan.sh:1.4 src/tests/sbin/ifconfig/t_repeated_scan.sh:1.5
--- src/tests/sbin/ifconfig/t_repeated_scan.sh:1.4	Thu Jun 25 11:26:05 2020
+++ src/tests/sbin/ifconfig/t_repeated_scan.sh	Sat Jun 27 04:15:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_scan.sh,v 1.4 2020/06/25 11:26:05 jruoho Exp $
+# $NetBSD: t_repeated_scan.sh,v 1.5 2020/06/27 04:15:17 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -81,6 +81,8 @@ repeated_scan_body() {
 
 	/bin/sh /etc/rc.d/hostapd restart >/dev/null 2>&1
 	/bin/sh /etc/rc.d/wpa_supplicant restart >/dev/null 2>&1
+
+	atf_pass
 }
 
 atf_init_test_cases() {

Index: src/tests/sbin/ifconfig/t_repeated_updown.sh
diff -u src/tests/sbin/ifconfig/t_repeated_updown.sh:1.2 src/tests/sbin/ifconfig/t_repeated_updown.sh:1.3
--- src/tests/sbin/ifconfig/t_repeated_updown.sh:1.2	Thu Jun 25 16:34:49 2020
+++ src/tests/sbin/ifconfig/t_repeated_updown.sh	Sat Jun 27 04:15:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_updown.sh,v 1.2 2020/06/25 16:34:49 jruoho Exp $
+# $NetBSD: t_repeated_updown.sh,v 1.3 2020/06/27 04:15:17 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -63,6 +63,8 @@ repeated_updown_body() {
 		echo "Restored state of $i to $state"
 		sleep 1
 	done
+
+	atf_pass
 }
 
 atf_init_test_cases() {



CVS commit: src/tests/sbin/ifconfig

2020-06-26 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jun 27 04:15:17 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_scan.sh t_repeated_updown.sh

Log Message:
Use atf_pass to avoid test failure in case there are no suitable interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/sbin/ifconfig/t_repeated_scan.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_repeated_updown.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 16:57:00 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_tap.sh

Log Message:
Instead of UINT_MAX + 2, test what is claimed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_tap.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 16:57:00 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_tap.sh

Log Message:
Instead of UINT_MAX + 2, test what is claimed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_tap.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_tap.sh
diff -u src/tests/sbin/ifconfig/t_tap.sh:1.3 src/tests/sbin/ifconfig/t_tap.sh:1.4
--- src/tests/sbin/ifconfig/t_tap.sh:1.3	Thu Jun 25 16:52:49 2020
+++ src/tests/sbin/ifconfig/t_tap.sh	Thu Jun 25 16:57:00 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_tap.sh,v 1.3 2020/06/25 16:52:49 jruoho Exp $
+# $NetBSD: t_tap.sh,v 1.4 2020/06/25 16:57:00 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -83,15 +83,15 @@ overflow_head() {
 
 overflow_body() {
 	atf_skip "The test causes a panic (PR kern/53546)"
-	ifconfig tap65537 create
+	ifconfig tap9 create
 }
 
 overflow_cleanup() {
 
-	ifconfig tap65537 create
+	ifconfig tap9
 
 	if [ $? -eq 0 ]; then
-		ifconfig tap65537 destroy
+		ifconfig tap9 destroy
 	fi
 }
 



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 16:52:50 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_tap.sh

Log Message:
Actually create the tap(4) with a negative device number. Doh.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_tap.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_tap.sh
diff -u src/tests/sbin/ifconfig/t_tap.sh:1.2 src/tests/sbin/ifconfig/t_tap.sh:1.3
--- src/tests/sbin/ifconfig/t_tap.sh:1.2	Thu Jun 25 15:43:26 2020
+++ src/tests/sbin/ifconfig/t_tap.sh	Thu Jun 25 16:52:49 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_tap.sh,v 1.2 2020/06/25 15:43:26 jruoho Exp $
+# $NetBSD: t_tap.sh,v 1.3 2020/06/25 16:52:49 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -88,7 +88,7 @@ overflow_body() {
 
 overflow_cleanup() {
 
-	ifconfig tap65537
+	ifconfig tap65537 create
 
 	if [ $? -eq 0 ]; then
 		ifconfig tap65537 destroy



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 16:52:50 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_tap.sh

Log Message:
Actually create the tap(4) with a negative device number. Doh.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_tap.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 16:34:49 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_updown.sh

Log Message:
Reference also PR kern/52526.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_repeated_updown.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_updown.sh
diff -u src/tests/sbin/ifconfig/t_repeated_updown.sh:1.1 src/tests/sbin/ifconfig/t_repeated_updown.sh:1.2
--- src/tests/sbin/ifconfig/t_repeated_updown.sh:1.1	Thu Jun 25 15:41:40 2020
+++ src/tests/sbin/ifconfig/t_repeated_updown.sh	Thu Jun 25 16:34:49 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_updown.sh,v 1.1 2020/06/25 15:41:40 jruoho Exp $
+# $NetBSD: t_repeated_updown.sh,v 1.2 2020/06/25 16:34:49 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -30,8 +30,8 @@
 atf_test_case repeated_updown
 repeated_updown_head() {
 	atf_set "require.user" "root"
-	atf_set "descr" "Test with ifconfig(8) that repeated " \
-		"up/down does not cause a panic (PR kern/52771)"
+	atf_set "descr" "Test with ifconfig(8) that repeated up/down " \
+		"does not cause a panic (PR kern/52526; PR kern/52771)"
 }
 
 repeated_updown_body() {



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 16:34:49 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_updown.sh

Log Message:
Reference also PR kern/52526.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_repeated_updown.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 11:26:05 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_scan.sh

Log Message:
Reference also PR kern/53860.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_repeated_scan.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_scan.sh
diff -u src/tests/sbin/ifconfig/t_repeated_scan.sh:1.3 src/tests/sbin/ifconfig/t_repeated_scan.sh:1.4
--- src/tests/sbin/ifconfig/t_repeated_scan.sh:1.3	Thu Jun 25 10:34:34 2020
+++ src/tests/sbin/ifconfig/t_repeated_scan.sh	Thu Jun 25 11:26:05 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_scan.sh,v 1.3 2020/06/25 10:34:34 jruoho Exp $
+# $NetBSD: t_repeated_scan.sh,v 1.4 2020/06/25 11:26:05 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -31,7 +31,7 @@ atf_test_case repeated_scan
 repeated_scan_head() {
 	atf_set "require.user" "root"
 	atf_set "descr" "Test with ifconfig(8) that repeated 802.11 " \
-		"scanning does not cause a panic (PR kern/55389)"
+		"scanning does not panic (PR kern/53860; PR kern/55389)"
 }
 
 repeated_scan_body() {



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 11:26:05 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_scan.sh

Log Message:
Reference also PR kern/53860.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_repeated_scan.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 10:34:34 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_scan.sh

Log Message:
Require root privileges.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_repeated_scan.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_scan.sh
diff -u src/tests/sbin/ifconfig/t_repeated_scan.sh:1.2 src/tests/sbin/ifconfig/t_repeated_scan.sh:1.3
--- src/tests/sbin/ifconfig/t_repeated_scan.sh:1.2	Wed Jun 24 10:07:13 2020
+++ src/tests/sbin/ifconfig/t_repeated_scan.sh	Thu Jun 25 10:34:34 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_scan.sh,v 1.2 2020/06/24 10:07:13 jruoho Exp $
+# $NetBSD: t_repeated_scan.sh,v 1.3 2020/06/25 10:34:34 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -29,6 +29,7 @@
 
 atf_test_case repeated_scan
 repeated_scan_head() {
+	atf_set "require.user" "root"
 	atf_set "descr" "Test with ifconfig(8) that repeated 802.11 " \
 		"scanning does not cause a panic (PR kern/55389)"
 }



CVS commit: src/tests/sbin/ifconfig

2020-06-25 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Jun 25 10:34:34 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_scan.sh

Log Message:
Require root privileges.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_repeated_scan.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/sbin/ifconfig

2012-03-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Mar 17 17:39:44 UTC 2012

Modified Files:
src/tests/sbin/ifconfig: t_nonexistent.sh

Log Message:
Add '-e ignore to atf-check(1) and remove xfail. Pointed by njoly@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 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/tests/sbin/ifconfig/t_nonexistent.sh
diff -u src/tests/sbin/ifconfig/t_nonexistent.sh:1.2 src/tests/sbin/ifconfig/t_nonexistent.sh:1.3
--- src/tests/sbin/ifconfig/t_nonexistent.sh:1.2	Wed May 11 22:08:12 2011
+++ src/tests/sbin/ifconfig/t_nonexistent.sh	Sat Mar 17 17:39:44 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_nonexistent.sh,v 1.2 2011/05/11 22:08:12 njoly Exp $
+# $NetBSD: t_nonexistent.sh,v 1.3 2012/03/17 17:39:44 jruoho Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -35,9 +35,10 @@ nonexistent_head() {
 
 nonexistent_body() {
 
-	atf_expect_fail PR bin/43141
-
-	atf_check -s not-exit:0 ifconfig nonexistent0 1.2.3.4/24
+	# Cf. PR bin/43141.
+	#
+	atf_check -s not-exit:0 -e ignore \
+		ifconfig nonexistent0 1.2.3.4/24
 }
 
 atf_init_test_cases() {



CVS commit: src/tests/sbin/ifconfig

2012-03-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Mar 17 17:39:44 UTC 2012

Modified Files:
src/tests/sbin/ifconfig: t_nonexistent.sh

Log Message:
Add '-e ignore to atf-check(1) and remove xfail. Pointed by njoly@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 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.