aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2025-01-20 13:27:05 +0000
committerKristof Provost <kp@FreeBSD.org>2025-01-20 13:28:39 +0000
commitb4bd97ec168e97360cf9511b975a20f677864661 (patch)
treec18c236429d8e8336f68da22494e060497ea7959
parent38fdcca05d09b4d5426a253d3c484f9481a73ac2 (diff)
netinet tests: basic garp test
Excercise the garp code. This doesn't actively verify anything, but is sufficient to trigger the panic reported in PR 284073, so it's a useful test case to keep. PR: 284073 Sponsored by: Rubicon Communications, LLC ("Netgate")
-rwxr-xr-xtests/sys/netinet/arp.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/sys/netinet/arp.sh b/tests/sys/netinet/arp.sh
index 34946d42f250..c7744d5de938 100755
--- a/tests/sys/netinet/arp.sh
+++ b/tests/sys/netinet/arp.sh
@@ -229,6 +229,32 @@ static_cleanup() {
vnet_cleanup
}
+atf_test_case "garp" "cleanup"
+garp_head() {
+ atf_set descr 'Basic gratuitous arp test'
+ atf_set require.user root
+}
+
+garp_body() {
+ vnet_init
+
+ j="v4t-garp"
+
+ epair=$(vnet_mkepair)
+
+ vnet_mkjail ${j} ${epair}a
+ atf_check -s exit:0 -o ignore \
+ jexec ${j} sysctl net.link.ether.inet.garp_rexmit_count=3
+ jexec ${j} ifconfig ${epair}a inet 192.0.2.1/24 up
+
+ # Allow some time for the timer to actually fire
+ sleep 5
+}
+
+garp_cleanup() {
+ vnet_cleanup
+}
+
atf_init_test_cases()
{
@@ -238,6 +264,7 @@ atf_init_test_cases()
atf_add_test_case "pending_delete_if"
atf_add_test_case "arp_lookup_host"
atf_add_test_case "static"
+ atf_add_test_case "garp"
}
# end