summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@nvidia.com>2021-04-07 18:46:42 +0300
committerDavid S. Miller <davem@davemloft.net>2021-04-08 13:50:14 -0700
commit79749ae19de6863d0748419d413b231b0d57e28a (patch)
tree273ce7658be859482ae767bff8dd1ac9e3b895b9 /tools
parentfbe82b3db3e58edca33a7e7d9157eb7bdda6e537 (diff)
downloadlinux-79749ae19de6863d0748419d413b231b0d57e28a.tar.gz
linux-79749ae19de6863d0748419d413b231b0d57e28a.tar.bz2
linux-79749ae19de6863d0748419d413b231b0d57e28a.zip
tc-testing: add simple action test to verify batch add cleanup
Verify cleanup of failed actions batch add where second action in batch fails after successful init of first action. Signed-off-by: Vlad Buslov <vladbu@nvidia.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/simple.json30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json b/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
index e15f708b0fa4..d5bcbb919dcc 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
@@ -175,5 +175,35 @@
"teardown": [
"$TC actions flush action simple"
]
+ },
+ {
+ "id": "8d07",
+ "name": "Verify cleanup of failed actions batch add",
+ "category": [
+ "actions",
+ "simple"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action simple",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC actions add action simple sdata \"2\" index 2",
+ [
+ "$TC actions add action simple sdata \"1\" index 1 action simple sdata \"2\" index 2",
+ 255
+ ],
+ "$TC actions flush action simple"
+ ],
+ "cmdUnderTest": "$TC actions add action simple sdata \"2\" index 2",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action simple",
+ "matchPattern": "action order [0-9]*: Simple <2>.*index 2 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action simple"
+ ]
}
]