tc-tests: test denial of 'goto chain' for exceed traffic in police.json
authorDavide Caratti <dcaratti@redhat.com>
Sat, 20 Oct 2018 21:33:10 +0000 (23:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Oct 2018 02:42:50 +0000 (19:42 -0700)
add test to verify if act_police forbids 'goto chain' control actions for
'exceed' traffic.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/tc-testing/tc-tests/actions/police.json

index 30f9b54bd66689094d2556c354373cfc186a1932..4086a50a670ecba9cc46cb9872061e9151a24e42 100644 (file)
         "teardown": [
             "$TC actions flush action police"
         ]
+    },
+    {
+        "id": "b48b",
+        "name": "Add police action with exceed goto chain control action",
+        "category": [
+            "actions",
+            "police"
+        ],
+        "setup": [
+            [
+                "$TC actions flush action police",
+                0,
+                1,
+                255
+            ]
+        ],
+        "cmdUnderTest": "$TC actions add action police rate 1mbit burst 1k conform-exceed pass / goto chain 42",
+        "expExitCode": "255",
+        "verifyCmd": "$TC actions ls action police",
+        "matchPattern": "action order [0-9]*:  police 0x1 rate 1Mbit burst 1Kb mtu 2Kb action pass/goto chain 42",
+        "matchCount": "0",
+        "teardown": [
+            "$TC actions flush action police"
+        ]
     }
 ]