Skip to content

Commit

Permalink
Fix things to be good
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgov committed Feb 5, 2025
1 parent 087e515 commit 66b7365
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 27 deletions.
26 changes: 26 additions & 0 deletions microsoft/testsuites/dpdk/dpdksuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,32 @@ def verify_dpdk_symmetric_mp(
) -> None:
run_dpdk_symmetric_mp(node, log, variables)

@TestCaseMetadata(
description="""
netvsc pmd version.
This test case checks DPDK can be built and installed correctly.
Prerequisites, accelerated networking must be enabled.
The VM should have at least two network interfaces,
with one interface for management.
More details refer https://docs.microsoft.com/en-us/azure/virtual-network/setup-dpdk#prerequisites # noqa: E501
""",
priority=2,
requirement=simple_requirement(
min_core_count=8,
min_nic_count=3,
network_interface=Sriov(),
unsupported_features=[Gpu, Infiniband],
),
)
def verify_dpdk_symmetric_mp_netvsc_rescind(
self,
node: Node,
log: Logger,
variables: Dict[str, Any],
result: TestResult,
) -> None:
run_dpdk_symmetric_mp(node, log, variables, trigger_rescind=True)

@TestCaseMetadata(
description="""
netvsc pmd version with 1GiB hugepages
Expand Down
53 changes: 26 additions & 27 deletions microsoft/testsuites/dpdk/dpdkutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ def run_dpdk_symmetric_mp(
f"{str(symmetric_mp_path)} -l 1 --proc-type auto "
f"{symmetric_mp_args} --proc-id 0"
),
timeout=630,
timeout=330,
signal=SIGINT,
kill_timeout=30,
)
Expand All @@ -1339,7 +1339,7 @@ def run_dpdk_symmetric_mp(
f"{str(symmetric_mp_path)} -l 2 --proc-type secondary "
f"{symmetric_mp_args} --proc-id 1"
),
timeout=600,
timeout=300,
signal=SIGINT,
kill_timeout=35,
)
Expand All @@ -1351,35 +1351,34 @@ def run_dpdk_symmetric_mp(
enable=False, wait=False, reset_connections=False
)

# wait for the RTE_DEV_EVENT_REMOVE message
primary.wait_output(
"HN_DRIVER: netvsc_hotadd_callback(): "
"Device notification type=1" # RTE_DEV_EVENT_REMOVE
) # relying on compiler defaults here, not great.
# wait for the RTE_DEV_EVENT_REMOVE message
primary.wait_output(
"HN_DRIVER: netvsc_hotadd_callback(): "
"Device notification type=1" # RTE_DEV_EVENT_REMOVE
) # relying on compiler defaults here, not great.

if trigger_rescind:
# turn SRIOV on
node.features[NetworkInterface].switch_sriov(
enable=True, wait=False, reset_connections=False
)

# wait for the RTE_DEV_EVENT_ADD message
primary.wait_output(
(
"HN_DRIVER: netvsc_hotadd_callback(): "
"Device notification type=0" # RTE_DEV_EVENT_ADD
),
delta_only=True,
) # relying on compiler defaults here, not great.
primary.wait_output(
(
"HN_DRIVER: netvsc_hotplug_retry(): Found matching MAC address, "
f"adding device {test_nics[0].pci_device_name} "
f"network name {test_nics[0].lower} "
f"args mac={test_nics[0].mac_addr},mac={test_nics[1].mac_addr}"
),
delta_only=True,
) # relying on compiler defaults here, not great.
# wait for the RTE_DEV_EVENT_ADD message
primary.wait_output(
(
"HN_DRIVER: netvsc_hotadd_callback(): "
"Device notification type=0" # RTE_DEV_EVENT_ADD
),
delta_only=True,
) # relying on compiler defaults here, not great.
primary.wait_output(
(
"HN_DRIVER: netvsc_hotplug_retry(): Found matching MAC address, "
f"adding device {test_nics[0].pci_device_name} "
f"network name {test_nics[0].lower} "
f"args mac={test_nics[0].mac_addr},mac={test_nics[1].mac_addr}"
),
delta_only=True,
) # relying on compiler defaults here, not great.

ping.ping_async(
target=test_nics[0].ip_addr,
Expand All @@ -1392,8 +1391,8 @@ def run_dpdk_symmetric_mp(
count=100,
ignore_error=True,
)

# # check the exit codes
test_kit.dmesg.check_kernel_errors(force_run=True)
# check the exit codes
secondary_result = secondary.wait_result(
expected_exit_code=0,
expected_exit_code_failure_message=(
Expand Down

0 comments on commit 66b7365

Please sign in to comment.