public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Subject: [Patch net v7 6/9] selftests/tc-testing: Add a test case for prio with netem duplicate
Date: Tue, 13 Jan 2026 11:06:31 -0800	[thread overview]
Message-ID: <20260113190634.681734-7-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <20260113190634.681734-1-xiyou.wangcong@gmail.com>

Integrate the test case from Jamal into tc-testing:

Test 94a7: Test PRIO with NETEM duplication

All test results:

1..1
ok 1 94a7 - Test PRIO with NETEM duplication

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

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 ceb993ed04b2..b65fe669e00a 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
@@ -961,6 +961,35 @@
         "matchJSON": [],
         "teardown": [
             "$TC qdisc del dev $DUMMY root"
+	]
+    },
+    {
+        "id": "94a7",
+        "name": "Test PRIO with NETEM duplication",
+        "category": [
+            "qdisc",
+            "prio",
+            "netem"
+        ],
+        "plugins": {
+            "requires": [
+                "nsPlugin"
+            ]
+        },
+        "setup": [
+            "$IP link set dev $DUMMY up || true",
+            "$IP addr add 10.10.11.10/24 dev $DUMMY || true",
+            "$TC qdisc add dev $DUMMY root handle 1: prio bands 3 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
+            "$TC filter add dev $DUMMY parent 1:0 protocol ip matchall classid 1:1",
+            "$TC qdisc add dev $DUMMY parent 1:1 handle 10: netem limit 4 duplicate 100%"
+        ],
+        "cmdUnderTest": "ping -c1 -W0.01 -I $DUMMY 10.10.11.11",
+        "expExitCode": "1",
+        "verifyCmd": "$TC -s qdisc show dev $DUMMY | grep -A 5 'qdisc netem' | grep -E 'Sent [0-9]+ bytes [0-9]+ pkt'",
+        "matchPattern": "Sent \\d+ bytes (\\d+) pkt",
+        "matchCount": "1",
+        "teardown": [
+            "$TC qdisc del dev $DUMMY root handle 1: prio"
         ]
     },
     {
-- 
2.34.1


  parent reply	other threads:[~2026-01-13 19:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13 19:06 [Patch net v7 0/9] netem: Fix skb duplication logic and prevent infinite loops Cong Wang
2026-01-13 19:06 ` [Patch net v7 1/9] net_sched: Check the return value of qfq_choose_next_agg() Cong Wang
2026-01-13 19:06 ` [Patch net v7 2/9] Revert "net/sched: Restrict conditions for adding duplicating netems to qdisc tree" Cong Wang
2026-01-13 19:06 ` [Patch net v7 3/9] Revert "selftests/tc-testing: Add tests for restrictions on netem duplication" Cong Wang
2026-01-13 19:06 ` [Patch net v7 4/9] net_sched: Implement the right netem duplication behavior Cong Wang
2026-01-13 19:06 ` [Patch net v7 5/9] selftests/tc-testing: Add a nested netem duplicate test Cong Wang
2026-01-13 19:06 ` Cong Wang [this message]
2026-01-13 19:06 ` [Patch net v7 7/9] selftests/tc-testing: Add a test case for mq with netem duplicate Cong Wang
2026-01-13 19:06 ` [Patch net v7 8/9] selftests/tc-testing: Update test cases " Cong Wang
2026-01-13 19:06 ` [Patch net v7 9/9] selftests/tc-testing: Add a test case for HTB with netem Cong Wang
2026-01-16  2:33 ` [Patch net v7 0/9] netem: Fix skb duplication logic and prevent infinite loops Jakub Kicinski
2026-01-18  3:55   ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260113190634.681734-7-xiyou.wangcong@gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox