From 3b92d16c8e297e1303f105a86f9967619ca51caf Mon Sep 17 00:00:00 2001 From: Srikanth Myakam <374767+SRIKKANTH@users.noreply.github.com> Date: Mon, 29 Jun 2026 13:51:53 +0530 Subject: [PATCH] Move synthetic NIC stress tests into a dedicated synthetic test area Splits the network stress test suite so that the synthetic-NIC stress tests are reported under a dedicated area="synthetic" instead of being grouped with the SRIOV tests under area="sriov". --- lisa/microsoft/testsuites/network/stress.py | 157 +++++++++++--------- 1 file changed, 83 insertions(+), 74 deletions(-) diff --git a/lisa/microsoft/testsuites/network/stress.py b/lisa/microsoft/testsuites/network/stress.py index e604de45cd..0e66b67921 100644 --- a/lisa/microsoft/testsuites/network/stress.py +++ b/lisa/microsoft/testsuites/network/stress.py @@ -147,194 +147,203 @@ def stress_sriov_disable_enable(self, environment: Environment) -> None: @TestCaseMetadata( description=""" - This case verify VM works well when provison with max synthetic nics. + This case verify VM works well when provisioning with max sriov nics. Steps, - 1. Provision VM with max network interfaces with synthetic network. - 2. Check each nic has an ip address. + 1. Provision VM with max network interfaces with enabling accelerated network. + 2. Do the basic sriov testing. 3. Reboot VM from guest. - 4. Check each nic has an ip address. + 4. Do the basic sriov testing. 5. Repeat step 3 and 4 for 10 times. """, priority=2, requirement=simple_requirement( network_interface=schema.NetworkInterfaceOptionSettings( nic_count=IntRange(min=2, choose_max_value=True), - data_path=schema.NetworkDataPath.Synthetic, + data_path=schema.NetworkDataPath.Sriov, ), ), ) - def stress_synthetic_provision_with_max_nics_reboot( - self, environment: Environment - ) -> None: - # Skip test if no synthetic NICs are available on any node - for node in environment.nodes.list(): - skip_if_no_synthetic_nics(node) - - initialize_nic_info(environment, is_sriov=False) + def stress_sriov_with_max_nics_reboot(self, environment: Environment) -> None: + initialize_nic_info(environment) + sriov_basic_test(environment) for _ in range(10): for node in environment.nodes.list(): node.reboot() - initialize_nic_info(environment, is_sriov=False) + initialize_nic_info(environment) + sriov_basic_test(environment) @TestCaseMetadata( description=""" - This case verify VM works well when provison with max synthetic nics. + This case verify VM works well when provisioning with max sriov nics. Steps, - 1. Provision VM with max network interfaces with synthetic network. - 2. Check each nic has an ip address. + 1. Provision VM with max network interfaces with enabling accelerated network. + 2. Do the basic sriov testing. 3. Reboot VM from API. - 4. Check each nic has an ip address. + 4. Do the basic sriov testing. 5. Repeat step 3 and 4 for 10 times. """, priority=2, requirement=simple_requirement( network_interface=schema.NetworkInterfaceOptionSettings( nic_count=IntRange(min=2, choose_max_value=True), - data_path=schema.NetworkDataPath.Synthetic, + data_path=schema.NetworkDataPath.Sriov, ), ), ) - def stress_synthetic_with_max_nics_reboot_from_platform( + def stress_sriov_with_max_nics_reboot_from_platform( self, environment: Environment ) -> None: - # Skip test if no synthetic NICs are available on any node - for node in environment.nodes.list(): - skip_if_no_synthetic_nics(node) - - initialize_nic_info(environment, is_sriov=False) + initialize_nic_info(environment) + sriov_basic_test(environment) for _ in range(10): for node in environment.nodes.list(): start_stop = node.features[StartStop] start_stop.restart() - initialize_nic_info(environment, is_sriov=False) + initialize_nic_info(environment) + sriov_basic_test(environment) @TestCaseMetadata( description=""" - This case verify VM works well when provison with max synthetic nics. + This case verify VM works well when provisioning with max sriov nics. Steps, - 1. Provision VM with max network interfaces with synthetic network. - 2. Check each nic has an ip address. + 1. Provision VM with max network interfaces with enabling accelerated network. + 2. Do the basic sriov testing. 3. Stop and Start VM from API. - 4. Check each nic has an ip address. + 4. Do the basic sriov testing. 5. Repeat step 3 and 4 for 10 times. """, priority=2, requirement=simple_requirement( network_interface=schema.NetworkInterfaceOptionSettings( nic_count=IntRange(min=2, choose_max_value=True), - data_path=schema.NetworkDataPath.Synthetic, - ), + data_path=schema.NetworkDataPath.Sriov, + ) ), ) - def stress_synthetic_with_max_nics_stop_start_from_platform( + def stress_sriov_with_max_nics_stop_start_from_platform( self, environment: Environment ) -> None: - # Skip test if no synthetic NICs are available on any node - for node in environment.nodes.list(): - skip_if_no_synthetic_nics(node) - - initialize_nic_info(environment, is_sriov=False) + initialize_nic_info(environment) + sriov_basic_test(environment) for _ in range(10): for node in environment.nodes.list(): start_stop = node.features[StartStop] start_stop.stop() start_stop.start() - initialize_nic_info(environment, is_sriov=False) + initialize_nic_info(environment) + sriov_basic_test(environment) + def after_case(self, log: Logger, **kwargs: Any) -> None: + environment: Environment = kwargs.pop("environment") + cleanup_iperf3(environment) + + +@TestSuiteMetadata( + area="synthetic", + category="stress", + description=""" + This test suite uses to verify synthetic network functionality under stress. + """, +) +class StressSynthetic(TestSuite): @TestCaseMetadata( description=""" - This case verify VM works well when provisioning with max sriov nics. + This case verify VM works well when provison with max synthetic nics. Steps, - 1. Provision VM with max network interfaces with enabling accelerated network. - 2. Do the basic sriov testing. + 1. Provision VM with max network interfaces with synthetic network. + 2. Check each nic has an ip address. 3. Reboot VM from guest. - 4. Do the basic sriov testing. + 4. Check each nic has an ip address. 5. Repeat step 3 and 4 for 10 times. """, priority=2, requirement=simple_requirement( network_interface=schema.NetworkInterfaceOptionSettings( nic_count=IntRange(min=2, choose_max_value=True), - data_path=schema.NetworkDataPath.Sriov, + data_path=schema.NetworkDataPath.Synthetic, ), ), ) - def stress_sriov_with_max_nics_reboot(self, environment: Environment) -> None: - initialize_nic_info(environment) - sriov_basic_test(environment) + def stress_synthetic_provision_with_max_nics_reboot( + self, environment: Environment + ) -> None: + # Skip test if no synthetic NICs are available on any node + for node in environment.nodes.list(): + skip_if_no_synthetic_nics(node) + + initialize_nic_info(environment, is_sriov=False) for _ in range(10): for node in environment.nodes.list(): node.reboot() - initialize_nic_info(environment) - sriov_basic_test(environment) + initialize_nic_info(environment, is_sriov=False) @TestCaseMetadata( description=""" - This case verify VM works well when provisioning with max sriov nics. + This case verify VM works well when provison with max synthetic nics. Steps, - 1. Provision VM with max network interfaces with enabling accelerated network. - 2. Do the basic sriov testing. + 1. Provision VM with max network interfaces with synthetic network. + 2. Check each nic has an ip address. 3. Reboot VM from API. - 4. Do the basic sriov testing. + 4. Check each nic has an ip address. 5. Repeat step 3 and 4 for 10 times. """, priority=2, requirement=simple_requirement( network_interface=schema.NetworkInterfaceOptionSettings( nic_count=IntRange(min=2, choose_max_value=True), - data_path=schema.NetworkDataPath.Sriov, + data_path=schema.NetworkDataPath.Synthetic, ), ), ) - def stress_sriov_with_max_nics_reboot_from_platform( + def stress_synthetic_with_max_nics_reboot_from_platform( self, environment: Environment ) -> None: - initialize_nic_info(environment) - sriov_basic_test(environment) + # Skip test if no synthetic NICs are available on any node + for node in environment.nodes.list(): + skip_if_no_synthetic_nics(node) + + initialize_nic_info(environment, is_sriov=False) for _ in range(10): for node in environment.nodes.list(): start_stop = node.features[StartStop] start_stop.restart() - initialize_nic_info(environment) - sriov_basic_test(environment) + initialize_nic_info(environment, is_sriov=False) @TestCaseMetadata( description=""" - This case verify VM works well when provisioning with max sriov nics. + This case verify VM works well when provison with max synthetic nics. Steps, - 1. Provision VM with max network interfaces with enabling accelerated network. - 2. Do the basic sriov testing. + 1. Provision VM with max network interfaces with synthetic network. + 2. Check each nic has an ip address. 3. Stop and Start VM from API. - 4. Do the basic sriov testing. + 4. Check each nic has an ip address. 5. Repeat step 3 and 4 for 10 times. """, priority=2, requirement=simple_requirement( network_interface=schema.NetworkInterfaceOptionSettings( nic_count=IntRange(min=2, choose_max_value=True), - data_path=schema.NetworkDataPath.Sriov, - ) + data_path=schema.NetworkDataPath.Synthetic, + ), ), ) - def stress_sriov_with_max_nics_stop_start_from_platform( + def stress_synthetic_with_max_nics_stop_start_from_platform( self, environment: Environment ) -> None: - initialize_nic_info(environment) - sriov_basic_test(environment) + # Skip test if no synthetic NICs are available on any node + for node in environment.nodes.list(): + skip_if_no_synthetic_nics(node) + + initialize_nic_info(environment, is_sriov=False) for _ in range(10): for node in environment.nodes.list(): start_stop = node.features[StartStop] start_stop.stop() start_stop.start() - initialize_nic_info(environment) - sriov_basic_test(environment) - - def after_case(self, log: Logger, **kwargs: Any) -> None: - environment: Environment = kwargs.pop("environment") - cleanup_iperf3(environment) + initialize_nic_info(environment, is_sriov=False)