diff mbox series

[ovs-dev,v8,8/9] system-dpdk: Rework cleanup for vhost-user client tests.

Message ID 20231027153118.580349-8-david.marchand@redhat.com
State Superseded
Headers show
Series [ovs-dev,v8,1/9] system-dpdk: Introduce helpers for testpmd. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

David Marchand Oct. 27, 2023, 3:31 p.m. UTC
Those tests are subject to a race when a testpmd hosting the vhost-user
server is stopped and OVS has enough time to detect the vhost-user socket
drop and tries to reconnect to this socket.

In such a situation, the tests can fail as the OVS process with the
vhost-user client port complains with a warning log:

2023-09-08T13:15:18.160Z|00163|dpdk|INFO|VHOST_CONFIG:
	(.../005/dpdkvhostclient0) vhost peer closed
2023-09-08T13:15:18.160Z|00164|netdev_dpdk|INFO|vHost Device
	'.../005/dpdkvhostclient0' connection has been destroyed
2023-09-08T13:15:18.160Z|00165|dpdk|INFO|VHOST_CONFIG:
	(.../005/dpdkvhostclient0) vhost-user client: socket created, fd: 24
2023-09-08T13:15:18.160Z|00166|dpdk|WARN|VHOST_CONFIG:
	(.../005/dpdkvhostclient0) failed to connect: Connection refused
2023-09-08T13:15:18.160Z|00167|dpdk|INFO|VHOST_CONFIG:
	(.../005/dpdkvhostclient0) reconnecting...

Invert the order of the cleanup steps.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
---
Changes since v6:
- added this fix for spurious failures hit by Eelco,

---
 tests/system-dpdk.at | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
index fd4a4b7d73..80277b24b6 100644
--- a/tests/system-dpdk.at
+++ b/tests/system-dpdk.at
@@ -222,10 +222,9 @@  AT_CHECK([test `ovs-vsctl get interface dpdkvhostuserclient0 statistics:tx_bytes
                $((`ovs-vsctl get interface dpdkvhostuserclient0 statistics:tx_q0_good_bytes` + dnl
                   `ovs-vsctl get interface dpdkvhostuserclient0 statistics:tx_q1_good_bytes`))])
 
-OVS_DPDK_STOP_TESTPMD()
-
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
+OVS_DPDK_STOP_TESTPMD()
 OVS_DPDK_STOP_VSWITCHD(["dnl
 /VHOST_CONFIG: (.*dpdkvhostclient0) recvmsg failed/d
 /VHOST_CONFIG: (.*dpdkvhostclient0) failed to connect: No such file or directory/d
@@ -649,10 +648,9 @@  AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=9000])
 AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
 AT_CHECK([grep -E 'mtu=9000' stdout], [], [stdout])
 
-OVS_DPDK_STOP_TESTPMD()
-
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
+OVS_DPDK_STOP_TESTPMD()
 OVS_DPDK_STOP_VSWITCHD(["dnl
 /VHOST_CONFIG: (.*dpdkvhostclient0) failed to connect: No such file or directory/d"])
 AT_CLEANUP
@@ -694,10 +692,9 @@  AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=2000])
 AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
 AT_CHECK([grep -E 'mtu=2000' stdout], [], [stdout])
 
-OVS_DPDK_STOP_TESTPMD()
-
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
+OVS_DPDK_STOP_TESTPMD()
 OVS_DPDK_STOP_VSWITCHD(["dnl
 /VHOST_CONFIG: (.*dpdkvhostclient0) failed to connect: No such file or directory/d"])
 AT_CLEANUP
@@ -813,10 +810,9 @@  dnl Set MTU value above upper bound and check for error
 AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=9711])
 AT_CHECK([grep "dpdkvhostuserclient0: unsupported MTU 9711" ovs-vswitchd.log], [], [stdout])
 
-OVS_DPDK_STOP_TESTPMD()
-
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
+OVS_DPDK_STOP_TESTPMD()
 OVS_DPDK_STOP_VSWITCHD(["dnl
 /VHOST_CONFIG: (.*dpdkvhostclient0) failed to connect: No such file or directory/d
 /dpdkvhostuserclient0: unsupported MTU 9711/d
@@ -859,10 +855,9 @@  dnl Set MTU value below lower bound and check for error
 AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=67])
 AT_CHECK([grep "dpdkvhostuserclient0: unsupported MTU 67" ovs-vswitchd.log], [], [stdout])
 
-OVS_DPDK_STOP_TESTPMD()
-
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
+OVS_DPDK_STOP_TESTPMD()
 OVS_DPDK_STOP_VSWITCHD(["dnl
 /VHOST_CONFIG: (.*dpdkvhostclient0) failed to connect: No such file or directory/d
 /dpdkvhostuserclient0: unsupported MTU 67/d