From nobody Tue Jun 04 20:53:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vv2qY0gPJz5MXFb; Tue, 04 Jun 2024 20:53:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vv2qX4s7dz4pqt; Tue, 4 Jun 2024 20:53:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717534392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=drcride9hjlZFmwndSbH1tGVs2B9cr8F8EnsM43YUGc=; b=x42081bG/zFH0eQJZKbJqV+nTJseA43wlfvfjCmGob90drg5ysKJtI9oiYrbDe2FAvm9LA Mz8/3nL4BvvKb6WNgR8s2yvAvd9GIlkuKjafq+jnnI7FKtkES1viigoCwr+b27iS5YNKwO BPeTtAxHy9oZJ2cDKpTs4ni9BuSJG2VGPQ5/Mi1iAcdRJ4h8BsjbfuztuCettABmtB+WMT ZVUG/n/YClzG6c7pkyTYLj78n1Uc6QNDVhYsTxoC4jA2+EQVumYtCL7sr9f5ZuvS+DpHpL WGV9FwSa8OJzb4flS816hEckyFXxB9P5IARKQBWTSLazv/bemxNZ/HcYDegM0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717534392; a=rsa-sha256; cv=none; b=lMKVqo0yc+CxB0AcRbyg6zt4pjffauN6wyuvJJ9NXn2B0B6Uuos/JyopJzSwRzC9+0pDsm nmVfZ1Vz2S1aM8m2vhkk6Ayb2Won8ALqsYcjPodsGjbzJ5qfQEjV7wyOJcLE4XW29KrM5g R3nvAfKCHmjr/PBHpDI22yUDNaRlwlG9zH3lF1l+PTwGG8yzeGMVxozujp2qkfs/qxwB0m tjL93cjlseUCtODmS4ZuQ9N1jTjtmxBYWbJ/8HNO1mmM4eaHCaYJA3Jw4li7EgASp+L1/1 iL975QppilYTy1nI/JKHO3CaD3jXxXBofTiuaQAsILc02fThTGLsOvrLh/0+AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717534392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=drcride9hjlZFmwndSbH1tGVs2B9cr8F8EnsM43YUGc=; b=ZsL0gs6KKfsc1/F9ylRGbKlOO4QhJWa66rM8m5awR7INczjkMEgads5AS7TbASW218AkTG Df1nQjy0fjJzRxj2qYfoNXmGz6P0S66Ar2r5zsO2W0eul0GfYfNKuX4kXxBHY+zjfDiac0 jWWxbJllfMfiTrCQVuOVLyLmP+JandD+cH9PD9OyGdAXeDQgGbEAmVh8k8xC687jIMGBVB Tg4xAhhz6vBOOP7Fx3LPCbjZbGDpeULOfqdYDArToYKaEH6jygRkLsFDcKNcuQUI9mZcbW cNf4fEBrBid2hfVOo5hYqg/fZDqiA5UbK2hPz13j/P1DrtsceLSCiXxTTbvALA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vv2qX4TKLzZMY; Tue, 4 Jun 2024 20:53:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 454KrCYC058419; Tue, 4 Jun 2024 20:53:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 454KrCaN058416; Tue, 4 Jun 2024 20:53:12 GMT (envelope-from git) Date: Tue, 4 Jun 2024 20:53:12 GMT Message-Id: <202406042053.454KrCaN058416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 480ad4055314 - main - vnet tests: check for if_bridge.ko List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 480ad4055314efbfff7eedbb34272031d836ba89 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=480ad4055314efbfff7eedbb34272031d836ba89 commit 480ad4055314efbfff7eedbb34272031d836ba89 Author: Kristof Provost AuthorDate: 2024-06-04 18:02:18 +0000 Commit: Kristof Provost CommitDate: 2024-06-04 20:16:56 +0000 vnet tests: check for if_bridge.ko A number of tests create a bridge, but did not check if if_bridge.ko is loaded. We usually get away with that, because `ifconfig bridge create` autoloads the module, but if we run the tests in a jail (e.g. because of kyua's upcoming execenv.jail.params feature) we can't load the module and these tests can fail. Check if the module is loaded, skip the test if it is not. Reviewed by: markj MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 Differential Revision: https://reviews.freebsd.org/D45487 --- tests/sys/common/vnet.subr | 7 +++++++ tests/sys/net/if_bridge_test.sh | 13 +++++++++++++ tests/sys/net/if_ovpn/if_ovpn.sh | 2 ++ tests/sys/netinet/carp.sh | 8 ++++++++ tests/sys/netpfil/common/rdr.sh | 1 + tests/sys/netpfil/pf/altq.sh | 4 +--- tests/sys/netpfil/pf/pfsync.sh | 1 + tests/sys/netpfil/pf/sctp.sh | 1 + tests/sys/netpfil/pf/tcp.sh | 1 + 9 files changed, 35 insertions(+), 3 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index 183f7284d614..fd67385655fc 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -26,6 +26,13 @@ vnet_mkepair() echo ${ifname%a} } +vnet_init_bridge() +{ + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi +} + vnet_mkbridge() { ifname=$(ifconfig bridge create) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index 44370a905223..66656be1d84f 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -39,6 +39,7 @@ bridge_transmit_ipv4_unicast_head() bridge_transmit_ipv4_unicast_body() { vnet_init + vnet_init_bridge epair_alcatraz=$(vnet_mkepair) epair_singsing=$(vnet_mkepair) @@ -76,6 +77,7 @@ stp_head() stp_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -142,6 +144,7 @@ stp_vlan_head() stp_vlan_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -216,6 +219,7 @@ static_head() static_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) bridge=$(vnet_mkbridge) @@ -273,6 +277,7 @@ span_head() span_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) epair_span=$(vnet_mkepair) @@ -326,6 +331,7 @@ delete_with_members_head() delete_with_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -352,6 +358,7 @@ mac_conflict_head() mac_conflict_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -390,6 +397,7 @@ inherit_mac_head() inherit_mac_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -418,6 +426,7 @@ stp_validation_head() stp_validation_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -461,6 +470,7 @@ gif_head() gif_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -545,6 +555,7 @@ check_mtu() mtu_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) gif=$(ifconfig gif create) @@ -606,6 +617,7 @@ vlan_head() vlan_body() { vnet_init + vnet_init_bridge vid=1 @@ -673,6 +685,7 @@ many_bridge_members_head() many_bridge_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) ifcount=256 diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index 22da82312dbc..77007c967333 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -602,6 +602,7 @@ multi_client_head() multi_client_body() { ovpn_init + vnet_init_bridge bridge=$(vnet_mkbridge) srv=$(vnet_mkepair) @@ -814,6 +815,7 @@ ra_head() ra_body() { ovpn_init + vnet_init_bridge bridge=$(vnet_mkbridge) srv=$(vnet_mkepair) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index e10e24747c2d..39cfad14907c 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -71,6 +71,7 @@ basic_v4_head() basic_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -115,6 +116,7 @@ vrrp_v4_head() vrrp_v4_body() { carp_init + vnet_init_bridge j=vrrp_basic_v4 @@ -161,6 +163,7 @@ unicast_v4_head() unicast_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -218,6 +221,7 @@ basic_v6_head() basic_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -265,6 +269,7 @@ vrrp_v6_head() vrrp_v6_body() { carp_init + vnet_init_bridge j=carp_basic_v6 @@ -314,6 +319,7 @@ unicast_v6_head() unicast_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -375,6 +381,7 @@ unicast_ll_v6_head() unicast_ll_v6_body() { carp_init + vnet_init_bridge j=carp_uni_ll_v6 @@ -485,6 +492,7 @@ nd6_ns_source_mac_head() nd6_ns_source_mac_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) diff --git a/tests/sys/netpfil/common/rdr.sh b/tests/sys/netpfil/common/rdr.sh index 7d6297870e6c..0d6f27694c8c 100644 --- a/tests/sys/netpfil/common/rdr.sh +++ b/tests/sys/netpfil/common/rdr.sh @@ -83,6 +83,7 @@ local_redirect_body() firewall=$1 firewall_init $firewall nat_init $firewall + vnet_init_bridge bridge=$(vnet_mkbridge) ifconfig ${bridge} 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 57a9edf11366..a902c7caaf4f 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,9 +156,7 @@ codel_bridge_body() { altq_init is_altq_supported codel - if ! kldstat -q -m if_bridge; then - atf_skip "This test requires if_bridge" - fi + vnet_init_bridge epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index 87dfcf748d3c..b97b06c5f9a2 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -335,6 +335,7 @@ pbr_common_body() atf_skip "This test requires carp" fi pfsynct_init + vnet_init_bridge bridge0=$(vnet_mkbridge) bridge1=$(vnet_mkbridge) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 66225e132d1c..c6dba1719d00 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -504,6 +504,7 @@ pfsync_body() sctp_init pfsynct_init + vnet_init_bridge if ! kldstat -q -m carp then atf_skip "This test requires carp" diff --git a/tests/sys/netpfil/pf/tcp.sh b/tests/sys/netpfil/pf/tcp.sh index 84536480b44e..f1bffdba2bfa 100644 --- a/tests/sys/netpfil/pf/tcp.sh +++ b/tests/sys/netpfil/pf/tcp.sh @@ -39,6 +39,7 @@ rst_head() rst_body() { pft_init + vnet_init_bridge epair_srv=$(vnet_mkepair) epair_cl=$(vnet_mkepair)