Skip to content

Commit 51a9173

Browse files
committed
Change test requirements for max_* tests
Change test case requirements for max_nic and max_disk test cases.
1 parent 7c53cd3 commit 51a9173

File tree

5 files changed

+84
-59
lines changed

5 files changed

+84
-59
lines changed

lisa/microsoft/testsuites/network/sriov.py

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def verify_sriov_single_vf_connection_max_cpu(
193193

194194
@TestCaseMetadata(
195195
description="""
196-
This case needs 2 nodes and 8 nics. And it verifies module of sriov network
196+
This case needs 2 nodes and max nics. And it verifies module of sriov network
197197
interface is loaded and each synthetic nic is paired with one VF, and check
198198
rx statistics of source and tx statistics of dest increase after send 200 Mb
199199
file from source to dest.
@@ -211,8 +211,8 @@ def verify_sriov_single_vf_connection_max_cpu(
211211
requirement=simple_requirement(
212212
min_count=2,
213213
network_interface=schema.NetworkInterfaceOptionSettings(
214-
nic_count=8,
215214
data_path=schema.NetworkDataPath.Sriov,
215+
nic_count=search_space.IntRange(min=2, choose_max_value=True),
216216
),
217217
),
218218
)
@@ -223,7 +223,7 @@ def verify_sriov_max_vf_connection(self, environment: Environment) -> None:
223223

224224
@TestCaseMetadata(
225225
description="""
226-
This case needs 2 nodes, 8 nics and 64 Vcpus. And it verifies module of sriov
226+
This case needs 2 nodes, max nics and 64 Vcpus. And it verifies module of sriov
227227
network interface is loaded and each synthetic nic is paired with one VF, and
228228
check rx statistics of source and tx statistics of dest increase after send 200
229229
Mb file from source to dest.
@@ -242,8 +242,8 @@ def verify_sriov_max_vf_connection(self, environment: Environment) -> None:
242242
min_count=2,
243243
min_core_count=64,
244244
network_interface=schema.NetworkInterfaceOptionSettings(
245-
nic_count=8,
246245
data_path=schema.NetworkDataPath.Sriov,
246+
nic_count=search_space.IntRange(min=2, choose_max_value=True),
247247
),
248248
),
249249
)
@@ -332,7 +332,6 @@ def verify_sriov_disable_enable_on_guest(self, environment: Environment) -> None
332332
requirement=simple_requirement(
333333
network_interface=schema.NetworkInterfaceOptionSettings(
334334
data_path=schema.NetworkDataPath.Sriov,
335-
max_nic_count=8,
336335
),
337336
),
338337
)
@@ -369,16 +368,18 @@ def verify_sriov_add_max_nics(
369368

370369
@TestCaseMetadata(
371370
description="""
372-
This case verify VM works well when provisioning with max (8) sriov nics.
371+
This case verify VM works well when provisioning with max sriov nics.
373372
374373
Steps,
375374
1. Provision VM with max network interfaces with enabling accelerated network.
376375
2. Do the basic sriov testing.
377376
""",
378377
priority=2,
379378
requirement=simple_requirement(
380-
min_nic_count=8,
381-
network_interface=features.Sriov(),
379+
network_interface=schema.NetworkInterfaceOptionSettings(
380+
data_path=schema.NetworkDataPath.Sriov,
381+
nic_count=search_space.IntRange(min=2, choose_max_value=True),
382+
),
382383
),
383384
)
384385
def verify_sriov_provision_with_max_nics(self, environment: Environment) -> None:
@@ -387,7 +388,7 @@ def verify_sriov_provision_with_max_nics(self, environment: Environment) -> None
387388

388389
@TestCaseMetadata(
389390
description="""
390-
This case verify VM works well when provisioning with max (8) sriov nics.
391+
This case verify VM works well when provisioning with max sriov nics.
391392
392393
Steps,
393394
1. Provision VM with max network interfaces with enabling accelerated network.
@@ -397,8 +398,10 @@ def verify_sriov_provision_with_max_nics(self, environment: Environment) -> None
397398
""",
398399
priority=2,
399400
requirement=simple_requirement(
400-
min_nic_count=8,
401-
network_interface=features.Sriov(),
401+
network_interface=schema.NetworkInterfaceOptionSettings(
402+
data_path=schema.NetworkDataPath.Sriov,
403+
nic_count=search_space.IntRange(min=2, choose_max_value=True),
404+
),
402405
),
403406
)
404407
def verify_sriov_provision_with_max_nics_reboot(
@@ -413,7 +416,7 @@ def verify_sriov_provision_with_max_nics_reboot(
413416

414417
@TestCaseMetadata(
415418
description="""
416-
This case verify VM works well when provisioning with max (8) sriov nics.
419+
This case verify VM works well when provisioning with max sriov nics.
417420
418421
Steps,
419422
1. Provision VM with max network interfaces with enabling accelerated network.
@@ -423,8 +426,10 @@ def verify_sriov_provision_with_max_nics_reboot(
423426
""",
424427
priority=2,
425428
requirement=simple_requirement(
426-
min_nic_count=8,
427-
network_interface=features.Sriov(),
429+
network_interface=schema.NetworkInterfaceOptionSettings(
430+
data_path=schema.NetworkDataPath.Sriov,
431+
nic_count=search_space.IntRange(min=2, choose_max_value=True),
432+
),
428433
),
429434
)
430435
def verify_sriov_provision_with_max_nics_reboot_from_platform(
@@ -440,7 +445,7 @@ def verify_sriov_provision_with_max_nics_reboot_from_platform(
440445

441446
@TestCaseMetadata(
442447
description="""
443-
This case verify VM works well when provisioning with max (8) sriov nics.
448+
This case verify VM works well when provisioning with max sriov nics.
444449
445450
Steps,
446451
1. Provision VM with max network interfaces with enabling accelerated network.
@@ -450,8 +455,10 @@ def verify_sriov_provision_with_max_nics_reboot_from_platform(
450455
""",
451456
priority=2,
452457
requirement=simple_requirement(
453-
min_nic_count=8,
454-
network_interface=features.Sriov(),
458+
network_interface=schema.NetworkInterfaceOptionSettings(
459+
data_path=schema.NetworkDataPath.Sriov,
460+
nic_count=search_space.IntRange(min=2, choose_max_value=True),
461+
),
455462
),
456463
)
457464
def verify_sriov_provision_with_max_nics_stop_start_from_platform(
@@ -479,8 +486,10 @@ def verify_sriov_provision_with_max_nics_stop_start_from_platform(
479486
priority=1,
480487
requirement=simple_requirement(
481488
min_count=2,
482-
min_nic_count=8,
483-
network_interface=features.Sriov(),
489+
network_interface=schema.NetworkInterfaceOptionSettings(
490+
data_path=schema.NetworkDataPath.Sriov,
491+
nic_count=search_space.IntRange(min=2, choose_max_value=True),
492+
),
484493
),
485494
)
486495
def verify_sriov_reload_modules(self, environment: Environment) -> None:
@@ -528,7 +537,7 @@ def verify_sriov_reload_modules(self, environment: Environment) -> None:
528537
requirement=simple_requirement(
529538
min_count=2,
530539
network_interface=schema.NetworkInterfaceOptionSettings(
531-
nic_count=search_space.IntRange(min=3, max=8),
540+
nic_count=search_space.IntRange(min=3),
532541
data_path=schema.NetworkDataPath.Sriov,
533542
),
534543
# BSD is unsupported since this is testing to patches to the linux kernel

lisa/microsoft/testsuites/network/stress.py

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
)
2626
from lisa.features import StartStop
2727
from lisa.nic import NicInfo
28+
from lisa.search_space import IntRange
2829
from lisa.sut_orchestrator import AZURE
2930
from lisa.tools import Cat, Iperf3
3031

@@ -137,7 +138,7 @@ def stress_sriov_disable_enable(self, environment: Environment) -> None:
137138

138139
@TestCaseMetadata(
139140
description="""
140-
This case verify VM works well when provison with max (8) synthetic nics.
141+
This case verify VM works well when provison with max synthetic nics.
141142
142143
Steps,
143144
1. Provision VM with max network interfaces with synthetic network.
@@ -148,8 +149,8 @@ def stress_sriov_disable_enable(self, environment: Environment) -> None:
148149
""",
149150
priority=2,
150151
requirement=simple_requirement(
151-
min_nic_count=8,
152152
network_interface=schema.NetworkInterfaceOptionSettings(
153+
nic_count=IntRange(min=2, choose_max_value=True),
153154
data_path=schema.NetworkDataPath.Synthetic,
154155
),
155156
),
@@ -165,7 +166,7 @@ def stress_synthetic_provision_with_max_nics_reboot(
165166

166167
@TestCaseMetadata(
167168
description="""
168-
This case verify VM works well when provison with max (8) synthetic nics.
169+
This case verify VM works well when provison with max synthetic nics.
169170
170171
Steps,
171172
1. Provision VM with max network interfaces with synthetic network.
@@ -176,8 +177,8 @@ def stress_synthetic_provision_with_max_nics_reboot(
176177
""",
177178
priority=2,
178179
requirement=simple_requirement(
179-
min_nic_count=8,
180180
network_interface=schema.NetworkInterfaceOptionSettings(
181+
nic_count=IntRange(min=2, choose_max_value=True),
181182
data_path=schema.NetworkDataPath.Synthetic,
182183
),
183184
),
@@ -194,7 +195,7 @@ def stress_synthetic_with_max_nics_reboot_from_platform(
194195

195196
@TestCaseMetadata(
196197
description="""
197-
This case verify VM works well when provison with max (8) synthetic nics.
198+
This case verify VM works well when provison with max synthetic nics.
198199
199200
Steps,
200201
1. Provision VM with max network interfaces with synthetic network.
@@ -205,8 +206,8 @@ def stress_synthetic_with_max_nics_reboot_from_platform(
205206
""",
206207
priority=2,
207208
requirement=simple_requirement(
208-
min_nic_count=8,
209209
network_interface=schema.NetworkInterfaceOptionSettings(
210+
nic_count=IntRange(min=2, choose_max_value=True),
210211
data_path=schema.NetworkDataPath.Synthetic,
211212
),
212213
),
@@ -224,7 +225,7 @@ def stress_synthetic_with_max_nics_stop_start_from_platform(
224225

225226
@TestCaseMetadata(
226227
description="""
227-
This case verify VM works well when provisioning with max (8) sriov nics.
228+
This case verify VM works well when provisioning with max sriov nics.
228229
229230
Steps,
230231
1. Provision VM with max network interfaces with enabling accelerated network.
@@ -235,8 +236,10 @@ def stress_synthetic_with_max_nics_stop_start_from_platform(
235236
""",
236237
priority=2,
237238
requirement=simple_requirement(
238-
min_nic_count=8,
239-
network_interface=features.Sriov(),
239+
network_interface=schema.NetworkInterfaceOptionSettings(
240+
nic_count=IntRange(min=2, choose_max_value=True),
241+
data_path=schema.NetworkDataPath.Sriov,
242+
),
240243
),
241244
)
242245
def stress_sriov_with_max_nics_reboot(self, environment: Environment) -> None:
@@ -250,7 +253,7 @@ def stress_sriov_with_max_nics_reboot(self, environment: Environment) -> None:
250253

251254
@TestCaseMetadata(
252255
description="""
253-
This case verify VM works well when provisioning with max (8) sriov nics.
256+
This case verify VM works well when provisioning with max sriov nics.
254257
255258
Steps,
256259
1. Provision VM with max network interfaces with enabling accelerated network.
@@ -261,8 +264,10 @@ def stress_sriov_with_max_nics_reboot(self, environment: Environment) -> None:
261264
""",
262265
priority=2,
263266
requirement=simple_requirement(
264-
min_nic_count=8,
265-
network_interface=features.Sriov(),
267+
network_interface=schema.NetworkInterfaceOptionSettings(
268+
nic_count=IntRange(min=2, choose_max_value=True),
269+
data_path=schema.NetworkDataPath.Sriov,
270+
),
266271
),
267272
)
268273
def stress_sriov_with_max_nics_reboot_from_platform(
@@ -279,7 +284,7 @@ def stress_sriov_with_max_nics_reboot_from_platform(
279284

280285
@TestCaseMetadata(
281286
description="""
282-
This case verify VM works well when provisioning with max (8) sriov nics.
287+
This case verify VM works well when provisioning with max sriov nics.
283288
284289
Steps,
285290
1. Provision VM with max network interfaces with enabling accelerated network.
@@ -290,8 +295,10 @@ def stress_sriov_with_max_nics_reboot_from_platform(
290295
""",
291296
priority=2,
292297
requirement=simple_requirement(
293-
min_nic_count=8,
294-
network_interface=features.Sriov(),
298+
network_interface=schema.NetworkInterfaceOptionSettings(
299+
nic_count=IntRange(min=2, choose_max_value=True),
300+
data_path=schema.NetworkDataPath.Sriov,
301+
)
295302
),
296303
)
297304
def stress_sriov_with_max_nics_stop_start_from_platform(

0 commit comments

Comments
 (0)