From: Vlad Buslov Date: Wed, 7 Apr 2021 15:46:43 +0000 (+0300) Subject: tc-testing: add simple action test to verify batch change cleanup X-Git-Tag: v5.13-rc1~94^2~200^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=652e3124c3ee60d9770e070afab0e0a862e9bfd7;p=thirdparty%2Fkernel%2Flinux.git tc-testing: add simple action test to verify batch change cleanup Verify cleanup of failed actions batch change where second action in batch fails after successful init of first action. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller --- 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 d5bcbb919dcc9..e0c5f060ccb97 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json @@ -205,5 +205,34 @@ "teardown": [ "$TC actions flush action simple" ] + }, + { + "id": "a68a", + "name": "Verify cleanup of failed actions batch change", + "category": [ + "actions", + "simple" + ], + "setup": [ + [ + "$TC actions flush action simple", + 0, + 1, + 255 + ], + [ + "$TC actions change action simple sdata \"1\" index 1 action simple sdata \"2\" goto chain 42 index 2", + 255 + ], + "$TC actions flush action simple" + ], + "cmdUnderTest": "$TC actions add action simple sdata \"1\" index 1", + "expExitCode": "0", + "verifyCmd": "$TC actions list action simple", + "matchPattern": "action order [0-9]*: Simple <1>.*index 1 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action simple" + ] } ]