Skip to contentSkip to conversation

selftests: net: fcnal-test.sh: rmmod br_netfilter at function exit

PATCH In review Paolo Pisati 2 participants 2 messages Jun 10

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: net: fcnal-test.sh: rmmod br_netfilter at function exit

fcnal-test.sh loads br_netfilter to test bridge-into-VRF scenarios but does not remove it at function exit (the second modprobe around line 4158 has no matching rmmod). Since tests run sequentially, any test running after fcnal-test.sh inherits it.

---
 tools/testing/selftests/net/fcnal-test.sh | 2 ++
 1 file changed, 2 insertions(+)
tools/testing/selftests/net/fcnal-test.sh +2 -0
index 890c3f8e51bb..de7b6768882a 100755
@@ -4176,6 +4176,8 @@ use_case_br()
 
 	setup_cmd ip li del br0 2>/dev/null
 	setup_cmd_nsb ip li del vlan100 2>/dev/null
+
+	rmmod br_netfilter 2>/dev/null
 }
 
 # VRF only.
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 4 lines · On Wed, 10 Jun 2026 16:46:18 +0200 Paolo Pisati wrote:

fcnal-test.sh loads br_netfilter to test bridge-into-VRF scenarios but does not remove it at function exit (the second modprobe around line 4158 has no matching rmmod). Since tests run sequentially, any test running after fcnal-test.sh inherits it.

And why is that a problem? As a general rule tests shouldn't unload the modules they loaded cause something else may have started using them. Also you did not CC netdev@ on this.