selftests/tc-testing: add selftests for qfq qdisc
Test 0582: Create QFQ with default setting Test c9a3: Create QFQ with class weight setting Test 8452: Create QFQ with class maxpkt setting Test d920: Create QFQ with multiple class setting Test 0548: Delete QFQ with handle Test 5901: Show QFQ 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>
This commit is contained in:
Родитель
779f966f16
Коммит
856359c0d0
|
@ -0,0 +1,145 @@
|
|||
[
|
||||
{
|
||||
"id": "0582",
|
||||
"name": "Create QFQ with default setting",
|
||||
"category": [
|
||||
"qdisc",
|
||||
"qfq"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$IP link add dev $DUMMY type dummy || /bin/true"
|
||||
],
|
||||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root qfq",
|
||||
"expExitCode": "0",
|
||||
"verifyCmd": "$TC qdisc show dev $DUMMY",
|
||||
"matchPattern": "qdisc qfq 1: root refcnt [0-9]+",
|
||||
"matchCount": "1",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DUMMY handle 1: root",
|
||||
"$IP link del dev $DUMMY type dummy"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "c9a3",
|
||||
"name": "Create QFQ with class weight setting",
|
||||
"category": [
|
||||
"qdisc",
|
||||
"qfq"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$IP link add dev $DUMMY type dummy || /bin/true",
|
||||
"$TC qdisc add dev $DUMMY handle 1: root qfq"
|
||||
],
|
||||
"cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100",
|
||||
"expExitCode": "0",
|
||||
"verifyCmd": "$TC class show dev $DUMMY",
|
||||
"matchPattern": "class qfq 1:1 root weight 100 maxpkt",
|
||||
"matchCount": "1",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DUMMY handle 1: root",
|
||||
"$IP link del dev $DUMMY type dummy"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "8452",
|
||||
"name": "Create QFQ with class maxpkt setting",
|
||||
"category": [
|
||||
"qdisc",
|
||||
"qfq"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$IP link add dev $DUMMY type dummy || /bin/true",
|
||||
"$TC qdisc add dev $DUMMY handle 1: root qfq"
|
||||
],
|
||||
"cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq maxpkt 2000",
|
||||
"expExitCode": "0",
|
||||
"verifyCmd": "$TC class show dev $DUMMY",
|
||||
"matchPattern": "class qfq 1:1 root weight 1 maxpkt 2000",
|
||||
"matchCount": "1",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DUMMY handle 1: root",
|
||||
"$IP link del dev $DUMMY type dummy"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "d920",
|
||||
"name": "Create QFQ with multiple class setting",
|
||||
"category": [
|
||||
"qdisc",
|
||||
"qfq"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$IP link add dev $DUMMY type dummy || /bin/true",
|
||||
"$TC qdisc add dev $DUMMY handle 1: root qfq",
|
||||
"$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100"
|
||||
],
|
||||
"cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:2 qfq weight 200",
|
||||
"expExitCode": "0",
|
||||
"verifyCmd": "$TC class show dev $DUMMY",
|
||||
"matchPattern": "class qfq 1:[0-9]+ root weight [0-9]+00 maxpkt",
|
||||
"matchCount": "2",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DUMMY handle 1: root",
|
||||
"$IP link del dev $DUMMY type dummy"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "0548",
|
||||
"name": "Delete QFQ with handle",
|
||||
"category": [
|
||||
"qdisc",
|
||||
"qfq"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$IP link add dev $DUMMY type dummy || /bin/true",
|
||||
"$TC qdisc add dev $DUMMY handle 1: root qfq",
|
||||
"$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100"
|
||||
],
|
||||
"cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
|
||||
"expExitCode": "0",
|
||||
"verifyCmd": "$TC class show dev $DUMMY",
|
||||
"matchPattern": "qdisc qfq 1: root refcnt [0-9]+",
|
||||
"matchCount": "0",
|
||||
"teardown": [
|
||||
"$IP link del dev $DUMMY type dummy"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "5901",
|
||||
"name": "Show QFQ class",
|
||||
"category": [
|
||||
"qdisc",
|
||||
"qfq"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$IP link add dev $DUMMY type dummy || /bin/true"
|
||||
],
|
||||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root qfq",
|
||||
"expExitCode": "0",
|
||||
"verifyCmd": "$TC class show dev $DUMMY",
|
||||
"matchPattern": "class qfq 1:",
|
||||
"matchCount": "0",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DUMMY handle 1: root",
|
||||
"$IP link del dev $DUMMY type dummy"
|
||||
]
|
||||
}
|
||||
]
|
Загрузка…
Ссылка в новой задаче