File: test_rnr.py

package info (click to toggle)
mpich 4.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,184 kB
  • sloc: ansic: 1,040,629; cpp: 82,270; javascript: 40,763; perl: 27,933; python: 16,041; sh: 14,676; xml: 14,418; f90: 12,916; makefile: 9,270; fortran: 8,046; java: 4,635; asm: 324; ruby: 103; awk: 27; lisp: 19; php: 8; sed: 4
file content (68 lines) | stat: -rw-r--r-- 2,569 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import pytest
import copy

@pytest.mark.functional
def test_rnr_read_cq_error(cmdline_args):
    from common import ClientServerTest

    if cmdline_args.server_id == cmdline_args.client_id:
        pytest.skip("RNR requires 2 nodes")
        return

    # Older efa kernel driver does not support RNR retry capability
    # and the test will return FI_ENOSYS.
    # Disable the strict mode for this test explicitly to mark it as skipped
    # in this case.
    cmdline_args_copy = copy.copy(cmdline_args)
    cmdline_args_copy.strict_fabtests_mode = False
    test = ClientServerTest(cmdline_args_copy, "fi_efa_rnr_read_cq_error")
    test.run()

packet_type_option_map = {
    "cts" : "-c 0 -S 1048576",
    "readrsp" : "-c 0 -o read -S 4",
    "atomrsp" : "-c 0 -A read -S 4",
    "receipt" : "-c 0 -U -S 4",
    "eager_msgrtm" : "-c 1 -S 4",
    "eager_tagrtm" : "-c 1 -T -S 4",
    "medium_msgrtm" : "-c 1 -S 16384",
    "medium_tagrtm" : "-c 1 -T -S 16384",
    "longcts_msgrtm" : "-c 1 -S 1048576",
    "longcts_tagrtm" : "-c 1 -T -S 1048576",
    "eager_rtw" : "-c 1 -o write -S 4",
    "longcts_rtw" : "-c 1 -o write -S 1048576",
    "short_rtr" : "-c 1 -o read -S 4",
    "longcts_rtr" : "-c 1 -o read -S 1048576",
    "write_rta" : "-c 1 -A write -S 4",
    "fetch_rta" : "-c 1 -A read -S 4",
    "compare_rta" : "-c 1 -A cswap -S 4",
    "dc_eager_msgrtm" : "-c 1 -U -S 4",
    "dc_eager_tagrtm" : "-c 1 -T -U -S 4",
    "dc_medium_msgrtm" : "-c 1 -U -S 16384",
    "dc_medium_tagrtm" : "-c 1 -T -U -S 16384",
    "dc_longcts_msgrtm" : "-c 1 -U -S 1048576",
    "dc_longcts_tagrtm" : "-c 1 -T -U -S 1048576",
    "dc_eager_rtw" : "-c 1 -o write -U -S 4",
    "dc_longcts_rtw" : "-c 1 -o write -U -S 1048576",
    "dc_write_rta": "-c 1 -A write -U -S 4",
    "writedata": "-c 1 -o writedata -S 4"
}

@pytest.mark.functional
@pytest.mark.parametrize("packet_type", packet_type_option_map.keys())
def test_rnr_queue_resend(cmdline_args, packet_type):
    from common import ClientServerTest

    if cmdline_args.server_id == cmdline_args.client_id:
        pytest.skip("RNR test requires 2 nodes")
        return

    # Older efa kernel driver does not support RNR retry capability
    # and the test will return FI_ENOSYS.
    # Disable the strict mode for this test explicitly to mark it as skipped
    # in this case.
    cmdline_args_copy = copy.copy(cmdline_args)
    cmdline_args_copy.strict_fabtests_mode = False
    test = ClientServerTest(cmdline_args_copy,
            "fi_efa_rnr_queue_resend " + packet_type_option_map[packet_type])
    test.run()