Commit e4c4bcb0 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by Jakub Kicinski

selftests/tc-testing: add selftests for multiq qdisc

Test 20ba: Add multiq Qdisc to multi-queue device (8 queues)
Test 4301: List multiq Class
Test 7832: Delete nonexistent multiq Qdisc
Test 2891: Delete multiq Qdisc twice
Test 1329: Add multiq Qdisc to single-queue device
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: default avatarVictor Nogueira <victor@mojatatu.com>
Tested-by: default avatarVictor Nogueira <victor@mojatatu.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8ab00f8b
[
{
"id": "20ba",
"name": "Add multiq Qdisc to multi-queue device (8 queues)",
"category": [
"qdisc",
"multiq"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"echo \"1 1 8\" > /sys/bus/netdevsim/new_device"
],
"cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: multiq",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $ETH",
"matchPattern": "qdisc multiq 1: root refcnt [0-9]+ bands 8",
"matchCount": "1",
"teardown": [
"echo \"1\" > /sys/bus/netdevsim/del_device"
]
},
{
"id": "4301",
"name": "List multiq Class",
"category": [
"qdisc",
"multiq"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"echo \"1 1 8\" > /sys/bus/netdevsim/new_device"
],
"cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: multiq",
"expExitCode": "0",
"verifyCmd": "$TC class show dev $ETH",
"matchPattern": "class multiq 1:[0-9]+ parent 1:",
"matchCount": "8",
"teardown": [
"echo \"1\" > /sys/bus/netdevsim/del_device"
]
},
{
"id": "7832",
"name": "Delete nonexistent multiq Qdisc",
"category": [
"qdisc",
"multiq"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"echo \"1 1 4\" > /sys/bus/netdevsim/new_device"
],
"cmdUnderTest": "$TC qdisc del dev $ETH root handle 1: multiq",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $ETH",
"matchPattern": "qdisc multiq 1: root",
"matchCount": "0",
"teardown": [
"echo \"1\" > /sys/bus/netdevsim/del_device"
]
},
{
"id": "2891",
"name": "Delete multiq Qdisc twice",
"category": [
"qdisc",
"multiq"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"echo \"1 1 8\" > /sys/bus/netdevsim/new_device",
"$TC qdisc add dev $ETH root handle 1: multiq",
"$TC qdisc del dev $ETH root handle 1:"
],
"cmdUnderTest": "$TC qdisc del dev $ETH root handle 1:",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $ETH",
"matchPattern": "qdisc mqprio 1: root",
"matchCount": "0",
"teardown": [
"echo \"1\" > /sys/bus/netdevsim/del_device"
]
},
{
"id": "1329",
"name": "Add multiq Qdisc to single-queue device",
"category": [
"qdisc",
"multiq"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"echo \"1 1\" > /sys/bus/netdevsim/new_device"
],
"cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: multiq",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $ETH",
"matchPattern": "qdisc multiq 1: root",
"matchCount": "0",
"teardown": [
"echo \"1\" > /sys/bus/netdevsim/del_device"
]
}
]
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