git: cfee1417fbc2 - main - if_vlan tests: Test changing vlan ID
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Jul 2022 16:36:49 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=cfee1417fbc2455da144b32ba0e03e626c540859
commit cfee1417fbc2455da144b32ba0e03e626c540859
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-07-18 22:49:30 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-07-21 16:36:01 +0000
if_vlan tests: Test changing vlan ID
We can now change the vlan ID of an if_vlan interface without
disassociating it from the parent interface.
Test that this works.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D35847
---
tests/sys/net/if_vlan.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/sys/net/if_vlan.sh b/tests/sys/net/if_vlan.sh
index be1ec788c11d..96426254bb6d 100755
--- a/tests/sys/net/if_vlan.sh
+++ b/tests/sys/net/if_vlan.sh
@@ -29,6 +29,17 @@ basic_body()
jexec singsing ifconfig ${vlan1} 10.0.0.2/24 up
atf_check -s exit:0 -o ignore jexec singsing ping -c 1 10.0.0.1
+
+ # Test changing the vlan ID
+ atf_check -s exit:0 \
+ jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 43
+ atf_check -s exit:2 -o ignore jexec singsing ping -c 1 10.0.0.1
+
+ # And change back
+ # Test changing the vlan ID
+ atf_check -s exit:0 \
+ jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42
+ atf_check -s exit:0 -o ignore jexec singsing ping -c 1 10.0.0.1
}
basic_cleanup()