[ovs-dev] [PATCH] system-dpdk: Improve Vhost-user ping tests reliability

Maxime Coquelin maxime.coquelin at redhat.com
Thu Nov 25 10:01:27 UTC 2021


Instead of waiting 10 seconds for testpmd to start, this
patch makes use of OVS_WAIT_UNTIL() macro to wait for
the Virtio device readiness notification in ovs-vswitchd
logs.

Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 tests/system-dpdk.at | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
index e0e750fde..e5c6e92ab 100644
--- a/tests/system-dpdk.at
+++ b/tests/system-dpdk.at
@@ -120,8 +120,7 @@ tail -f /dev/null | dpdk-testpmd --socket-mem="$(cat NUMA_NODE)" --no-pci\
            --vdev="net_tap0,iface=tap0" --file-prefix page0 \
            --single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuser0.log 2>&1 &
 
-dnl Give settling time to the testpmd processes - NOTE: this is bad form.
-sleep 10
+OVS_WAIT_UNTIL([grep "virtio is now ready for processing" ovs-vswitchd.log])
 
 dnl Move the tap devices to the namespaces
 AT_CHECK([ps aux | grep testpmd], [], [stdout], [stderr])
@@ -196,8 +195,7 @@ tail -f /dev/null | dpdk-testpmd --socket-mem="$(cat NUMA_NODE)" --no-pci\
            --vdev="net_tap0,iface=tap0" --file-prefix page0 \
            --single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuserclient0.log 2>&1 &
 
-dnl Give settling time to the testpmd processes - NOTE: this is bad form.
-sleep 10
+OVS_WAIT_UNTIL([grep "virtio is now ready for processing" ovs-vswitchd.log])
 
 dnl Move the tap devices to the namespaces
 AT_CHECK([ps aux | grep testpmd], [], [stdout], [stderr])
-- 
2.31.1



More information about the dev mailing list