Skip to content

Commit

Permalink
system-dpdk: Add testpmd clean up in MTU unit tests.
Browse files Browse the repository at this point in the history
The MTU vport unit tests do not clean up testpmd after use which causes
them to fail randomly.  This commit amends the MTU vport unit tests to
clean up testpmd after running.

Fixes: bf47829 ("tests: Add OVS-DPDK MTU unit tests.")
Reported-by: Ilya Maximets <[email protected]>
Acked-by: Kumar Amber <[email protected]>
Acked-by: Sunil Pai G <[email protected]>
Signed-off-by: Michael Phelan <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
phelanmi authored and igsilya committed Jul 22, 2022
1 parent 5cd0363 commit ad026f4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/system-dpdk.at
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,9 @@ AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=9000])
AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
AT_CHECK([egrep 'mtu=9000' stdout], [], [stdout])

dnl Clean up the testpmd now
pkill -f -x -9 'tail -f /dev/null'

dnl Clean up
AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
Expand Down Expand Up @@ -723,6 +726,9 @@ AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=2000])
AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
AT_CHECK([egrep 'mtu=2000' stdout], [], [stdout])

dnl Clean up the testpmd now
pkill -f -x -9 'tail -f /dev/null'

dnl Clean up
AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
Expand Down Expand Up @@ -852,6 +858,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])

dnl Clean up the testpmd now
pkill -f -x -9 'tail -f /dev/null'

dnl Clean up
AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
Expand Down Expand Up @@ -906,6 +915,8 @@ 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])

dnl Clean up the testpmd now
pkill -f -x -9 'tail -f /dev/null'

dnl Clean up
AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
Expand Down

0 comments on commit ad026f4

Please sign in to comment.