xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/pedit.json (revision 2b64b2ed277ff23e785fbdb65098ee7e1252d64f)
1[
2    {
3        "id": "319a",
4        "name": "Add pedit action that mangles IP TTL",
5        "category": [
6            "actions",
7            "pedit"
8        ],
9        "setup": [
10            [
11                "$TC actions flush action pedit",
12                0,
13                1,
14                255
15            ]
16        ],
17        "cmdUnderTest": "$TC actions add action pedit ex munge ip ttl set 10",
18        "expExitCode": "0",
19        "verifyCmd": "$TC actions ls action pedit",
20        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*index 1 ref.*key #0  at ipv4\\+8: val 0a000000 mask 00ffffff",
21        "matchCount": "1",
22        "teardown": [
23            "$TC actions flush action pedit"
24        ]
25    },
26    {
27        "id": "7e67",
28        "name": "Replace pedit action with invalid goto chain",
29        "category": [
30            "actions",
31            "pedit"
32        ],
33        "setup": [
34            [
35                "$TC actions flush action pedit",
36                0,
37                1,
38                255
39            ],
40            "$TC actions add action pedit ex munge ip ttl set 10 pass index 90"
41        ],
42        "cmdUnderTest": "$TC actions replace action pedit ex munge ip ttl set 10 goto chain 42 index 90 cookie c1a0c1a0",
43        "expExitCode": "255",
44        "verifyCmd": "$TC actions ls action pedit",
45        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*index 90 ref.*key #0  at ipv4\\+8: val 0a000000 mask 00ffffff",
46        "matchCount": "1",
47        "teardown": [
48            "$TC actions flush action pedit"
49        ]
50    }
51]
52