2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

system-afxdp.at: Add test for infinite re-addition of failed ports.

New file created for AF_XDP specific tests.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: William Tu <u9012063@gmail.com>
This commit is contained in:
Ilya Maximets
2019-12-07 15:46:18 +01:00
parent 37a2465523
commit 2620f056a9
3 changed files with 27 additions and 1 deletions

View File

@@ -156,7 +156,8 @@ SYSTEM_USERSPACE_TESTSUITE_AT = \
SYSTEM_AFXDP_TESTSUITE_AT = \
tests/system-userspace-macros.at \
tests/system-afxdp-testsuite.at \
tests/system-afxdp-macros.at
tests/system-afxdp-macros.at \
tests/system-afxdp.at
SYSTEM_TESTSUITE_AT = \
tests/system-common-macros.at \

View File

@@ -23,4 +23,5 @@ m4_include([tests/system-common-macros.at])
m4_include([tests/system-userspace-macros.at])
m4_include([tests/system-afxdp-macros.at])
m4_include([tests/system-afxdp.at])
m4_include([tests/system-traffic.at])

24
tests/system-afxdp.at Normal file
View File

@@ -0,0 +1,24 @@
AT_BANNER([AF_XDP])
AT_SETUP([AF_XDP - infinite re-addition of failed ports])
AT_KEYWORDS([afxdp infinite])
OVS_TRAFFIC_VSWITCHD_START()
AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
ADD_NAMESPACES(at_ns0, at_ns1)
ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
AT_CHECK([ovs-vsctl del-port ovs-p0])
AT_CHECK([ovs-vsctl add-port br0 ovs-p0 -- \
set interface ovs-p0 type=afxdp options:n_rxq=42],
[0], [], [stderr])
OVS_WAIT_UNTIL([grep "ovs-p0: could not set configuration" ovs-vswitchd.log])
sleep 5
AT_CHECK([grep "ovs-p0: could not set configuration" ovs-vswitchd.log | wc -l],
[0], [1
])
OVS_TRAFFIC_VSWITCHD_STOP(["/ovs-p0: Too big 'n_rxq'/d
/ovs-p0: could not set configuration/d"])
AT_CLEANUP