Commit ae3c33c1 authored by Lucas Bates's avatar Lucas Bates Committed by David S. Miller

tc-testing: Add test cases for flushing actions

Tests for flushing gact and mirred were missing. This patch
adds test cases to explicitly test the flush of any installed
gact/mirred actions.
Signed-off-by: default avatarLucas Bates <lucasb@mojatatu.com>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6eda447e
...@@ -245,6 +245,27 @@ ...@@ -245,6 +245,27 @@
"$TC actions flush action gact" "$TC actions flush action gact"
] ]
}, },
{
"id": "3edf",
"name": "Flush gact actions",
"category": [
"actions",
"gact"
],
"setup": [
"$TC actions add action reclassify index 101",
"$TC actions add action reclassify index 102",
"$TC actions add action reclassify index 103",
"$TC actions add action reclassify index 104",
"$TC actions add action reclassify index 105"
],
"cmdUnderTest": "$TC actions flush action gact",
"expExitCode": "0",
"verifyCmd": "$TC actions list action gact",
"matchPattern": "action order [0-9]*: gact action reclassify",
"matchCount": "0",
"teardown": []
},
{ {
"id": "63ec", "id": "63ec",
"name": "Delete pass action", "name": "Delete pass action",
...@@ -468,6 +489,32 @@ ...@@ -468,6 +489,32 @@
"$TC actions flush action mirred" "$TC actions flush action mirred"
] ]
}, },
{
"id": "58c3",
"name": "Flush mirred actions",
"category": [
"actions",
"mirred"
],
"setup": [
[
"$TC actions flush action mirred",
0,
1,
255
],
"$TC actions add action mirred egress mirror index 1 dev lo",
"$TC actions add action mirred egress redirect index 2 dev lo"
],
"cmdUnderTest": "$TC actions show action mirred",
"expExitCode": "0",
"verifyCmd": "$TC actions list action mirred",
"matchPattern": "[Mirror|Redirect] to device lo",
"matchCount": "0",
"teardown": [
"$TC actions flush action mirred"
]
},
{ {
"id": "d7c0", "id": "d7c0",
"name": "Add invalid mirred direction", "name": "Add invalid mirred direction",
...@@ -1162,4 +1209,4 @@ ...@@ -1162,4 +1209,4 @@
"$TC actions flush action ife" "$TC actions flush action ife"
] ]
} }
] ]
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment