xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/gact.json (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
10923edf4SLucas Bates[
20923edf4SLucas Bates    {
30923edf4SLucas Bates        "id": "e89a",
40923edf4SLucas Bates        "name": "Add valid pass action",
50923edf4SLucas Bates        "category": [
60923edf4SLucas Bates            "actions",
70923edf4SLucas Bates            "gact"
80923edf4SLucas Bates        ],
9*d227cc0bSPedro Tammela        "plugins": {
10*d227cc0bSPedro Tammela           "requires": "nsPlugin"
11*d227cc0bSPedro Tammela        },
120923edf4SLucas Bates        "setup": [
130923edf4SLucas Bates            [
140923edf4SLucas Bates                "$TC actions flush action gact",
150923edf4SLucas Bates                0,
160923edf4SLucas Bates                1,
170923edf4SLucas Bates                255
180923edf4SLucas Bates            ]
190923edf4SLucas Bates        ],
200923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action pass index 8",
210923edf4SLucas Bates        "expExitCode": "0",
220923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
230923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pass.*index 8 ref",
240923edf4SLucas Bates        "matchCount": "1",
250923edf4SLucas Bates        "teardown": [
260923edf4SLucas Bates            "$TC actions flush action gact"
270923edf4SLucas Bates        ]
280923edf4SLucas Bates    },
290923edf4SLucas Bates    {
300923edf4SLucas Bates        "id": "a02c",
310923edf4SLucas Bates        "name": "Add valid pipe action",
320923edf4SLucas Bates        "category": [
330923edf4SLucas Bates            "actions",
340923edf4SLucas Bates            "gact"
350923edf4SLucas Bates        ],
36*d227cc0bSPedro Tammela        "plugins": {
37*d227cc0bSPedro Tammela           "requires": "nsPlugin"
38*d227cc0bSPedro Tammela        },
390923edf4SLucas Bates        "setup": [
400923edf4SLucas Bates            [
410923edf4SLucas Bates                "$TC actions flush action gact",
420923edf4SLucas Bates                0,
430923edf4SLucas Bates                1,
440923edf4SLucas Bates                255
450923edf4SLucas Bates            ]
460923edf4SLucas Bates        ],
470923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action pipe index 6",
480923edf4SLucas Bates        "expExitCode": "0",
490923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
500923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pipe.*index 6 ref",
510923edf4SLucas Bates        "matchCount": "1",
520923edf4SLucas Bates        "teardown": [
530923edf4SLucas Bates            "$TC actions flush action gact"
540923edf4SLucas Bates        ]
550923edf4SLucas Bates    },
560923edf4SLucas Bates    {
570923edf4SLucas Bates        "id": "feef",
580923edf4SLucas Bates        "name": "Add valid reclassify action",
590923edf4SLucas Bates        "category": [
600923edf4SLucas Bates            "actions",
610923edf4SLucas Bates            "gact"
620923edf4SLucas Bates        ],
63*d227cc0bSPedro Tammela        "plugins": {
64*d227cc0bSPedro Tammela           "requires": "nsPlugin"
65*d227cc0bSPedro Tammela        },
660923edf4SLucas Bates        "setup": [
670923edf4SLucas Bates            [
680923edf4SLucas Bates                "$TC actions flush action gact",
690923edf4SLucas Bates                0,
700923edf4SLucas Bates                1,
710923edf4SLucas Bates                255
720923edf4SLucas Bates            ]
730923edf4SLucas Bates        ],
740923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action reclassify index 5",
750923edf4SLucas Bates        "expExitCode": "0",
760923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
770923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action reclassify.*index 5 ref",
780923edf4SLucas Bates        "matchCount": "1",
790923edf4SLucas Bates        "teardown": [
800923edf4SLucas Bates            "$TC actions flush action gact"
810923edf4SLucas Bates        ]
820923edf4SLucas Bates    },
830923edf4SLucas Bates    {
840923edf4SLucas Bates        "id": "8a7a",
850923edf4SLucas Bates        "name": "Add valid drop action",
860923edf4SLucas Bates        "category": [
870923edf4SLucas Bates            "actions",
880923edf4SLucas Bates            "gact"
890923edf4SLucas Bates        ],
90*d227cc0bSPedro Tammela        "plugins": {
91*d227cc0bSPedro Tammela           "requires": "nsPlugin"
92*d227cc0bSPedro Tammela        },
930923edf4SLucas Bates        "setup": [
940923edf4SLucas Bates            [
950923edf4SLucas Bates                "$TC actions flush action gact",
960923edf4SLucas Bates                0,
970923edf4SLucas Bates                1,
980923edf4SLucas Bates                255
990923edf4SLucas Bates            ]
1000923edf4SLucas Bates        ],
1010923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action drop index 30",
1020923edf4SLucas Bates        "expExitCode": "0",
1030923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
1040923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 30 ref",
1050923edf4SLucas Bates        "matchCount": "1",
1060923edf4SLucas Bates        "teardown": [
1070923edf4SLucas Bates            "$TC actions flush action gact"
1080923edf4SLucas Bates        ]
1090923edf4SLucas Bates    },
1100923edf4SLucas Bates    {
1110923edf4SLucas Bates        "id": "9a52",
1120923edf4SLucas Bates        "name": "Add valid continue action",
1130923edf4SLucas Bates        "category": [
1140923edf4SLucas Bates            "actions",
1150923edf4SLucas Bates            "gact"
1160923edf4SLucas Bates        ],
117*d227cc0bSPedro Tammela        "plugins": {
118*d227cc0bSPedro Tammela           "requires": "nsPlugin"
119*d227cc0bSPedro Tammela        },
1200923edf4SLucas Bates        "setup": [
1210923edf4SLucas Bates            [
1220923edf4SLucas Bates                "$TC actions flush action gact",
1230923edf4SLucas Bates                0,
1240923edf4SLucas Bates                1,
1250923edf4SLucas Bates                255
1260923edf4SLucas Bates            ]
1270923edf4SLucas Bates        ],
1280923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action continue index 432",
1290923edf4SLucas Bates        "expExitCode": "0",
1300923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
1310923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action continue.*index 432 ref",
1320923edf4SLucas Bates        "matchCount": "1",
1330923edf4SLucas Bates        "teardown": [
1340923edf4SLucas Bates            "$TC actions flush action gact"
1350923edf4SLucas Bates        ]
1360923edf4SLucas Bates    },
1370923edf4SLucas Bates    {
1380923edf4SLucas Bates        "id": "d700",
1390923edf4SLucas Bates        "name": "Add invalid action",
1400923edf4SLucas Bates        "category": [
1410923edf4SLucas Bates            "actions",
1420923edf4SLucas Bates            "gact"
1430923edf4SLucas Bates        ],
144*d227cc0bSPedro Tammela        "plugins": {
145*d227cc0bSPedro Tammela           "requires": "nsPlugin"
146*d227cc0bSPedro Tammela        },
1470923edf4SLucas Bates        "setup": [
1480923edf4SLucas Bates            [
1490923edf4SLucas Bates                "$TC actions flush action gact",
1500923edf4SLucas Bates                0,
1510923edf4SLucas Bates                1,
1520923edf4SLucas Bates                255
1530923edf4SLucas Bates            ]
1540923edf4SLucas Bates        ],
1550923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action pump index 386",
1560923edf4SLucas Bates        "expExitCode": "255",
1570923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
1580923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action.*index 386 ref",
1590923edf4SLucas Bates        "matchCount": "0",
1600923edf4SLucas Bates        "teardown": [
1610923edf4SLucas Bates            "$TC actions flush action gact"
1620923edf4SLucas Bates        ]
1630923edf4SLucas Bates    },
1640923edf4SLucas Bates    {
1650923edf4SLucas Bates        "id": "9215",
1660923edf4SLucas Bates        "name": "Add action with duplicate index",
1670923edf4SLucas Bates        "category": [
1680923edf4SLucas Bates            "actions",
1690923edf4SLucas Bates            "gact"
1700923edf4SLucas Bates        ],
171*d227cc0bSPedro Tammela        "plugins": {
172*d227cc0bSPedro Tammela           "requires": "nsPlugin"
173*d227cc0bSPedro Tammela        },
1740923edf4SLucas Bates        "setup": [
1750923edf4SLucas Bates            [
1760923edf4SLucas Bates                "$TC actions flush action gact",
1770923edf4SLucas Bates                0,
1780923edf4SLucas Bates                1,
1790923edf4SLucas Bates                255
1800923edf4SLucas Bates            ],
1810923edf4SLucas Bates            "$TC actions add action pipe index 15"
1820923edf4SLucas Bates        ],
1830923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action drop index 15",
1840923edf4SLucas Bates        "expExitCode": "255",
1850923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
1860923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 15 ref",
1870923edf4SLucas Bates        "matchCount": "0",
1880923edf4SLucas Bates        "teardown": [
1890923edf4SLucas Bates            "$TC actions flush action gact"
1900923edf4SLucas Bates        ]
1910923edf4SLucas Bates    },
1920923edf4SLucas Bates    {
1930923edf4SLucas Bates        "id": "798e",
1940923edf4SLucas Bates        "name": "Add action with index exceeding 32-bit maximum",
1950923edf4SLucas Bates        "category": [
1960923edf4SLucas Bates            "actions",
1970923edf4SLucas Bates            "gact"
1980923edf4SLucas Bates        ],
199*d227cc0bSPedro Tammela        "plugins": {
200*d227cc0bSPedro Tammela           "requires": "nsPlugin"
201*d227cc0bSPedro Tammela        },
2020923edf4SLucas Bates        "setup": [
2030923edf4SLucas Bates            [
2040923edf4SLucas Bates                "$TC actions flush action gact",
2050923edf4SLucas Bates                0,
2060923edf4SLucas Bates                1,
2070923edf4SLucas Bates                255
2080923edf4SLucas Bates            ]
2090923edf4SLucas Bates        ],
2100923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action drop index 4294967296",
2110923edf4SLucas Bates        "expExitCode": "255",
2120923edf4SLucas Bates        "verifyCmd": "actions list action gact",
2130923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 4294967296 ref",
2140923edf4SLucas Bates        "matchCount": "0",
2150923edf4SLucas Bates        "teardown": [
2160923edf4SLucas Bates            "$TC actions flush action gact"
2170923edf4SLucas Bates        ]
2180923edf4SLucas Bates    },
2190923edf4SLucas Bates    {
2200923edf4SLucas Bates        "id": "22be",
2210923edf4SLucas Bates        "name": "Add action with index at 32-bit maximum",
2220923edf4SLucas Bates        "category": [
2230923edf4SLucas Bates            "actions",
2240923edf4SLucas Bates            "gact"
2250923edf4SLucas Bates        ],
226*d227cc0bSPedro Tammela        "plugins": {
227*d227cc0bSPedro Tammela           "requires": "nsPlugin"
228*d227cc0bSPedro Tammela        },
2290923edf4SLucas Bates        "setup": [
2300923edf4SLucas Bates            [
2310923edf4SLucas Bates                "$TC actions flush action gact",
2320923edf4SLucas Bates                0,
2330923edf4SLucas Bates                1,
2340923edf4SLucas Bates                255
2350923edf4SLucas Bates            ]
2360923edf4SLucas Bates        ],
2370923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action drop index 4294967295",
2380923edf4SLucas Bates        "expExitCode": "0",
2390923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
2400923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 4294967295 ref",
2410923edf4SLucas Bates        "matchCount": "1",
2420923edf4SLucas Bates        "teardown": [
2430923edf4SLucas Bates            "$TC actions flush action gact"
2440923edf4SLucas Bates        ]
2450923edf4SLucas Bates    },
2460923edf4SLucas Bates    {
2470923edf4SLucas Bates        "id": "ac2a",
2480923edf4SLucas Bates        "name": "List actions",
2490923edf4SLucas Bates        "category": [
2500923edf4SLucas Bates            "actions",
2510923edf4SLucas Bates            "gact"
2520923edf4SLucas Bates        ],
253*d227cc0bSPedro Tammela        "plugins": {
254*d227cc0bSPedro Tammela           "requires": "nsPlugin"
255*d227cc0bSPedro Tammela        },
2560923edf4SLucas Bates        "setup": [
2570923edf4SLucas Bates            [
2580923edf4SLucas Bates                "$TC actions flush action gact",
2590923edf4SLucas Bates                0,
2600923edf4SLucas Bates                1,
2610923edf4SLucas Bates                255
2620923edf4SLucas Bates            ],
2630923edf4SLucas Bates            "$TC actions add action reclassify index 101",
2640923edf4SLucas Bates            "$TC actions add action reclassify index 102",
2650923edf4SLucas Bates            "$TC actions add action reclassify index 103",
2660923edf4SLucas Bates            "$TC actions add action reclassify index 104",
2670923edf4SLucas Bates            "$TC actions add action reclassify index 105"
2680923edf4SLucas Bates        ],
2690923edf4SLucas Bates        "cmdUnderTest": "$TC actions list action gact",
2700923edf4SLucas Bates        "expExitCode": "0",
2710923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
2720923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action reclassify",
2730923edf4SLucas Bates        "matchCount": "5",
2740923edf4SLucas Bates        "teardown": [
2750923edf4SLucas Bates            "$TC actions flush action gact"
2760923edf4SLucas Bates        ]
2770923edf4SLucas Bates    },
2780923edf4SLucas Bates    {
2790923edf4SLucas Bates        "id": "3edf",
2800923edf4SLucas Bates        "name": "Flush gact actions",
2810923edf4SLucas Bates        "category": [
2820923edf4SLucas Bates            "actions",
2830923edf4SLucas Bates            "gact"
2840923edf4SLucas Bates        ],
285*d227cc0bSPedro Tammela        "plugins": {
286*d227cc0bSPedro Tammela           "requires": "nsPlugin"
287*d227cc0bSPedro Tammela        },
2880923edf4SLucas Bates        "setup": [
2890923edf4SLucas Bates            "$TC actions add action reclassify index 101",
2900923edf4SLucas Bates            "$TC actions add action reclassify index 102",
2910923edf4SLucas Bates            "$TC actions add action reclassify index 103",
2920923edf4SLucas Bates            "$TC actions add action reclassify index 104",
2930923edf4SLucas Bates            "$TC actions add action reclassify index 105"
2940923edf4SLucas Bates        ],
2950923edf4SLucas Bates        "cmdUnderTest": "$TC actions flush action gact",
2960923edf4SLucas Bates        "expExitCode": "0",
2970923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
2980923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action reclassify",
2990923edf4SLucas Bates        "matchCount": "0",
3000923edf4SLucas Bates        "teardown": []
3010923edf4SLucas Bates    },
3020923edf4SLucas Bates    {
3030923edf4SLucas Bates        "id": "63ec",
3040923edf4SLucas Bates        "name": "Delete pass action",
3050923edf4SLucas Bates        "category": [
3060923edf4SLucas Bates            "actions",
3070923edf4SLucas Bates            "gact"
3080923edf4SLucas Bates        ],
309*d227cc0bSPedro Tammela        "plugins": {
310*d227cc0bSPedro Tammela           "requires": "nsPlugin"
311*d227cc0bSPedro Tammela        },
3120923edf4SLucas Bates        "setup": [
3130923edf4SLucas Bates            [
3140923edf4SLucas Bates                "$TC actions flush action gact",
3150923edf4SLucas Bates                0,
3160923edf4SLucas Bates                1,
3170923edf4SLucas Bates                255
3180923edf4SLucas Bates            ],
3190923edf4SLucas Bates            "$TC actions add action pass index 1"
3200923edf4SLucas Bates        ],
3210923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 1",
3220923edf4SLucas Bates        "expExitCode": "0",
3230923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
3240923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pass.*index 1 ref",
3250923edf4SLucas Bates        "matchCount": "0",
3260923edf4SLucas Bates        "teardown": [
3270923edf4SLucas Bates            "$TC actions flush action gact"
3280923edf4SLucas Bates        ]
3290923edf4SLucas Bates    },
3300923edf4SLucas Bates    {
3310923edf4SLucas Bates        "id": "46be",
3320923edf4SLucas Bates        "name": "Delete pipe action",
3330923edf4SLucas Bates        "category": [
3340923edf4SLucas Bates            "actions",
3350923edf4SLucas Bates            "gact"
3360923edf4SLucas Bates        ],
337*d227cc0bSPedro Tammela        "plugins": {
338*d227cc0bSPedro Tammela           "requires": "nsPlugin"
339*d227cc0bSPedro Tammela        },
3400923edf4SLucas Bates        "setup": [
3410923edf4SLucas Bates            [
3420923edf4SLucas Bates                "$TC actions flush action gact",
3430923edf4SLucas Bates                0,
3440923edf4SLucas Bates                1,
3450923edf4SLucas Bates                255
3460923edf4SLucas Bates            ],
3470923edf4SLucas Bates            "$TC actions add action pipe index 9"
3480923edf4SLucas Bates        ],
3490923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 9",
3500923edf4SLucas Bates        "expExitCode": "0",
3510923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
3520923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pipe.*index 9 ref",
3530923edf4SLucas Bates        "matchCount": "0",
3540923edf4SLucas Bates        "teardown": [
3550923edf4SLucas Bates            "$TC actions flush action gact"
3560923edf4SLucas Bates        ]
3570923edf4SLucas Bates    },
3580923edf4SLucas Bates    {
3590923edf4SLucas Bates        "id": "2e08",
3600923edf4SLucas Bates        "name": "Delete reclassify action",
3610923edf4SLucas Bates        "category": [
3620923edf4SLucas Bates            "actions",
3630923edf4SLucas Bates            "gact"
3640923edf4SLucas Bates        ],
365*d227cc0bSPedro Tammela        "plugins": {
366*d227cc0bSPedro Tammela           "requires": "nsPlugin"
367*d227cc0bSPedro Tammela        },
3680923edf4SLucas Bates        "setup": [
3690923edf4SLucas Bates            [
3700923edf4SLucas Bates                "$TC actions flush action gact",
3710923edf4SLucas Bates                0,
3720923edf4SLucas Bates                1,
3730923edf4SLucas Bates                255
3740923edf4SLucas Bates            ],
3750923edf4SLucas Bates            "$TC actions add action reclassify index 65536"
3760923edf4SLucas Bates        ],
3770923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 65536",
3780923edf4SLucas Bates        "expExitCode": "0",
3790923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
3800923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action reclassify.*index 65536 ref",
3810923edf4SLucas Bates        "matchCount": "0",
3820923edf4SLucas Bates        "teardown": [
3830923edf4SLucas Bates            "$TC actions flush action gact"
3840923edf4SLucas Bates        ]
3850923edf4SLucas Bates    },
3860923edf4SLucas Bates    {
3870923edf4SLucas Bates        "id": "99c4",
3880923edf4SLucas Bates        "name": "Delete drop action",
3890923edf4SLucas Bates        "category": [
3900923edf4SLucas Bates            "actions",
3910923edf4SLucas Bates            "gact"
3920923edf4SLucas Bates        ],
393*d227cc0bSPedro Tammela        "plugins": {
394*d227cc0bSPedro Tammela           "requires": "nsPlugin"
395*d227cc0bSPedro Tammela        },
3960923edf4SLucas Bates        "setup": [
3970923edf4SLucas Bates            [
3980923edf4SLucas Bates                "$TC actions flush action gact",
3990923edf4SLucas Bates                0,
4000923edf4SLucas Bates                1,
4010923edf4SLucas Bates                255
4020923edf4SLucas Bates            ],
4030923edf4SLucas Bates            "$TC actions add action drop index 16"
4040923edf4SLucas Bates        ],
4050923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 16",
4060923edf4SLucas Bates        "expExitCode": "0",
4070923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
4080923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 16 ref",
4090923edf4SLucas Bates        "matchCount": "0",
4100923edf4SLucas Bates        "teardown": [
4110923edf4SLucas Bates            "$TC actions flush action gact"
4120923edf4SLucas Bates        ]
4130923edf4SLucas Bates    },
4140923edf4SLucas Bates    {
4150923edf4SLucas Bates        "id": "fb6b",
4160923edf4SLucas Bates        "name": "Delete continue action",
4170923edf4SLucas Bates        "category": [
4180923edf4SLucas Bates            "actions",
4190923edf4SLucas Bates            "gact"
4200923edf4SLucas Bates        ],
421*d227cc0bSPedro Tammela        "plugins": {
422*d227cc0bSPedro Tammela           "requires": "nsPlugin"
423*d227cc0bSPedro Tammela        },
4240923edf4SLucas Bates        "setup": [
4250923edf4SLucas Bates            [
4260923edf4SLucas Bates                "$TC actions flush action gact",
4270923edf4SLucas Bates                0,
4280923edf4SLucas Bates                1,
4290923edf4SLucas Bates                255
4300923edf4SLucas Bates            ],
4310923edf4SLucas Bates            "$TC actions add action continue index 32"
4320923edf4SLucas Bates        ],
4330923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 32",
4340923edf4SLucas Bates        "expExitCode": "0",
4350923edf4SLucas Bates        "verifyCmd": "actions list action gact",
4360923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action continue.*index 32 ref",
4370923edf4SLucas Bates        "matchCount": "0",
4380923edf4SLucas Bates        "teardown": [
4390923edf4SLucas Bates            "$TC actions flush action gact"
4400923edf4SLucas Bates        ]
4410923edf4SLucas Bates    },
4420923edf4SLucas Bates    {
4430923edf4SLucas Bates        "id": "0eb3",
4440923edf4SLucas Bates        "name": "Delete non-existent action",
4450923edf4SLucas Bates        "category": [
4460923edf4SLucas Bates            "actions",
4470923edf4SLucas Bates            "gact"
4480923edf4SLucas Bates        ],
449*d227cc0bSPedro Tammela        "plugins": {
450*d227cc0bSPedro Tammela           "requires": "nsPlugin"
451*d227cc0bSPedro Tammela        },
4520923edf4SLucas Bates        "setup": [
4530923edf4SLucas Bates            [
4540923edf4SLucas Bates                "$TC actions flush action gact",
4550923edf4SLucas Bates                0,
4560923edf4SLucas Bates                1,
4570923edf4SLucas Bates                255
4580923edf4SLucas Bates            ]
4590923edf4SLucas Bates        ],
4600923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 2",
4610923edf4SLucas Bates        "expExitCode": "255",
4620923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
4630923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action",
4640923edf4SLucas Bates        "matchCount": "0",
4650923edf4SLucas Bates        "teardown": [
4660923edf4SLucas Bates            "$TC actions flush action gact"
4670923edf4SLucas Bates        ]
4680923edf4SLucas Bates    },
4690923edf4SLucas Bates    {
4700923edf4SLucas Bates        "id": "f02c",
4710923edf4SLucas Bates        "name": "Replace gact action",
4720923edf4SLucas Bates        "category": [
4730923edf4SLucas Bates            "actions",
4740923edf4SLucas Bates            "gact"
4750923edf4SLucas Bates        ],
476*d227cc0bSPedro Tammela        "plugins": {
477*d227cc0bSPedro Tammela           "requires": "nsPlugin"
478*d227cc0bSPedro Tammela        },
4790923edf4SLucas Bates        "setup": [
4800923edf4SLucas Bates            [
4810923edf4SLucas Bates                "$TC actions flush action gact",
4820923edf4SLucas Bates                0,
4830923edf4SLucas Bates                1,
4840923edf4SLucas Bates                255
4850923edf4SLucas Bates            ],
4860923edf4SLucas Bates            "$TC actions add action drop index 10",
4870923edf4SLucas Bates            "$TC actions add action drop index 12"
4880923edf4SLucas Bates        ],
4890923edf4SLucas Bates        "cmdUnderTest": "$TC actions replace action ok index 12",
4900923edf4SLucas Bates        "expExitCode": "0",
4910923edf4SLucas Bates        "verifyCmd": "$TC actions ls action gact",
4920923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pass",
4930923edf4SLucas Bates        "matchCount": "1",
4940923edf4SLucas Bates        "teardown": [
4950923edf4SLucas Bates            "$TC actions flush action gact"
4960923edf4SLucas Bates        ]
4970923edf4SLucas Bates    },
4980923edf4SLucas Bates    {
4990923edf4SLucas Bates        "id": "525f",
5000923edf4SLucas Bates        "name": "Get gact action by index",
5010923edf4SLucas Bates        "category": [
5020923edf4SLucas Bates            "actions",
5030923edf4SLucas Bates            "gact"
5040923edf4SLucas Bates        ],
505*d227cc0bSPedro Tammela        "plugins": {
506*d227cc0bSPedro Tammela           "requires": "nsPlugin"
507*d227cc0bSPedro Tammela        },
5080923edf4SLucas Bates        "setup": [
5090923edf4SLucas Bates            [
5100923edf4SLucas Bates                "$TC actions flush action gact",
5110923edf4SLucas Bates                0,
5120923edf4SLucas Bates                1,
5130923edf4SLucas Bates                255
5140923edf4SLucas Bates            ],
5150923edf4SLucas Bates            "$TC actions add action drop index 3900800700"
5160923edf4SLucas Bates        ],
5170923edf4SLucas Bates        "cmdUnderTest": "$TC actions get action gact index 3900800700",
5180923edf4SLucas Bates        "expExitCode": "0",
5190923edf4SLucas Bates        "verifyCmd": "$TC actions get action gact index 3900800700",
5200923edf4SLucas Bates        "matchPattern": "index 3900800700",
5210923edf4SLucas Bates        "matchCount": "1",
5220923edf4SLucas Bates        "teardown": [
5230923edf4SLucas Bates            "$TC actions flush action gact"
5240923edf4SLucas Bates        ]
5259ba32046SRoman Mashak    },
5269ba32046SRoman Mashak    {
5279ba32046SRoman Mashak        "id": "1021",
5289ba32046SRoman Mashak        "name": "Add batch of 32 gact pass actions",
5299ba32046SRoman Mashak        "category": [
5309ba32046SRoman Mashak            "actions",
5319ba32046SRoman Mashak            "gact"
5329ba32046SRoman Mashak        ],
533*d227cc0bSPedro Tammela        "plugins": {
534*d227cc0bSPedro Tammela           "requires": "nsPlugin"
535*d227cc0bSPedro Tammela        },
5369ba32046SRoman Mashak        "setup": [
5379ba32046SRoman Mashak            [
5389ba32046SRoman Mashak                "$TC actions flush action gact",
5399ba32046SRoman Mashak                0,
5409ba32046SRoman Mashak                1,
5419ba32046SRoman Mashak                255
5429ba32046SRoman Mashak            ]
5439ba32046SRoman Mashak        ],
544cd464197SLucas Bates        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action pass index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
5459ba32046SRoman Mashak        "expExitCode": "0",
5469ba32046SRoman Mashak        "verifyCmd": "$TC actions list action gact",
5479ba32046SRoman Mashak        "matchPattern": "^[ \t]+index [0-9]+ ref",
5489ba32046SRoman Mashak        "matchCount": "32",
5499ba32046SRoman Mashak        "teardown": [
5509ba32046SRoman Mashak            "$TC actions flush action gact"
5519ba32046SRoman Mashak        ]
5529ba32046SRoman Mashak    },
5539ba32046SRoman Mashak    {
5549ba32046SRoman Mashak        "id": "da7a",
5559ba32046SRoman Mashak        "name": "Add batch of 32 gact continue actions with cookie",
5569ba32046SRoman Mashak        "category": [
5579ba32046SRoman Mashak            "actions",
5589ba32046SRoman Mashak            "gact"
5599ba32046SRoman Mashak        ],
560*d227cc0bSPedro Tammela        "plugins": {
561*d227cc0bSPedro Tammela           "requires": "nsPlugin"
562*d227cc0bSPedro Tammela        },
5639ba32046SRoman Mashak        "setup": [
5649ba32046SRoman Mashak            [
5659ba32046SRoman Mashak                "$TC actions flush action gact",
5669ba32046SRoman Mashak                0,
5679ba32046SRoman Mashak                1,
5689ba32046SRoman Mashak                255
5699ba32046SRoman Mashak            ]
5709ba32046SRoman Mashak        ],
571cd464197SLucas Bates        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action continue index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
5729ba32046SRoman Mashak        "expExitCode": "0",
5739ba32046SRoman Mashak        "verifyCmd": "$TC actions list action gact",
5749ba32046SRoman Mashak        "matchPattern": "^[ \t]+index [0-9]+ ref",
5759ba32046SRoman Mashak        "matchCount": "32",
5769ba32046SRoman Mashak        "teardown": [
5779ba32046SRoman Mashak            "$TC actions flush action gact"
5789ba32046SRoman Mashak        ]
5799ba32046SRoman Mashak    },
5809ba32046SRoman Mashak    {
5819ba32046SRoman Mashak        "id": "8aa3",
5829ba32046SRoman Mashak        "name": "Delete batch of 32 gact continue actions",
5839ba32046SRoman Mashak        "category": [
5849ba32046SRoman Mashak            "actions",
5859ba32046SRoman Mashak            "gact"
5869ba32046SRoman Mashak        ],
587*d227cc0bSPedro Tammela        "plugins": {
588*d227cc0bSPedro Tammela           "requires": "nsPlugin"
589*d227cc0bSPedro Tammela        },
5909ba32046SRoman Mashak        "setup": [
5919ba32046SRoman Mashak            [
5929ba32046SRoman Mashak                "$TC actions flush action gact",
5939ba32046SRoman Mashak                0,
5949ba32046SRoman Mashak                1,
5959ba32046SRoman Mashak                255
5969ba32046SRoman Mashak            ],
597cd464197SLucas Bates            "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action continue index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
5989ba32046SRoman Mashak        ],
599cd464197SLucas Bates        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action gact index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
6009ba32046SRoman Mashak        "expExitCode": "0",
6019ba32046SRoman Mashak        "verifyCmd": "$TC actions list action gact",
6029ba32046SRoman Mashak        "matchPattern": "^[ \t]+index [0-9]+ ref",
6039ba32046SRoman Mashak        "matchCount": "0",
6049ba32046SRoman Mashak        "teardown": []
60588c2e3b4SDavide Caratti    },
60688c2e3b4SDavide Caratti    {
60788c2e3b4SDavide Caratti        "id": "8e47",
60888c2e3b4SDavide Caratti        "name": "Add gact action with random determ goto chain control action",
60988c2e3b4SDavide Caratti        "category": [
61088c2e3b4SDavide Caratti            "actions",
61188c2e3b4SDavide Caratti            "gact"
61288c2e3b4SDavide Caratti        ],
613*d227cc0bSPedro Tammela        "plugins": {
614*d227cc0bSPedro Tammela           "requires": "nsPlugin"
615*d227cc0bSPedro Tammela        },
61688c2e3b4SDavide Caratti        "setup": [
61788c2e3b4SDavide Caratti            [
61888c2e3b4SDavide Caratti                "$TC actions flush action gact",
61988c2e3b4SDavide Caratti                0,
62088c2e3b4SDavide Caratti                1,
62188c2e3b4SDavide Caratti                255
62288c2e3b4SDavide Caratti            ]
62388c2e3b4SDavide Caratti        ],
62488c2e3b4SDavide Caratti        "cmdUnderTest": "$TC actions add action pass random determ goto chain 1 2 index 90",
62588c2e3b4SDavide Caratti        "expExitCode": "255",
62688c2e3b4SDavide Caratti        "verifyCmd": "$TC actions list action gact",
62788c2e3b4SDavide Caratti        "matchPattern": "action order [0-9]*: gact action pass random type determ goto chain 1 val 2.*index 90 ref",
62888c2e3b4SDavide Caratti        "matchCount": "0",
62988c2e3b4SDavide Caratti        "teardown": [
63088c2e3b4SDavide Caratti            "$TC actions flush action gact"
63188c2e3b4SDavide Caratti        ]
6320da2dbd6SDavide Caratti    },
6330da2dbd6SDavide Caratti    {
6340da2dbd6SDavide Caratti        "id": "ca89",
6350da2dbd6SDavide Caratti        "name": "Replace gact action with invalid goto chain control",
6360da2dbd6SDavide Caratti        "category": [
6370da2dbd6SDavide Caratti            "actions",
6380da2dbd6SDavide Caratti            "gact"
6390da2dbd6SDavide Caratti        ],
640*d227cc0bSPedro Tammela        "plugins": {
641*d227cc0bSPedro Tammela           "requires": "nsPlugin"
642*d227cc0bSPedro Tammela        },
6430da2dbd6SDavide Caratti        "setup": [
6440da2dbd6SDavide Caratti            [
6450da2dbd6SDavide Caratti                "$TC actions flush action gact",
6460da2dbd6SDavide Caratti                0,
6470da2dbd6SDavide Caratti                1,
6480da2dbd6SDavide Caratti                255
6490da2dbd6SDavide Caratti            ],
6500da2dbd6SDavide Caratti            "$TC actions add action pass random determ drop 2 index 90"
6510da2dbd6SDavide Caratti        ],
6520da2dbd6SDavide Caratti        "cmdUnderTest": "$TC actions replace action goto chain 42 random determ drop 5 index 90 cookie c1a0c1a0",
6530da2dbd6SDavide Caratti        "expExitCode": "255",
6540da2dbd6SDavide Caratti        "verifyCmd": "$TC actions list action gact",
6550da2dbd6SDavide Caratti        "matchPattern": "action order [0-9]*: gact action pass.*random type determ drop val 2.*index 90 ref",
6560da2dbd6SDavide Caratti        "matchCount": "1",
6570da2dbd6SDavide Caratti        "teardown": [
6580da2dbd6SDavide Caratti            "$TC actions flush action gact"
6590da2dbd6SDavide Caratti        ]
6609ae6b787SVlad Buslov    },
6619ae6b787SVlad Buslov    {
6629ae6b787SVlad Buslov        "id": "95ad",
6639ae6b787SVlad Buslov        "name": "Add gact pass action with no_percpu flag",
6649ae6b787SVlad Buslov        "category": [
6659ae6b787SVlad Buslov            "actions",
6669ae6b787SVlad Buslov            "gact"
6679ae6b787SVlad Buslov        ],
668*d227cc0bSPedro Tammela        "plugins": {
669*d227cc0bSPedro Tammela           "requires": "nsPlugin"
670*d227cc0bSPedro Tammela        },
6719ae6b787SVlad Buslov        "setup": [
6729ae6b787SVlad Buslov            [
6739ae6b787SVlad Buslov                "$TC actions flush action gact",
6749ae6b787SVlad Buslov                0,
6759ae6b787SVlad Buslov                1,
6769ae6b787SVlad Buslov                255
6779ae6b787SVlad Buslov            ]
6789ae6b787SVlad Buslov        ],
6799ae6b787SVlad Buslov        "cmdUnderTest": "$TC actions add action pass no_percpu",
6809ae6b787SVlad Buslov        "expExitCode": "0",
6819ae6b787SVlad Buslov        "verifyCmd": "$TC actions list action gact",
6829ae6b787SVlad Buslov        "matchPattern": "action order [0-9]*: gact action pass.*no_percpu",
6839ae6b787SVlad Buslov        "matchCount": "1",
6849ae6b787SVlad Buslov        "teardown": [
6859ae6b787SVlad Buslov            "$TC actions flush action gact"
6869ae6b787SVlad Buslov        ]
68788153e29SVictor Nogueira    },
68888153e29SVictor Nogueira    {
68988153e29SVictor Nogueira        "id": "7f52",
69088153e29SVictor Nogueira        "name": "Try to flush action which is referenced by filter",
69188153e29SVictor Nogueira        "category": [
69288153e29SVictor Nogueira            "actions",
69388153e29SVictor Nogueira            "gact"
69488153e29SVictor Nogueira        ],
69588153e29SVictor Nogueira        "plugins": {
69688153e29SVictor Nogueira            "requires": "nsPlugin"
69788153e29SVictor Nogueira        },
69888153e29SVictor Nogueira        "setup": [
69988153e29SVictor Nogueira            [
70088153e29SVictor Nogueira                "$TC actions flush action gact",
70188153e29SVictor Nogueira                0,
70288153e29SVictor Nogueira                1,
70388153e29SVictor Nogueira                255
70488153e29SVictor Nogueira            ],
70588153e29SVictor Nogueira            "$TC qdisc add dev $DEV1 ingress",
70688153e29SVictor Nogueira            "$TC actions add action pass index 1",
70788153e29SVictor Nogueira            "$TC filter add dev $DEV1 protocol all ingress prio 1 handle 0x1234 matchall action gact index 1"
70888153e29SVictor Nogueira        ],
70988153e29SVictor Nogueira        "cmdUnderTest": "$TC actions flush action gact",
71088153e29SVictor Nogueira        "expExitCode": "1",
71188153e29SVictor Nogueira        "verifyCmd": "$TC actions ls action gact",
71288153e29SVictor Nogueira        "matchPattern": "total acts 1.*action order [0-9]*: gact action pass.*index 1 ref 2 bind 1",
71388153e29SVictor Nogueira        "matchCount": "1",
71488153e29SVictor Nogueira        "teardown": [
71588153e29SVictor Nogueira            "$TC qdisc del dev $DEV1 ingress",
71688153e29SVictor Nogueira            [
71788153e29SVictor Nogueira                "sleep 1; $TC actions flush action gact",
71888153e29SVictor Nogueira                0,
71988153e29SVictor Nogueira                1
72088153e29SVictor Nogueira            ]
72188153e29SVictor Nogueira        ]
72288153e29SVictor Nogueira    },
72388153e29SVictor Nogueira    {
72488153e29SVictor Nogueira        "id": "ae1e",
72588153e29SVictor Nogueira        "name": "Try to flush actions when last one is referenced by filter",
72688153e29SVictor Nogueira        "category": [
72788153e29SVictor Nogueira            "actions",
72888153e29SVictor Nogueira            "gact"
72988153e29SVictor Nogueira        ],
73088153e29SVictor Nogueira        "plugins": {
73188153e29SVictor Nogueira            "requires": "nsPlugin"
73288153e29SVictor Nogueira        },
73388153e29SVictor Nogueira        "setup": [
73488153e29SVictor Nogueira            [
73588153e29SVictor Nogueira                "$TC actions flush action gact",
73688153e29SVictor Nogueira                0,
73788153e29SVictor Nogueira                1,
73888153e29SVictor Nogueira                255
73988153e29SVictor Nogueira            ],
74088153e29SVictor Nogueira            "$TC qdisc add dev $DEV1 ingress",
74188153e29SVictor Nogueira	    [
74288153e29SVictor Nogueira                "$TC actions add action pass index 1",
74388153e29SVictor Nogueira		0,
74488153e29SVictor Nogueira		1,
74588153e29SVictor Nogueira		255
74688153e29SVictor Nogueira	    ],
74788153e29SVictor Nogueira            "$TC actions add action reclassify index 2",
74888153e29SVictor Nogueira            "$TC actions add action drop index 3",
74988153e29SVictor Nogueira            "$TC filter add dev $DEV1 protocol all ingress prio 1 handle 0x1234 matchall action gact index 3"
75088153e29SVictor Nogueira        ],
75188153e29SVictor Nogueira        "cmdUnderTest": "$TC actions flush action gact",
75288153e29SVictor Nogueira        "expExitCode": "0",
75388153e29SVictor Nogueira        "verifyCmd": "$TC actions ls action gact",
75488153e29SVictor Nogueira        "matchPattern": "total acts 1.*action order [0-9]*: gact action drop.*index 3 ref 2 bind 1",
75588153e29SVictor Nogueira        "matchCount": "1",
75688153e29SVictor Nogueira        "teardown": [
75788153e29SVictor Nogueira            "$TC qdisc del dev $DEV1 ingress",
75888153e29SVictor Nogueira            [
75988153e29SVictor Nogueira                "sleep 1; $TC actions flush action gact",
76088153e29SVictor Nogueira                0,
76188153e29SVictor Nogueira                1
76288153e29SVictor Nogueira            ]
76388153e29SVictor Nogueira        ]
7640923edf4SLucas Bates    }
7650923edf4SLucas Bates]
766