Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 83 additions & 74 deletions lisa/microsoft/testsuites/network/stress.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment on lines +168 to +169
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)
Loading