selftests/tc-testing: add show class case for mq qdisc
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 21 Sep 2022 02:44:04 +0000 (10:44 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Sep 2022 00:34:13 +0000 (17:34 -0700)
Test 1023: Show mq class

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/tc-testing/tc-tests/qdiscs/mq.json

index c604609..44fbfc6 100644 (file)
            "teardown": [
                    "echo \"1\" > /sys/bus/netdevsim/del_device"
            ]
-       }
+       },
+        {
+            "id": "1023",
+            "name": "Show mq class",
+            "category": [
+                "qdisc",
+                "mq"
+            ],
+            "plugins": {
+                "requires": "nsPlugin"
+            },
+            "setup": [
+                "echo \"1 1 4\" > /sys/bus/netdevsim/new_device"
+            ],
+            "cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: mq",
+            "expExitCode": "0",
+            "verifyCmd": "$TC class show dev $ETH",
+            "matchPattern": "class mq 1:[0-9]+ root",
+            "matchCount": "4",
+            "teardown": [
+                "echo \"1\" > /sys/bus/netdevsim/del_device"
+            ]
+        }
 ]