xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1[
2    {
3        "id": "b078",
4        "name": "Add simple action",
5        "category": [
6            "actions",
7            "simple"
8        ],
9        "setup": [
10            [
11                "$TC actions flush action simple",
12                0,
13                1,
14                255
15            ]
16        ],
17        "cmdUnderTest": "$TC actions add action simple sdata \"A triumph\" index 60",
18        "expExitCode": "0",
19        "verifyCmd": "$TC actions list action simple",
20        "matchPattern": "action order [0-9]*: Simple <A triumph>.*index 60 ref",
21        "matchCount": "1",
22        "teardown": [
23            "$TC actions flush action simple"
24        ]
25    },
26    {
27        "id": "6d4c",
28        "name": "Add simple action with duplicate index",
29        "category": [
30            "actions",
31            "simple"
32        ],
33        "setup": [
34            [
35                "$TC actions flush action simple",
36                0,
37                1,
38                255
39            ],
40            "$TC actions add action simple sdata \"Aruba\" index 4"
41        ],
42        "cmdUnderTest": "$TC actions add action simple sdata \"Jamaica\" index 4",
43        "expExitCode": "255",
44        "verifyCmd": "$TC actions list action simple",
45        "matchPattern": "action order [0-9]*: Simple <Jamaica>.*ref",
46        "matchCount": "0",
47        "teardown": [
48            "$TC actions flush action simple"
49        ]
50    },
51    {
52        "id": "2542",
53        "name": "List simple actions",
54        "category": [
55            "actions",
56            "simple"
57        ],
58        "setup": [
59            [
60                "$TC actions flush action simple",
61                0,
62                1,
63                255
64            ],
65            "$TC actions add action simple sdata \"Rock\"",
66            "$TC actions add action simple sdata \"Paper\"",
67            "$TC actions add action simple sdata \"Scissors\" index 98"
68        ],
69        "cmdUnderTest": "$TC actions list action simple",
70        "expExitCode": "0",
71        "verifyCmd": "$TC actions list action simple",
72        "matchPattern": "action order [0-9]*: Simple <[A-Z][a-z]*>",
73        "matchCount": "3",
74        "teardown": [
75            "$TC actions flush action simple"
76        ]
77    },
78    {
79        "id": "ea67",
80        "name": "Delete simple action",
81        "category": [
82            "actions",
83            "simple"
84        ],
85        "setup": [
86            [
87                "$TC actions flush action simple",
88                0,
89                1,
90                255
91            ],
92            "$TC actions add action simple sdata \"Blinkenlights\" index 1"
93        ],
94        "cmdUnderTest": "$TC actions delete action simple index 1",
95        "expExitCode": "0",
96        "verifyCmd": "$TC actions list action simple",
97        "matchPattern": "action order [0-9]*: Simple <Blinkenlights>.*index 1 ref",
98        "matchCount": "0",
99        "teardown": [
100            "$TC actions flush action simple"
101        ]
102    },
103    {
104        "id": "8ff1",
105        "name": "Flush simple actions",
106        "category": [
107            "actions",
108            "simple"
109        ],
110        "setup": [
111            [
112                "$TC actions flush action simple",
113                0,
114                1,
115                255
116            ],
117            "$TC actions add action simple sdata \"Kirk\"",
118            "$TC actions add action simple sdata \"Spock\" index 50",
119            "$TC actions add action simple sdata \"McCoy\" index 9"
120        ],
121        "cmdUnderTest": "$TC actions flush action simple",
122        "expExitCode": "0",
123        "verifyCmd": "$TC actions list action simple",
124        "matchPattern": "action order [0-9]*: Simple <[A-Z][a-z]*>",
125        "matchCount": "0",
126        "teardown": [
127            ""
128        ]
129    },
130    {
131        "id": "b776",
132        "name": "Replace simple action with invalid goto chain control",
133        "category": [
134            "actions",
135            "simple"
136        ],
137        "setup": [
138            [
139                "$TC actions flush action simple",
140                0,
141                1,
142                255
143            ],
144            "$TC actions add action simple sdata \"hello\" pass index 90"
145        ],
146        "cmdUnderTest": "$TC actions replace action simple sdata \"world\" goto chain 42 index  90 cookie c1a0c1a0",
147        "expExitCode": "255",
148        "verifyCmd": "$TC actions list action simple",
149        "matchPattern": "action order [0-9]*: Simple <hello>.*index 90 ref",
150        "matchCount": "1",
151        "teardown": [
152            "$TC actions flush action simple"
153        ]
154    }
155]
156