From 481ecdcb9a95fbfb1fa2b52822a90e9699496330 Mon Sep 17 00:00:00 2001 From: Shi Jin Date: Mon, 25 Nov 2024 19:02:49 +0000 Subject: [PATCH] fabtests/pytest/efa: merge memory_type and check_rma_bw_memory_type Merge these two fixtures as rma_bw_memory_type. Signed-off-by: Shi Jin (cherry picked from commit 364f208c98ad07119b4dff52d40e659e14488747) --- fabtests/pytest/efa/conftest.py | 3 ++- fabtests/pytest/efa/test_rma_bw.py | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fabtests/pytest/efa/conftest.py b/fabtests/pytest/efa/conftest.py index 5c8928bdef5..6192e83fa32 100644 --- a/fabtests/pytest/efa/conftest.py +++ b/fabtests/pytest/efa/conftest.py @@ -28,10 +28,11 @@ def rma_operation_type(request): return request.param @pytest.fixture(scope="module") -def check_rma_bw_memory_type(memory_type, rma_operation_type): +def rma_bw_memory_type(memory_type, rma_operation_type): is_test_bi_dir = False if rma_operation_type == "writedata" else True if is_test_bi_dir and (memory_type not in [_.values[0] for _ in memory_type_list_bi_dir]): pytest.skip("Duplicated memory type for bi-directional test") + return memory_type @pytest.fixture(scope="module", params=["r:0,4,64", diff --git a/fabtests/pytest/efa/test_rma_bw.py b/fabtests/pytest/efa/test_rma_bw.py index 8d4893d1245..f80a87ce64d 100644 --- a/fabtests/pytest/efa/test_rma_bw.py +++ b/fabtests/pytest/efa/test_rma_bw.py @@ -7,15 +7,15 @@ @pytest.mark.parametrize("iteration_type", [pytest.param("short", marks=pytest.mark.short), pytest.param("standard", marks=pytest.mark.standard)]) -def test_rma_bw(cmdline_args, iteration_type, rma_operation_type, completion_semantic, memory_type, check_rma_bw_memory_type): +def test_rma_bw(cmdline_args, iteration_type, rma_operation_type, completion_semantic, rma_bw_memory_type): command = "fi_rma_bw -e rdm" command = command + " -o " + rma_operation_type + " " + perf_progress_model_cli # rma_bw test with data verification takes longer to finish timeout = max(540, cmdline_args.timeout) - efa_run_client_server_test(cmdline_args, command, iteration_type, completion_semantic, memory_type, "all", timeout=timeout) + efa_run_client_server_test(cmdline_args, command, iteration_type, completion_semantic, rma_bw_memory_type, "all", timeout=timeout) @pytest.mark.parametrize("env_vars", [["FI_EFA_TX_SIZE=64"], ["FI_EFA_RX_SIZE=64"], ["FI_EFA_TX_SIZE=64", "FI_EFA_RX_SIZE=64"]]) -def test_rma_bw_small_tx_rx(cmdline_args, rma_operation_type, completion_semantic, memory_type, env_vars, check_rma_bw_memory_type): +def test_rma_bw_small_tx_rx(cmdline_args, rma_operation_type, completion_semantic, rma_bw_memory_type, env_vars): cmdline_args_copy = copy.copy(cmdline_args) for env_var in env_vars: cmdline_args_copy.append_environ(env_var) @@ -24,15 +24,15 @@ def test_rma_bw_small_tx_rx(cmdline_args, rma_operation_type, completion_semanti command = command + " -o " + rma_operation_type + " " + perf_progress_model_cli # rma_bw test with data verification takes longer to finish timeout = max(540, cmdline_args_copy.timeout) - efa_run_client_server_test(cmdline_args_copy, command, "short", completion_semantic, memory_type, "all", timeout=timeout) + efa_run_client_server_test(cmdline_args_copy, command, "short", completion_semantic, rma_bw_memory_type, "all", timeout=timeout) @pytest.mark.functional -def test_rma_bw_range(cmdline_args, rma_operation_type, completion_semantic, message_size, memory_type, check_rma_bw_memory_type): +def test_rma_bw_range(cmdline_args, rma_operation_type, completion_semantic, message_size, rma_bw_memory_type): command = "fi_rma_bw -e rdm" command = command + " -o " + rma_operation_type # rma_bw test with data verification takes longer to finish timeout = max(540, cmdline_args.timeout) - efa_run_client_server_test(cmdline_args, command, "short", completion_semantic, memory_type, message_size, timeout=timeout) + efa_run_client_server_test(cmdline_args, command, "short", completion_semantic, rma_bw_memory_type, message_size, timeout=timeout) @pytest.mark.functional