From 57cef80ae22c847974613e6ff060af1723747a3f Mon Sep 17 00:00:00 2001 From: mcgov Date: Mon, 31 Oct 2022 10:27:59 -0700 Subject: [PATCH] DPDK: add duration variable to enable longer tests (#2355) Testing for longer durations in TiP sessions will help shake out QoS and SLB issues, adding an option to run for longer than 15 seconds to enable this testing when not running in prod. --- microsoft/testsuites/dpdk/dpdkutil.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/microsoft/testsuites/dpdk/dpdkutil.py b/microsoft/testsuites/dpdk/dpdkutil.py index 428c27625..62c363b01 100644 --- a/microsoft/testsuites/dpdk/dpdkutil.py +++ b/microsoft/testsuites/dpdk/dpdkutil.py @@ -447,6 +447,10 @@ def verify_dpdk_send_receive( raise SkippedException() log.debug((f"\nsender:{external_ips[0]}\nreceiver:{external_ips[1]}\n")) + # get test duration variable if set + # enables long-running tests to shakeQoS and SLB issue + test_duration: int = variables.get("dpdk_test_duration", 15) + test_kits = init_nodes_concurrent(environment, log, variables, pmd) check_send_receive_compatibility(test_kits) @@ -461,7 +465,7 @@ def verify_dpdk_send_receive( use_service_cores=use_service_cores, ) - results = run_testpmd_concurrent(kit_cmd_pairs, 15, log) + results = run_testpmd_concurrent(kit_cmd_pairs, test_duration, log) # helpful to have the outputs labeled log.debug(f"\nSENDER:\n{results[sender]}") @@ -492,6 +496,10 @@ def verify_dpdk_send_receive_multi_txrx_queue( use_service_cores: int = 1, ) -> Tuple[DpdkTestResources, DpdkTestResources]: + # get test duration variable if set + # enables long-running tests to shakeQoS and SLB issue + test_duration: int = variables.get("dpdk_test_duration", 15) + test_kits = init_nodes_concurrent(environment, log, variables, pmd) check_send_receive_compatibility(test_kits) @@ -508,7 +516,7 @@ def verify_dpdk_send_receive_multi_txrx_queue( use_service_cores=use_service_cores, ) - results = run_testpmd_concurrent(kit_cmd_pairs, 15, log) + results = run_testpmd_concurrent(kit_cmd_pairs, test_duration, log) # helpful to have the outputs labeled log.debug(f"\nSENDER:\n{results[sender]}")