Should the same change be made to OVS_TRAFFIC_VSWITCHD_START? That macro uses modprobe -q, so the errors in the logs are not present. However, it probably still makes sense to only try to unload modules if they loaded successfully.

On 7/10/25 11:33 AM, Xavier Simonart via dev wrote:
Do not try to remove a module if it failed to load.
This caused errors in logs when running tests.

Signed-off-by: Xavier Simonart <xsimo...@redhat.com>
---
  tests/system-kmod-macros.at | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at
index 41a8b7914..7771146f0 100644
--- a/tests/system-kmod-macros.at
+++ b/tests/system-kmod-macros.at
@@ -64,8 +64,7 @@ m4_define([CONFIGURE_VETH_OFFLOADS],
  m4_define([CHECK_CONNTRACK],
       m4_foreach([mod], [[nf_conntrack_ipv4], [nf_conntrack_ipv6], 
[nf_nat_ftp],
                          [nf_nat_tftp]],
-                [modprobe mod || echo "Module mod not loaded."
-                 on_exit 'modprobe -r mod'
+                [modprobe mod && on_exit 'modprobe -r mod' || echo "Module mod not 
loaded."
                  ])
       sysctl -w net.netfilter.nf_conntrack_helper=0
       on_exit "${ovs_builddir}/tests/ovstest test-netlink-conntrack flush"

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to