aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2022-09-09 09:29:33 +0800
committerDavid S. Miller <davem@davemloft.net>2022-09-16 14:25:16 +0100
commitaf649e7a6a53fe5f2e21d930d1d1cc3b19310f11 (patch)
treefe6b1252055e2b1974c876123381ffe728eb19f3 /tools
parentselftests/tc-testings: add connmark action deleting test case (diff)
downloadlinux-dev-af649e7a6a53fe5f2e21d930d1d1cc3b19310f11.tar.xz
linux-dev-af649e7a6a53fe5f2e21d930d1d1cc3b19310f11.zip
selftests/tc-testings: add ife action deleting test case
Test a972: Delete ife encode action with valid index Test 1272: Delete ife encode action with invalid index Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/tc-testing/tc-tests/actions/ife.json50
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/ife.json b/tools/testing/selftests/tc-testing/tc-tests/actions/ife.json
index c13a68b98fc7..459bcad35810 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/actions/ife.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/ife.json
@@ -1085,5 +1085,55 @@
"teardown": [
"$TC actions flush action ife"
]
+ },
+ {
+ "id": "a972",
+ "name": "Delete ife encode action with valid index",
+ "category": [
+ "actions",
+ "ife"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action ife",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC actions add action ife encode allow mark pass index 20"
+ ],
+ "cmdUnderTest": "$TC actions del action ife index 20",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions ls action ife index 20",
+ "matchPattern": "action order [0-9]*: ife encode action pass.*type 0[xX]ED3E.*allow mark.*index 20",
+ "matchCount": "0",
+ "teardown": [
+ "$TC actions flush action ife"
+ ]
+ },
+ {
+ "id": "1272",
+ "name": "Delete ife encode action with invalid index",
+ "category": [
+ "actions",
+ "ife"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action ife",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC actions add action ife encode allow mark pass index 20"
+ ],
+ "cmdUnderTest": "$TC actions del action ife index 10",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions ls action ife index 20",
+ "matchPattern": "action order [0-9]*: ife encode action pass.*type 0[xX]ED3E.*allow mark.*index 20",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action ife"
+ ]
}
]