aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/tc-testing/tc-tests
diff options
context:
space:
mode:
authorChris Mi <chrism@mellanox.com>2017-10-26 18:24:43 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-29 22:49:31 +0900
commit31c2611b66e01378b54f7ef641cb0d23fcd8502f (patch)
tree9977e690a21f354b5ed0535f8ddad4ec176f6dac /tools/testing/selftests/tc-testing/tc-tests
parentselftests: Introduce a new script to generate tc batch file (diff)
downloadwireguard-linux-31c2611b66e01378b54f7ef641cb0d23fcd8502f.tar.xz
wireguard-linux-31c2611b66e01378b54f7ef641cb0d23fcd8502f.zip
selftests: Introduce a new test case to tc testsuite
In this patchset, we fixed a tc bug. This patch adds the test case that reproduces the bug. To run this test case, user should specify an existing NIC device: # sudo ./tdc.py -d enp4s0f0 This test case belongs to category "flower". If user doesn't specify a NIC device, the test cases belong to "flower" will not be run. In this test case, we create 1M filters and all filters share the same action. When destroying all filters, kernel should not panic. It takes about 18s to run it. Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: Chris Mi <chrism@mellanox.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/tc-testing/tc-tests')
-rw-r--r--tools/testing/selftests/tc-testing/tc-tests/filters/tests.json23
1 files changed, 22 insertions, 1 deletions
diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json b/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
index c727b96a59b0..5fa02d86b35f 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
@@ -17,5 +17,26 @@
"teardown": [
"$TC qdisc del dev $DEV1 ingress"
]
+ },
+ {
+ "id": "d052",
+ "name": "Add 1M filters with the same action",
+ "category": [
+ "filter",
+ "flower"
+ ],
+ "setup": [
+ "$TC qdisc add dev $DEV2 ingress",
+ "./tdc_batch.py $DEV2 $BATCH_FILE --share_action -n 1000000"
+ ],
+ "cmdUnderTest": "$TC -b $BATCH_FILE",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action gact",
+ "matchPattern": "action order 0: gact action drop.*index 1 ref 1000000 bind 1000000",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DEV2 ingress",
+ "/bin/rm $BATCH_FILE"
+ ]
}
-] \ No newline at end of file
+]