Skip to content

Commit

Permalink
fabtests/pytest/efa: merge memory_type and check_rma_bw_memory_type
Browse files Browse the repository at this point in the history
Merge these two fixtures as rma_bw_memory_type.

Signed-off-by: Shi Jin <[email protected]>
(cherry picked from commit 364f208)
  • Loading branch information
shijin-aws committed Dec 2, 2024
1 parent d701175 commit 481ecdc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion fabtests/pytest/efa/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions fabtests/pytest/efa/test_rma_bw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 481ecdc

Please sign in to comment.