-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Zhengchao Shao
authored and
Jakub Kicinski
committed
Sep 23, 2022
1 parent
779f966
commit 856359c
Showing
1 changed file
with
145 additions
and
0 deletions.
There are no files selected for viewing
145 changes: 145 additions & 0 deletions
145
tools/testing/selftests/tc-testing/tc-tests/qdiscs/qfq.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} | ||
] |