Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net/if_vlan Add tests of vlan with bridge
details: https://anonhg.NetBSD.org/src/rev/ae050f4158dd
branches: trunk
changeset: 362464:ae050f4158dd
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Jun 12 04:21:22 2018 +0000
description:
Add tests of vlan with bridge
The tests trigger a panic reported in PR kern/53357.
diffstat:
tests/net/if_vlan/t_vlan.sh | 78 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 77 insertions(+), 1 deletions(-)
diffs (102 lines):
diff -r b6a00821e53a -r ae050f4158dd tests/net/if_vlan/t_vlan.sh
--- a/tests/net/if_vlan/t_vlan.sh Tue Jun 12 04:20:36 2018 +0000
+++ b/tests/net/if_vlan/t_vlan.sh Tue Jun 12 04:21:22 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_vlan.sh,v 1.8 2018/02/01 05:22:02 ozaki-r Exp $
+# $NetBSD: t_vlan.sh,v 1.9 2018/06/12 04:21:22 ozaki-r Exp $
#
# Copyright (c) 2016 Internet Initiative Japan Inc.
# All rights reserved.
@@ -524,6 +524,80 @@
cleanup
}
+vlan_bridge_body_common()
+{
+
+ rump_server_add_iface $SOCK_LOCAL shmif0 $BUS
+
+ export RUMP_SERVER=$SOCK_LOCAL
+ atf_check -s exit:0 rump.ifconfig shmif0 up
+
+ atf_check -s exit:0 rump.ifconfig vlan0 create
+ atf_check -s exit:0 rump.ifconfig vlan0 vlan 10 vlanif shmif0
+ atf_check -s exit:0 rump.ifconfig vlan0 up
+ $DEBUG && rump.ifconfig vlan0
+
+ atf_check -s exit:0 rump.ifconfig bridge0 create
+ # Adjust to the MTU of a vlan on a shmif
+ atf_check -s exit:0 rump.ifconfig bridge0 mtu 1496
+ atf_check -s exit:0 rump.ifconfig bridge0 up
+ # Test brconfig add
+ atf_check -s exit:0 $HIJACKING brconfig bridge0 add vlan0
+ $DEBUG && brconfig bridge0
+ # Test brconfig delete
+ atf_check -s exit:0 $HIJACKING brconfig bridge0 delete vlan0
+
+ atf_check -s exit:0 $HIJACKING brconfig bridge0 add vlan0
+ # Test vlan destruction with bridge
+ atf_check -s exit:0 rump.ifconfig vlan0 destroy
+
+ rump_server_destroy_ifaces
+}
+
+atf_test_case vlan_bridge cleanup
+vlan_bridge_head()
+{
+
+ atf_set "descr" "tests of vlan interfaces with bridges (IPv4)"
+ atf_set "require.progs" "rump_server"
+}
+
+vlan_bridge_body()
+{
+
+ rump_server_start $SOCK_LOCAL vlan bridge
+ vlan_bridge_body_common
+}
+
+vlan_bridge_cleanup()
+{
+
+ $DEBUG && dump
+ cleanup
+}
+
+atf_test_case vlan_bridge6 cleanup
+vlan_bridge6_head()
+{
+
+ atf_set "descr" "tests of vlan interfaces with bridges (IPv6)"
+ atf_set "require.progs" "rump_server"
+}
+
+vlan_bridge6_body()
+{
+
+ rump_server_start $SOCK_LOCAL vlan netinet6 bridge
+ vlan_bridge_body_common
+}
+
+vlan_bridge6_cleanup()
+{
+
+ $DEBUG && dump
+ cleanup
+}
+
atf_init_test_cases()
{
@@ -531,9 +605,11 @@
atf_add_test_case vlan_basic
atf_add_test_case vlan_vlanid
atf_add_test_case vlan_configs
+ atf_add_test_case vlan_bridge
atf_add_test_case vlan_create_destroy6
atf_add_test_case vlan_basic6
atf_add_test_case vlan_vlanid6
atf_add_test_case vlan_configs6
+ atf_add_test_case vlan_bridge6
}
Home |
Main Index |
Thread Index |
Old Index