xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/gact.json (revision 88153e29c1e0f3ace8c831b06f6cea9503f16cec)
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        ],
90923edf4SLucas Bates        "setup": [
100923edf4SLucas Bates            [
110923edf4SLucas Bates                "$TC actions flush action gact",
120923edf4SLucas Bates                0,
130923edf4SLucas Bates                1,
140923edf4SLucas Bates                255
150923edf4SLucas Bates            ]
160923edf4SLucas Bates        ],
170923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action pass index 8",
180923edf4SLucas Bates        "expExitCode": "0",
190923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
200923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pass.*index 8 ref",
210923edf4SLucas Bates        "matchCount": "1",
220923edf4SLucas Bates        "teardown": [
230923edf4SLucas Bates            "$TC actions flush action gact"
240923edf4SLucas Bates        ]
250923edf4SLucas Bates    },
260923edf4SLucas Bates    {
270923edf4SLucas Bates        "id": "a02c",
280923edf4SLucas Bates        "name": "Add valid pipe action",
290923edf4SLucas Bates        "category": [
300923edf4SLucas Bates            "actions",
310923edf4SLucas Bates            "gact"
320923edf4SLucas Bates        ],
330923edf4SLucas Bates        "setup": [
340923edf4SLucas Bates            [
350923edf4SLucas Bates                "$TC actions flush action gact",
360923edf4SLucas Bates                0,
370923edf4SLucas Bates                1,
380923edf4SLucas Bates                255
390923edf4SLucas Bates            ]
400923edf4SLucas Bates        ],
410923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action pipe index 6",
420923edf4SLucas Bates        "expExitCode": "0",
430923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
440923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pipe.*index 6 ref",
450923edf4SLucas Bates        "matchCount": "1",
460923edf4SLucas Bates        "teardown": [
470923edf4SLucas Bates            "$TC actions flush action gact"
480923edf4SLucas Bates        ]
490923edf4SLucas Bates    },
500923edf4SLucas Bates    {
510923edf4SLucas Bates        "id": "feef",
520923edf4SLucas Bates        "name": "Add valid reclassify action",
530923edf4SLucas Bates        "category": [
540923edf4SLucas Bates            "actions",
550923edf4SLucas Bates            "gact"
560923edf4SLucas Bates        ],
570923edf4SLucas Bates        "setup": [
580923edf4SLucas Bates            [
590923edf4SLucas Bates                "$TC actions flush action gact",
600923edf4SLucas Bates                0,
610923edf4SLucas Bates                1,
620923edf4SLucas Bates                255
630923edf4SLucas Bates            ]
640923edf4SLucas Bates        ],
650923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action reclassify index 5",
660923edf4SLucas Bates        "expExitCode": "0",
670923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
680923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action reclassify.*index 5 ref",
690923edf4SLucas Bates        "matchCount": "1",
700923edf4SLucas Bates        "teardown": [
710923edf4SLucas Bates            "$TC actions flush action gact"
720923edf4SLucas Bates        ]
730923edf4SLucas Bates    },
740923edf4SLucas Bates    {
750923edf4SLucas Bates        "id": "8a7a",
760923edf4SLucas Bates        "name": "Add valid drop action",
770923edf4SLucas Bates        "category": [
780923edf4SLucas Bates            "actions",
790923edf4SLucas Bates            "gact"
800923edf4SLucas Bates        ],
810923edf4SLucas Bates        "setup": [
820923edf4SLucas Bates            [
830923edf4SLucas Bates                "$TC actions flush action gact",
840923edf4SLucas Bates                0,
850923edf4SLucas Bates                1,
860923edf4SLucas Bates                255
870923edf4SLucas Bates            ]
880923edf4SLucas Bates        ],
890923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action drop index 30",
900923edf4SLucas Bates        "expExitCode": "0",
910923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
920923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 30 ref",
930923edf4SLucas Bates        "matchCount": "1",
940923edf4SLucas Bates        "teardown": [
950923edf4SLucas Bates            "$TC actions flush action gact"
960923edf4SLucas Bates        ]
970923edf4SLucas Bates    },
980923edf4SLucas Bates    {
990923edf4SLucas Bates        "id": "9a52",
1000923edf4SLucas Bates        "name": "Add valid continue action",
1010923edf4SLucas Bates        "category": [
1020923edf4SLucas Bates            "actions",
1030923edf4SLucas Bates            "gact"
1040923edf4SLucas Bates        ],
1050923edf4SLucas Bates        "setup": [
1060923edf4SLucas Bates            [
1070923edf4SLucas Bates                "$TC actions flush action gact",
1080923edf4SLucas Bates                0,
1090923edf4SLucas Bates                1,
1100923edf4SLucas Bates                255
1110923edf4SLucas Bates            ]
1120923edf4SLucas Bates        ],
1130923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action continue index 432",
1140923edf4SLucas Bates        "expExitCode": "0",
1150923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
1160923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action continue.*index 432 ref",
1170923edf4SLucas Bates        "matchCount": "1",
1180923edf4SLucas Bates        "teardown": [
1190923edf4SLucas Bates            "$TC actions flush action gact"
1200923edf4SLucas Bates        ]
1210923edf4SLucas Bates    },
1220923edf4SLucas Bates    {
1230923edf4SLucas Bates        "id": "d700",
1240923edf4SLucas Bates        "name": "Add invalid action",
1250923edf4SLucas Bates        "category": [
1260923edf4SLucas Bates            "actions",
1270923edf4SLucas Bates            "gact"
1280923edf4SLucas Bates        ],
1290923edf4SLucas Bates        "setup": [
1300923edf4SLucas Bates            [
1310923edf4SLucas Bates                "$TC actions flush action gact",
1320923edf4SLucas Bates                0,
1330923edf4SLucas Bates                1,
1340923edf4SLucas Bates                255
1350923edf4SLucas Bates            ]
1360923edf4SLucas Bates        ],
1370923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action pump index 386",
1380923edf4SLucas Bates        "expExitCode": "255",
1390923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
1400923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action.*index 386 ref",
1410923edf4SLucas Bates        "matchCount": "0",
1420923edf4SLucas Bates        "teardown": [
1430923edf4SLucas Bates            "$TC actions flush action gact"
1440923edf4SLucas Bates        ]
1450923edf4SLucas Bates    },
1460923edf4SLucas Bates    {
1470923edf4SLucas Bates        "id": "9215",
1480923edf4SLucas Bates        "name": "Add action with duplicate index",
1490923edf4SLucas Bates        "category": [
1500923edf4SLucas Bates            "actions",
1510923edf4SLucas Bates            "gact"
1520923edf4SLucas Bates        ],
1530923edf4SLucas Bates        "setup": [
1540923edf4SLucas Bates            [
1550923edf4SLucas Bates                "$TC actions flush action gact",
1560923edf4SLucas Bates                0,
1570923edf4SLucas Bates                1,
1580923edf4SLucas Bates                255
1590923edf4SLucas Bates            ],
1600923edf4SLucas Bates            "$TC actions add action pipe index 15"
1610923edf4SLucas Bates        ],
1620923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action drop index 15",
1630923edf4SLucas Bates        "expExitCode": "255",
1640923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
1650923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 15 ref",
1660923edf4SLucas Bates        "matchCount": "0",
1670923edf4SLucas Bates        "teardown": [
1680923edf4SLucas Bates            "$TC actions flush action gact"
1690923edf4SLucas Bates        ]
1700923edf4SLucas Bates    },
1710923edf4SLucas Bates    {
1720923edf4SLucas Bates        "id": "798e",
1730923edf4SLucas Bates        "name": "Add action with index exceeding 32-bit maximum",
1740923edf4SLucas Bates        "category": [
1750923edf4SLucas Bates            "actions",
1760923edf4SLucas Bates            "gact"
1770923edf4SLucas Bates        ],
1780923edf4SLucas Bates        "setup": [
1790923edf4SLucas Bates            [
1800923edf4SLucas Bates                "$TC actions flush action gact",
1810923edf4SLucas Bates                0,
1820923edf4SLucas Bates                1,
1830923edf4SLucas Bates                255
1840923edf4SLucas Bates            ]
1850923edf4SLucas Bates        ],
1860923edf4SLucas Bates        "cmdUnderTest": "$TC actions add action drop index 4294967296",
1870923edf4SLucas Bates        "expExitCode": "255",
1880923edf4SLucas Bates        "verifyCmd": "actions list action gact",
1890923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 4294967296 ref",
1900923edf4SLucas Bates        "matchCount": "0",
1910923edf4SLucas Bates        "teardown": [
1920923edf4SLucas Bates            "$TC actions flush action gact"
1930923edf4SLucas Bates        ]
1940923edf4SLucas Bates    },
1950923edf4SLucas Bates    {
1960923edf4SLucas Bates        "id": "22be",
1970923edf4SLucas Bates        "name": "Add action with index at 32-bit maximum",
1980923edf4SLucas Bates        "category": [
1990923edf4SLucas Bates            "actions",
2000923edf4SLucas Bates            "gact"
2010923edf4SLucas Bates        ],
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 4294967295",
2110923edf4SLucas Bates        "expExitCode": "0",
2120923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
2130923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 4294967295 ref",
2140923edf4SLucas Bates        "matchCount": "1",
2150923edf4SLucas Bates        "teardown": [
2160923edf4SLucas Bates            "$TC actions flush action gact"
2170923edf4SLucas Bates        ]
2180923edf4SLucas Bates    },
2190923edf4SLucas Bates    {
2200923edf4SLucas Bates        "id": "ac2a",
2210923edf4SLucas Bates        "name": "List actions",
2220923edf4SLucas Bates        "category": [
2230923edf4SLucas Bates            "actions",
2240923edf4SLucas Bates            "gact"
2250923edf4SLucas Bates        ],
2260923edf4SLucas Bates        "setup": [
2270923edf4SLucas Bates            [
2280923edf4SLucas Bates                "$TC actions flush action gact",
2290923edf4SLucas Bates                0,
2300923edf4SLucas Bates                1,
2310923edf4SLucas Bates                255
2320923edf4SLucas Bates            ],
2330923edf4SLucas Bates            "$TC actions add action reclassify index 101",
2340923edf4SLucas Bates            "$TC actions add action reclassify index 102",
2350923edf4SLucas Bates            "$TC actions add action reclassify index 103",
2360923edf4SLucas Bates            "$TC actions add action reclassify index 104",
2370923edf4SLucas Bates            "$TC actions add action reclassify index 105"
2380923edf4SLucas Bates        ],
2390923edf4SLucas Bates        "cmdUnderTest": "$TC actions list action gact",
2400923edf4SLucas Bates        "expExitCode": "0",
2410923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
2420923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action reclassify",
2430923edf4SLucas Bates        "matchCount": "5",
2440923edf4SLucas Bates        "teardown": [
2450923edf4SLucas Bates            "$TC actions flush action gact"
2460923edf4SLucas Bates        ]
2470923edf4SLucas Bates    },
2480923edf4SLucas Bates    {
2490923edf4SLucas Bates        "id": "3edf",
2500923edf4SLucas Bates        "name": "Flush gact actions",
2510923edf4SLucas Bates        "category": [
2520923edf4SLucas Bates            "actions",
2530923edf4SLucas Bates            "gact"
2540923edf4SLucas Bates        ],
2550923edf4SLucas Bates        "setup": [
2560923edf4SLucas Bates            "$TC actions add action reclassify index 101",
2570923edf4SLucas Bates            "$TC actions add action reclassify index 102",
2580923edf4SLucas Bates            "$TC actions add action reclassify index 103",
2590923edf4SLucas Bates            "$TC actions add action reclassify index 104",
2600923edf4SLucas Bates            "$TC actions add action reclassify index 105"
2610923edf4SLucas Bates        ],
2620923edf4SLucas Bates        "cmdUnderTest": "$TC actions flush action gact",
2630923edf4SLucas Bates        "expExitCode": "0",
2640923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
2650923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action reclassify",
2660923edf4SLucas Bates        "matchCount": "0",
2670923edf4SLucas Bates        "teardown": []
2680923edf4SLucas Bates    },
2690923edf4SLucas Bates    {
2700923edf4SLucas Bates        "id": "63ec",
2710923edf4SLucas Bates        "name": "Delete pass action",
2720923edf4SLucas Bates        "category": [
2730923edf4SLucas Bates            "actions",
2740923edf4SLucas Bates            "gact"
2750923edf4SLucas Bates        ],
2760923edf4SLucas Bates        "setup": [
2770923edf4SLucas Bates            [
2780923edf4SLucas Bates                "$TC actions flush action gact",
2790923edf4SLucas Bates                0,
2800923edf4SLucas Bates                1,
2810923edf4SLucas Bates                255
2820923edf4SLucas Bates            ],
2830923edf4SLucas Bates            "$TC actions add action pass index 1"
2840923edf4SLucas Bates        ],
2850923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 1",
2860923edf4SLucas Bates        "expExitCode": "0",
2870923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
2880923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pass.*index 1 ref",
2890923edf4SLucas Bates        "matchCount": "0",
2900923edf4SLucas Bates        "teardown": [
2910923edf4SLucas Bates            "$TC actions flush action gact"
2920923edf4SLucas Bates        ]
2930923edf4SLucas Bates    },
2940923edf4SLucas Bates    {
2950923edf4SLucas Bates        "id": "46be",
2960923edf4SLucas Bates        "name": "Delete pipe action",
2970923edf4SLucas Bates        "category": [
2980923edf4SLucas Bates            "actions",
2990923edf4SLucas Bates            "gact"
3000923edf4SLucas Bates        ],
3010923edf4SLucas Bates        "setup": [
3020923edf4SLucas Bates            [
3030923edf4SLucas Bates                "$TC actions flush action gact",
3040923edf4SLucas Bates                0,
3050923edf4SLucas Bates                1,
3060923edf4SLucas Bates                255
3070923edf4SLucas Bates            ],
3080923edf4SLucas Bates            "$TC actions add action pipe index 9"
3090923edf4SLucas Bates        ],
3100923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 9",
3110923edf4SLucas Bates        "expExitCode": "0",
3120923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
3130923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pipe.*index 9 ref",
3140923edf4SLucas Bates        "matchCount": "0",
3150923edf4SLucas Bates        "teardown": [
3160923edf4SLucas Bates            "$TC actions flush action gact"
3170923edf4SLucas Bates        ]
3180923edf4SLucas Bates    },
3190923edf4SLucas Bates    {
3200923edf4SLucas Bates        "id": "2e08",
3210923edf4SLucas Bates        "name": "Delete reclassify action",
3220923edf4SLucas Bates        "category": [
3230923edf4SLucas Bates            "actions",
3240923edf4SLucas Bates            "gact"
3250923edf4SLucas Bates        ],
3260923edf4SLucas Bates        "setup": [
3270923edf4SLucas Bates            [
3280923edf4SLucas Bates                "$TC actions flush action gact",
3290923edf4SLucas Bates                0,
3300923edf4SLucas Bates                1,
3310923edf4SLucas Bates                255
3320923edf4SLucas Bates            ],
3330923edf4SLucas Bates            "$TC actions add action reclassify index 65536"
3340923edf4SLucas Bates        ],
3350923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 65536",
3360923edf4SLucas Bates        "expExitCode": "0",
3370923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
3380923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action reclassify.*index 65536 ref",
3390923edf4SLucas Bates        "matchCount": "0",
3400923edf4SLucas Bates        "teardown": [
3410923edf4SLucas Bates            "$TC actions flush action gact"
3420923edf4SLucas Bates        ]
3430923edf4SLucas Bates    },
3440923edf4SLucas Bates    {
3450923edf4SLucas Bates        "id": "99c4",
3460923edf4SLucas Bates        "name": "Delete drop action",
3470923edf4SLucas Bates        "category": [
3480923edf4SLucas Bates            "actions",
3490923edf4SLucas Bates            "gact"
3500923edf4SLucas Bates        ],
3510923edf4SLucas Bates        "setup": [
3520923edf4SLucas Bates            [
3530923edf4SLucas Bates                "$TC actions flush action gact",
3540923edf4SLucas Bates                0,
3550923edf4SLucas Bates                1,
3560923edf4SLucas Bates                255
3570923edf4SLucas Bates            ],
3580923edf4SLucas Bates            "$TC actions add action drop index 16"
3590923edf4SLucas Bates        ],
3600923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 16",
3610923edf4SLucas Bates        "expExitCode": "0",
3620923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
3630923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action drop.*index 16 ref",
3640923edf4SLucas Bates        "matchCount": "0",
3650923edf4SLucas Bates        "teardown": [
3660923edf4SLucas Bates            "$TC actions flush action gact"
3670923edf4SLucas Bates        ]
3680923edf4SLucas Bates    },
3690923edf4SLucas Bates    {
3700923edf4SLucas Bates        "id": "fb6b",
3710923edf4SLucas Bates        "name": "Delete continue action",
3720923edf4SLucas Bates        "category": [
3730923edf4SLucas Bates            "actions",
3740923edf4SLucas Bates            "gact"
3750923edf4SLucas Bates        ],
3760923edf4SLucas Bates        "setup": [
3770923edf4SLucas Bates            [
3780923edf4SLucas Bates                "$TC actions flush action gact",
3790923edf4SLucas Bates                0,
3800923edf4SLucas Bates                1,
3810923edf4SLucas Bates                255
3820923edf4SLucas Bates            ],
3830923edf4SLucas Bates            "$TC actions add action continue index 32"
3840923edf4SLucas Bates        ],
3850923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 32",
3860923edf4SLucas Bates        "expExitCode": "0",
3870923edf4SLucas Bates        "verifyCmd": "actions list action gact",
3880923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action continue.*index 32 ref",
3890923edf4SLucas Bates        "matchCount": "0",
3900923edf4SLucas Bates        "teardown": [
3910923edf4SLucas Bates            "$TC actions flush action gact"
3920923edf4SLucas Bates        ]
3930923edf4SLucas Bates    },
3940923edf4SLucas Bates    {
3950923edf4SLucas Bates        "id": "0eb3",
3960923edf4SLucas Bates        "name": "Delete non-existent action",
3970923edf4SLucas Bates        "category": [
3980923edf4SLucas Bates            "actions",
3990923edf4SLucas Bates            "gact"
4000923edf4SLucas Bates        ],
4010923edf4SLucas Bates        "setup": [
4020923edf4SLucas Bates            [
4030923edf4SLucas Bates                "$TC actions flush action gact",
4040923edf4SLucas Bates                0,
4050923edf4SLucas Bates                1,
4060923edf4SLucas Bates                255
4070923edf4SLucas Bates            ]
4080923edf4SLucas Bates        ],
4090923edf4SLucas Bates        "cmdUnderTest": "$TC actions del action gact index 2",
4100923edf4SLucas Bates        "expExitCode": "255",
4110923edf4SLucas Bates        "verifyCmd": "$TC actions list action gact",
4120923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action",
4130923edf4SLucas Bates        "matchCount": "0",
4140923edf4SLucas Bates        "teardown": [
4150923edf4SLucas Bates            "$TC actions flush action gact"
4160923edf4SLucas Bates        ]
4170923edf4SLucas Bates    },
4180923edf4SLucas Bates    {
4190923edf4SLucas Bates        "id": "f02c",
4200923edf4SLucas Bates        "name": "Replace gact action",
4210923edf4SLucas Bates        "category": [
4220923edf4SLucas Bates            "actions",
4230923edf4SLucas Bates            "gact"
4240923edf4SLucas Bates        ],
4250923edf4SLucas Bates        "setup": [
4260923edf4SLucas Bates            [
4270923edf4SLucas Bates                "$TC actions flush action gact",
4280923edf4SLucas Bates                0,
4290923edf4SLucas Bates                1,
4300923edf4SLucas Bates                255
4310923edf4SLucas Bates            ],
4320923edf4SLucas Bates            "$TC actions add action drop index 10",
4330923edf4SLucas Bates            "$TC actions add action drop index 12"
4340923edf4SLucas Bates        ],
4350923edf4SLucas Bates        "cmdUnderTest": "$TC actions replace action ok index 12",
4360923edf4SLucas Bates        "expExitCode": "0",
4370923edf4SLucas Bates        "verifyCmd": "$TC actions ls action gact",
4380923edf4SLucas Bates        "matchPattern": "action order [0-9]*: gact action pass",
4390923edf4SLucas Bates        "matchCount": "1",
4400923edf4SLucas Bates        "teardown": [
4410923edf4SLucas Bates            "$TC actions flush action gact"
4420923edf4SLucas Bates        ]
4430923edf4SLucas Bates    },
4440923edf4SLucas Bates    {
4450923edf4SLucas Bates        "id": "525f",
4460923edf4SLucas Bates        "name": "Get gact action by index",
4470923edf4SLucas Bates        "category": [
4480923edf4SLucas Bates            "actions",
4490923edf4SLucas Bates            "gact"
4500923edf4SLucas Bates        ],
4510923edf4SLucas Bates        "setup": [
4520923edf4SLucas Bates            [
4530923edf4SLucas Bates                "$TC actions flush action gact",
4540923edf4SLucas Bates                0,
4550923edf4SLucas Bates                1,
4560923edf4SLucas Bates                255
4570923edf4SLucas Bates            ],
4580923edf4SLucas Bates            "$TC actions add action drop index 3900800700"
4590923edf4SLucas Bates        ],
4600923edf4SLucas Bates        "cmdUnderTest": "$TC actions get action gact index 3900800700",
4610923edf4SLucas Bates        "expExitCode": "0",
4620923edf4SLucas Bates        "verifyCmd": "$TC actions get action gact index 3900800700",
4630923edf4SLucas Bates        "matchPattern": "index 3900800700",
4640923edf4SLucas Bates        "matchCount": "1",
4650923edf4SLucas Bates        "teardown": [
4660923edf4SLucas Bates            "$TC actions flush action gact"
4670923edf4SLucas Bates        ]
4689ba32046SRoman Mashak    },
4699ba32046SRoman Mashak    {
4709ba32046SRoman Mashak        "id": "1021",
4719ba32046SRoman Mashak        "name": "Add batch of 32 gact pass actions",
4729ba32046SRoman Mashak        "category": [
4739ba32046SRoman Mashak            "actions",
4749ba32046SRoman Mashak            "gact"
4759ba32046SRoman Mashak        ],
4769ba32046SRoman Mashak        "setup": [
4779ba32046SRoman Mashak            [
4789ba32046SRoman Mashak                "$TC actions flush action gact",
4799ba32046SRoman Mashak                0,
4809ba32046SRoman Mashak                1,
4819ba32046SRoman Mashak                255
4829ba32046SRoman Mashak            ]
4839ba32046SRoman Mashak        ],
484cd464197SLucas Bates        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action pass index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
4859ba32046SRoman Mashak        "expExitCode": "0",
4869ba32046SRoman Mashak        "verifyCmd": "$TC actions list action gact",
4879ba32046SRoman Mashak        "matchPattern": "^[ \t]+index [0-9]+ ref",
4889ba32046SRoman Mashak        "matchCount": "32",
4899ba32046SRoman Mashak        "teardown": [
4909ba32046SRoman Mashak            "$TC actions flush action gact"
4919ba32046SRoman Mashak        ]
4929ba32046SRoman Mashak    },
4939ba32046SRoman Mashak    {
4949ba32046SRoman Mashak        "id": "da7a",
4959ba32046SRoman Mashak        "name": "Add batch of 32 gact continue actions with cookie",
4969ba32046SRoman Mashak        "category": [
4979ba32046SRoman Mashak            "actions",
4989ba32046SRoman Mashak            "gact"
4999ba32046SRoman Mashak        ],
5009ba32046SRoman Mashak        "setup": [
5019ba32046SRoman Mashak            [
5029ba32046SRoman Mashak                "$TC actions flush action gact",
5039ba32046SRoman Mashak                0,
5049ba32046SRoman Mashak                1,
5059ba32046SRoman Mashak                255
5069ba32046SRoman Mashak            ]
5079ba32046SRoman Mashak        ],
508cd464197SLucas 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\"",
5099ba32046SRoman Mashak        "expExitCode": "0",
5109ba32046SRoman Mashak        "verifyCmd": "$TC actions list action gact",
5119ba32046SRoman Mashak        "matchPattern": "^[ \t]+index [0-9]+ ref",
5129ba32046SRoman Mashak        "matchCount": "32",
5139ba32046SRoman Mashak        "teardown": [
5149ba32046SRoman Mashak            "$TC actions flush action gact"
5159ba32046SRoman Mashak        ]
5169ba32046SRoman Mashak    },
5179ba32046SRoman Mashak    {
5189ba32046SRoman Mashak        "id": "8aa3",
5199ba32046SRoman Mashak        "name": "Delete batch of 32 gact continue actions",
5209ba32046SRoman Mashak        "category": [
5219ba32046SRoman Mashak            "actions",
5229ba32046SRoman Mashak            "gact"
5239ba32046SRoman Mashak        ],
5249ba32046SRoman Mashak        "setup": [
5259ba32046SRoman Mashak            [
5269ba32046SRoman Mashak                "$TC actions flush action gact",
5279ba32046SRoman Mashak                0,
5289ba32046SRoman Mashak                1,
5299ba32046SRoman Mashak                255
5309ba32046SRoman Mashak            ],
531cd464197SLucas Bates            "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action continue index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
5329ba32046SRoman Mashak        ],
533cd464197SLucas Bates        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action gact index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
5349ba32046SRoman Mashak        "expExitCode": "0",
5359ba32046SRoman Mashak        "verifyCmd": "$TC actions list action gact",
5369ba32046SRoman Mashak        "matchPattern": "^[ \t]+index [0-9]+ ref",
5379ba32046SRoman Mashak        "matchCount": "0",
5389ba32046SRoman Mashak        "teardown": []
53988c2e3b4SDavide Caratti    },
54088c2e3b4SDavide Caratti    {
54188c2e3b4SDavide Caratti        "id": "8e47",
54288c2e3b4SDavide Caratti        "name": "Add gact action with random determ goto chain control action",
54388c2e3b4SDavide Caratti        "category": [
54488c2e3b4SDavide Caratti            "actions",
54588c2e3b4SDavide Caratti            "gact"
54688c2e3b4SDavide Caratti        ],
54788c2e3b4SDavide Caratti        "setup": [
54888c2e3b4SDavide Caratti            [
54988c2e3b4SDavide Caratti                "$TC actions flush action gact",
55088c2e3b4SDavide Caratti                0,
55188c2e3b4SDavide Caratti                1,
55288c2e3b4SDavide Caratti                255
55388c2e3b4SDavide Caratti            ]
55488c2e3b4SDavide Caratti        ],
55588c2e3b4SDavide Caratti        "cmdUnderTest": "$TC actions add action pass random determ goto chain 1 2 index 90",
55688c2e3b4SDavide Caratti        "expExitCode": "255",
55788c2e3b4SDavide Caratti        "verifyCmd": "$TC actions list action gact",
55888c2e3b4SDavide Caratti        "matchPattern": "action order [0-9]*: gact action pass random type determ goto chain 1 val 2.*index 90 ref",
55988c2e3b4SDavide Caratti        "matchCount": "0",
56088c2e3b4SDavide Caratti        "teardown": [
56188c2e3b4SDavide Caratti            "$TC actions flush action gact"
56288c2e3b4SDavide Caratti        ]
5630da2dbd6SDavide Caratti    },
5640da2dbd6SDavide Caratti    {
5650da2dbd6SDavide Caratti        "id": "ca89",
5660da2dbd6SDavide Caratti        "name": "Replace gact action with invalid goto chain control",
5670da2dbd6SDavide Caratti        "category": [
5680da2dbd6SDavide Caratti            "actions",
5690da2dbd6SDavide Caratti            "gact"
5700da2dbd6SDavide Caratti        ],
5710da2dbd6SDavide Caratti        "setup": [
5720da2dbd6SDavide Caratti            [
5730da2dbd6SDavide Caratti                "$TC actions flush action gact",
5740da2dbd6SDavide Caratti                0,
5750da2dbd6SDavide Caratti                1,
5760da2dbd6SDavide Caratti                255
5770da2dbd6SDavide Caratti            ],
5780da2dbd6SDavide Caratti            "$TC actions add action pass random determ drop 2 index 90"
5790da2dbd6SDavide Caratti        ],
5800da2dbd6SDavide Caratti        "cmdUnderTest": "$TC actions replace action goto chain 42 random determ drop 5 index 90 cookie c1a0c1a0",
5810da2dbd6SDavide Caratti        "expExitCode": "255",
5820da2dbd6SDavide Caratti        "verifyCmd": "$TC actions list action gact",
5830da2dbd6SDavide Caratti        "matchPattern": "action order [0-9]*: gact action pass.*random type determ drop val 2.*index 90 ref",
5840da2dbd6SDavide Caratti        "matchCount": "1",
5850da2dbd6SDavide Caratti        "teardown": [
5860da2dbd6SDavide Caratti            "$TC actions flush action gact"
5870da2dbd6SDavide Caratti        ]
5889ae6b787SVlad Buslov    },
5899ae6b787SVlad Buslov    {
5909ae6b787SVlad Buslov        "id": "95ad",
5919ae6b787SVlad Buslov        "name": "Add gact pass action with no_percpu flag",
5929ae6b787SVlad Buslov        "category": [
5939ae6b787SVlad Buslov            "actions",
5949ae6b787SVlad Buslov            "gact"
5959ae6b787SVlad Buslov        ],
5969ae6b787SVlad Buslov        "setup": [
5979ae6b787SVlad Buslov            [
5989ae6b787SVlad Buslov                "$TC actions flush action gact",
5999ae6b787SVlad Buslov                0,
6009ae6b787SVlad Buslov                1,
6019ae6b787SVlad Buslov                255
6029ae6b787SVlad Buslov            ]
6039ae6b787SVlad Buslov        ],
6049ae6b787SVlad Buslov        "cmdUnderTest": "$TC actions add action pass no_percpu",
6059ae6b787SVlad Buslov        "expExitCode": "0",
6069ae6b787SVlad Buslov        "verifyCmd": "$TC actions list action gact",
6079ae6b787SVlad Buslov        "matchPattern": "action order [0-9]*: gact action pass.*no_percpu",
6089ae6b787SVlad Buslov        "matchCount": "1",
6099ae6b787SVlad Buslov        "teardown": [
6109ae6b787SVlad Buslov            "$TC actions flush action gact"
6119ae6b787SVlad Buslov        ]
612*88153e29SVictor Nogueira    },
613*88153e29SVictor Nogueira    {
614*88153e29SVictor Nogueira        "id": "7f52",
615*88153e29SVictor Nogueira        "name": "Try to flush action which is referenced by filter",
616*88153e29SVictor Nogueira        "category": [
617*88153e29SVictor Nogueira            "actions",
618*88153e29SVictor Nogueira            "gact"
619*88153e29SVictor Nogueira        ],
620*88153e29SVictor Nogueira        "plugins": {
621*88153e29SVictor Nogueira            "requires": "nsPlugin"
622*88153e29SVictor Nogueira        },
623*88153e29SVictor Nogueira        "setup": [
624*88153e29SVictor Nogueira            [
625*88153e29SVictor Nogueira                "$TC actions flush action gact",
626*88153e29SVictor Nogueira                0,
627*88153e29SVictor Nogueira                1,
628*88153e29SVictor Nogueira                255
629*88153e29SVictor Nogueira            ],
630*88153e29SVictor Nogueira            "$TC qdisc add dev $DEV1 ingress",
631*88153e29SVictor Nogueira            "$TC actions add action pass index 1",
632*88153e29SVictor Nogueira            "$TC filter add dev $DEV1 protocol all ingress prio 1 handle 0x1234 matchall action gact index 1"
633*88153e29SVictor Nogueira        ],
634*88153e29SVictor Nogueira        "cmdUnderTest": "$TC actions flush action gact",
635*88153e29SVictor Nogueira        "expExitCode": "1",
636*88153e29SVictor Nogueira        "verifyCmd": "$TC actions ls action gact",
637*88153e29SVictor Nogueira        "matchPattern": "total acts 1.*action order [0-9]*: gact action pass.*index 1 ref 2 bind 1",
638*88153e29SVictor Nogueira        "matchCount": "1",
639*88153e29SVictor Nogueira        "teardown": [
640*88153e29SVictor Nogueira            "$TC qdisc del dev $DEV1 ingress",
641*88153e29SVictor Nogueira            [
642*88153e29SVictor Nogueira                "sleep 1; $TC actions flush action gact",
643*88153e29SVictor Nogueira                0,
644*88153e29SVictor Nogueira                1
645*88153e29SVictor Nogueira            ]
646*88153e29SVictor Nogueira        ]
647*88153e29SVictor Nogueira    },
648*88153e29SVictor Nogueira    {
649*88153e29SVictor Nogueira        "id": "ae1e",
650*88153e29SVictor Nogueira        "name": "Try to flush actions when last one is referenced by filter",
651*88153e29SVictor Nogueira        "category": [
652*88153e29SVictor Nogueira            "actions",
653*88153e29SVictor Nogueira            "gact"
654*88153e29SVictor Nogueira        ],
655*88153e29SVictor Nogueira        "plugins": {
656*88153e29SVictor Nogueira            "requires": "nsPlugin"
657*88153e29SVictor Nogueira        },
658*88153e29SVictor Nogueira        "setup": [
659*88153e29SVictor Nogueira            [
660*88153e29SVictor Nogueira                "$TC actions flush action gact",
661*88153e29SVictor Nogueira                0,
662*88153e29SVictor Nogueira                1,
663*88153e29SVictor Nogueira                255
664*88153e29SVictor Nogueira            ],
665*88153e29SVictor Nogueira            "$TC qdisc add dev $DEV1 ingress",
666*88153e29SVictor Nogueira	    [
667*88153e29SVictor Nogueira                "$TC actions add action pass index 1",
668*88153e29SVictor Nogueira		0,
669*88153e29SVictor Nogueira		1,
670*88153e29SVictor Nogueira		255
671*88153e29SVictor Nogueira	    ],
672*88153e29SVictor Nogueira            "$TC actions add action reclassify index 2",
673*88153e29SVictor Nogueira            "$TC actions add action drop index 3",
674*88153e29SVictor Nogueira            "$TC filter add dev $DEV1 protocol all ingress prio 1 handle 0x1234 matchall action gact index 3"
675*88153e29SVictor Nogueira        ],
676*88153e29SVictor Nogueira        "cmdUnderTest": "$TC actions flush action gact",
677*88153e29SVictor Nogueira        "expExitCode": "0",
678*88153e29SVictor Nogueira        "verifyCmd": "$TC actions ls action gact",
679*88153e29SVictor Nogueira        "matchPattern": "total acts 1.*action order [0-9]*: gact action drop.*index 3 ref 2 bind 1",
680*88153e29SVictor Nogueira        "matchCount": "1",
681*88153e29SVictor Nogueira        "teardown": [
682*88153e29SVictor Nogueira            "$TC qdisc del dev $DEV1 ingress",
683*88153e29SVictor Nogueira            [
684*88153e29SVictor Nogueira                "sleep 1; $TC actions flush action gact",
685*88153e29SVictor Nogueira                0,
686*88153e29SVictor Nogueira                1
687*88153e29SVictor Nogueira            ]
688*88153e29SVictor Nogueira        ]
6890923edf4SLucas Bates    }
6900923edf4SLucas Bates]
691