[Patch net v6 8/8] selftests/tc-testing: Update test cases with netem duplicate

Cong Wang
2025-12-27T19:41:57Z

Now netem does no longer trigger reentrant behaviour of its upper
qdiscs, the whole architecture becomes more solid and less error prone.

Keep these test cases since one of them still successfully caught a bug
in QFQ qdisc, but update them to the new netem enqueue behavior.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
.../tc-testing/tc-tests/infra/qdiscs.json | 54 +++++++++----------
1 file changed, 25 insertions(+), 29 deletions(-)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json b/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
index 57e6b5f35070..4ebdb27e39b3 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
@@ -579,7 +579,7 @@
},
{
"id": "90ec",
- "name": "Test DRR's enqueue reentrant behaviour with netem",
+ "name": "Test DRR with NETEM duplication",
"category": [
"qdisc",
"drr"
@@ -597,11 +597,11 @@
],
"cmdUnderTest": "ping -c 1 -I $DUMMY 10.10.10.1 > /dev/null || true",
"expExitCode": "0",
- "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 1:0",
+ "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 2:0",
"matchJSON": [
{
- "kind": "drr",
- "handle": "1:",
+ "kind": "netem",
+ "handle": "2:",
"bytes": 196,
"packets": 2
}
@@ -614,7 +614,7 @@
},
{
"id": "1f1f",
- "name": "Test ETS's enqueue reentrant behaviour with netem",
+ "name": "Test ETS with NETEM duplication",
"category": [
"qdisc",
"ets"
@@ -632,15 +632,13 @@
],
"cmdUnderTest": "ping -c 1 -I $DUMMY 10.10.10.1 > /dev/null || true",
"expExitCode": "0",
- "verifyCmd": "$TC -j -s class show dev $DUMMY",
+ "verifyCmd": "$TC -j -s qdisc show dev $DUMMY handle 2:0",
"matchJSON": [
{
- "class": "ets",
- "handle": "1:1",
- "stats": {
- "bytes": 196,
- "packets": 2
- }
+ "kind": "netem",
+ "handle": "2:",
+ "bytes": 196,
+ "packets": 2
}
],
"matchCount": "1",
@@ -651,7 +649,7 @@
},
{
"id": "5e6d",
- "name": "Test QFQ's enqueue reentrant behaviour with netem",
+ "name": "Test QFQ with NETEM duplication",
"category": [
"qdisc",
"qfq"
@@ -669,11 +667,11 @@
],
"cmdUnderTest": "ping -c 1 -I $DUMMY 10.10.10.1 > /dev/null || true",
"expExitCode": "0",
- "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 1:0",
+ "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 2:0",
"matchJSON": [
{
- "kind": "qfq",
- "handle": "1:",
+ "kind": "netem",
+ "handle": "2:",
"bytes": 196,
"packets": 2
}
@@ -686,7 +684,7 @@
},
{
"id": "bf1d",
- "name": "Test HFSC's enqueue reentrant behaviour with netem",
+ "name": "Test HFSC with NETEM duplication",
"category": [
"qdisc",
"hfsc"
@@ -710,13 +708,11 @@
],
"cmdUnderTest": "ping -c 1 10.10.10.2 -I$DUMMY > /dev/null || true",
"expExitCode": "0",
- "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 1:0",
+ "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 3:0",
"matchJSON": [
{
- "kind": "hfsc",
- "handle": "1:",
- "bytes": 392,
- "packets": 4
+ "kind": "netem",
+ "handle": "3:"
}
],
"matchCount": "1",
@@ -727,7 +723,7 @@
},
{
"id": "7c3b",
- "name": "Test nested DRR's enqueue reentrant behaviour with netem",
+ "name": "Test nested DRR with NETEM duplication",
"category": [
"qdisc",
"drr"
@@ -748,13 +744,13 @@
],
"cmdUnderTest": "ping -c 1 -I $DUMMY 10.10.10.1 > /dev/null || true",
"expExitCode": "0",
- "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 1:0",
+ "verifyCmd": "$TC -j -s qdisc ls dev $DUMMY handle 3:0",
"matchJSON": [
{
- "kind": "drr",
- "handle": "1:",
- "bytes": 196,
- "packets": 2
+ "kind": "netem",
+ "handle": "3:",
+ "bytes": 98,
+ "packets": 1
}
],
"matchCount": "1",
@@ -827,7 +823,7 @@
},
{
"id": "309e",
- "name": "Test HFSC eltree double add with reentrant enqueue behaviour on netem",
+ "name": "Test complex HFSC with NETEM duplication",
"category": [
"qdisc",
"hfsc"
--
2.34.1