summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/tc-testing/tc-tests
diff options
context:
space:
mode:
authorVlad Buslov2019-02-22 15:00:41 +0100
committerDavid S. Miller2019-02-24 21:49:58 +0100
commit450ef62033c76cb654e0deaf432c1b40b57d1488 (patch)
tree84bb25ade997a2a3a6ba7070af200676e99ca200 /tools/testing/selftests/tc-testing/tc-tests
parentselftests: tdc_batch.py: add options needed for concurrency tests (diff)
downloadkernel-qcow2-linux-450ef62033c76cb654e0deaf432c1b40b57d1488.tar.gz
kernel-qcow2-linux-450ef62033c76cb654e0deaf432c1b40b57d1488.tar.xz
kernel-qcow2-linux-450ef62033c76cb654e0deaf432c1b40b57d1488.zip
selftests: concurrency: add test to verify parallel rules insertion
Implement test that verifies parallel rules insertion by adding 1 million flower filters with 10 concurrent tc instances. Put it to standalone 'concurrency' category. Implement tdc_multibatch.py helper script that is used to generate multiple batch files for concurrent tc execution. Extend config with new 'BATCH_DIR' variable to specify temporary output directory that is used to store batch files generated by tdc_multibatch.py. Signed-off-by: Vlad Buslov <vladbu@mellanox.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/concurrency.json25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/concurrency.json b/tools/testing/selftests/tc-testing/tc-tests/filters/concurrency.json
new file mode 100644
index 000000000000..adb14e944594
--- /dev/null
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/concurrency.json
@@ -0,0 +1,25 @@
+[
+ {
+ "id": "e41d",
+ "name": "Add 1M flower filters with 10 parallel tc instances",
+ "category": [
+ "filter",
+ "flower",
+ "concurrency"
+ ],
+ "setup": [
+ "/bin/mkdir $BATCH_DIR",
+ "$TC qdisc add dev $DEV2 ingress",
+ "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 add"
+ ],
+ "cmdUnderTest": "find $BATCH_DIR/add* -print | xargs -n 1 -P 10 $TC -b",
+ "expExitCode": "0",
+ "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
+ "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
+ "matchCount": "1000000",
+ "teardown": [
+ "$TC qdisc del dev $DEV2 ingress",
+ "/bin/rm -rf $BATCH_DIR"
+ ]
+ }
+]