diff mbox series

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

Message ID 20211125100127.75934-1-maxime.coquelin@redhat.com
State Accepted
Headers show
Series [ovs-dev] system-dpdk: Improve Vhost-user ping tests reliability | expand

Checks

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

Commit Message

Maxime Coquelin Nov. 25, 2021, 10:01 a.m. UTC
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@redhat.com>
---
 tests/system-dpdk.at | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Aaron Conole Nov. 29, 2021, 3:07 p.m. UTC | #1
Maxime Coquelin <maxime.coquelin@redhat.com> writes:

> 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@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>
Ilya Maximets Dec. 9, 2021, 1:45 p.m. UTC | #2
On 11/29/21 16:07, Aaron Conole wrote:
> Maxime Coquelin <maxime.coquelin@redhat.com> writes:
> 
>> 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@redhat.com>
>> ---
> 
> Acked-by: Aaron Conole <aconole@redhat.com>

Thanks!  Applied.

Best regards, Ilya Maximets.
diff mbox series

Patch

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])