Skip to content

Commit 66b7365

Browse files
committed
Fix things to be good
1 parent 087e515 commit 66b7365

File tree

2 files changed

+52
-27
lines changed

2 files changed

+52
-27
lines changed

microsoft/testsuites/dpdk/dpdksuite.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,32 @@ def verify_dpdk_symmetric_mp(
130130
) -> None:
131131
run_dpdk_symmetric_mp(node, log, variables)
132132

133+
@TestCaseMetadata(
134+
description="""
135+
netvsc pmd version.
136+
This test case checks DPDK can be built and installed correctly.
137+
Prerequisites, accelerated networking must be enabled.
138+
The VM should have at least two network interfaces,
139+
with one interface for management.
140+
More details refer https://docs.microsoft.com/en-us/azure/virtual-network/setup-dpdk#prerequisites # noqa: E501
141+
""",
142+
priority=2,
143+
requirement=simple_requirement(
144+
min_core_count=8,
145+
min_nic_count=3,
146+
network_interface=Sriov(),
147+
unsupported_features=[Gpu, Infiniband],
148+
),
149+
)
150+
def verify_dpdk_symmetric_mp_netvsc_rescind(
151+
self,
152+
node: Node,
153+
log: Logger,
154+
variables: Dict[str, Any],
155+
result: TestResult,
156+
) -> None:
157+
run_dpdk_symmetric_mp(node, log, variables, trigger_rescind=True)
158+
133159
@TestCaseMetadata(
134160
description="""
135161
netvsc pmd version with 1GiB hugepages

microsoft/testsuites/dpdk/dpdkutil.py

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ def run_dpdk_symmetric_mp(
13251325
f"{str(symmetric_mp_path)} -l 1 --proc-type auto "
13261326
f"{symmetric_mp_args} --proc-id 0"
13271327
),
1328-
timeout=630,
1328+
timeout=330,
13291329
signal=SIGINT,
13301330
kill_timeout=30,
13311331
)
@@ -1339,7 +1339,7 @@ def run_dpdk_symmetric_mp(
13391339
f"{str(symmetric_mp_path)} -l 2 --proc-type secondary "
13401340
f"{symmetric_mp_args} --proc-id 1"
13411341
),
1342-
timeout=600,
1342+
timeout=300,
13431343
signal=SIGINT,
13441344
kill_timeout=35,
13451345
)
@@ -1351,35 +1351,34 @@ def run_dpdk_symmetric_mp(
13511351
enable=False, wait=False, reset_connections=False
13521352
)
13531353

1354-
# wait for the RTE_DEV_EVENT_REMOVE message
1355-
primary.wait_output(
1356-
"HN_DRIVER: netvsc_hotadd_callback(): "
1357-
"Device notification type=1" # RTE_DEV_EVENT_REMOVE
1358-
) # relying on compiler defaults here, not great.
1354+
# wait for the RTE_DEV_EVENT_REMOVE message
1355+
primary.wait_output(
1356+
"HN_DRIVER: netvsc_hotadd_callback(): "
1357+
"Device notification type=1" # RTE_DEV_EVENT_REMOVE
1358+
) # relying on compiler defaults here, not great.
13591359

1360-
if trigger_rescind:
13611360
# turn SRIOV on
13621361
node.features[NetworkInterface].switch_sriov(
13631362
enable=True, wait=False, reset_connections=False
13641363
)
13651364

1366-
# wait for the RTE_DEV_EVENT_ADD message
1367-
primary.wait_output(
1368-
(
1369-
"HN_DRIVER: netvsc_hotadd_callback(): "
1370-
"Device notification type=0" # RTE_DEV_EVENT_ADD
1371-
),
1372-
delta_only=True,
1373-
) # relying on compiler defaults here, not great.
1374-
primary.wait_output(
1375-
(
1376-
"HN_DRIVER: netvsc_hotplug_retry(): Found matching MAC address, "
1377-
f"adding device {test_nics[0].pci_device_name} "
1378-
f"network name {test_nics[0].lower} "
1379-
f"args mac={test_nics[0].mac_addr},mac={test_nics[1].mac_addr}"
1380-
),
1381-
delta_only=True,
1382-
) # relying on compiler defaults here, not great.
1365+
# wait for the RTE_DEV_EVENT_ADD message
1366+
primary.wait_output(
1367+
(
1368+
"HN_DRIVER: netvsc_hotadd_callback(): "
1369+
"Device notification type=0" # RTE_DEV_EVENT_ADD
1370+
),
1371+
delta_only=True,
1372+
) # relying on compiler defaults here, not great.
1373+
primary.wait_output(
1374+
(
1375+
"HN_DRIVER: netvsc_hotplug_retry(): Found matching MAC address, "
1376+
f"adding device {test_nics[0].pci_device_name} "
1377+
f"network name {test_nics[0].lower} "
1378+
f"args mac={test_nics[0].mac_addr},mac={test_nics[1].mac_addr}"
1379+
),
1380+
delta_only=True,
1381+
) # relying on compiler defaults here, not great.
13831382

13841383
ping.ping_async(
13851384
target=test_nics[0].ip_addr,
@@ -1392,8 +1391,8 @@ def run_dpdk_symmetric_mp(
13921391
count=100,
13931392
ignore_error=True,
13941393
)
1395-
1396-
# # check the exit codes
1394+
test_kit.dmesg.check_kernel_errors(force_run=True)
1395+
# check the exit codes
13971396
secondary_result = secondary.wait_result(
13981397
expected_exit_code=0,
13991398
expected_exit_code_failure_message=(

0 commit comments

Comments
 (0)