summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/tc-testing/tc-tests
diff options
context:
space:
mode:
authorVlad Buslov2019-02-22 15:00:44 +0100
committerDavid S. Miller2019-02-24 21:49:59 +0100
commit424c5bd46ad3da8d69f302375bbda69d4a7107bc (patch)
treec0e2288d6e74aa54a381fb6369d7177363cd5ff7 /tools/testing/selftests/tc-testing/tc-tests
parentselftests: concurrency: add test to verify parallel rules replace (diff)
downloadkernel-qcow2-linux-424c5bd46ad3da8d69f302375bbda69d4a7107bc.tar.gz
kernel-qcow2-linux-424c5bd46ad3da8d69f302375bbda69d4a7107bc.tar.xz
kernel-qcow2-linux-424c5bd46ad3da8d69f302375bbda69d4a7107bc.zip
selftests: concurrency: add test to verify concurrent replace
Implement test that verifies concurrent replacement of rules by executing 10 tc instances that replace flower filters in same handle range. Extend tdc_multibatch.py script with new optional CLI argument that is used to generate all batch files with same filter handle range. 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
index 57ed29eb58bf..3c49fca7e76c 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/concurrency.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/concurrency.json
@@ -71,5 +71,30 @@
"$TC qdisc del dev $DEV2 ingress",
"/bin/rm -rf $BATCH_DIR"
]
+ },
+ {
+ "id": "14be",
+ "name": "Concurrently replace same range of 100k flower filters from 10 tc instances",
+ "category": [
+ "filter",
+ "flower",
+ "concurrency"
+ ],
+ "setup": [
+ "/bin/mkdir $BATCH_DIR",
+ "$TC qdisc add dev $DEV2 ingress",
+ "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 1 add",
+ "$TC -b $BATCH_DIR/add_0",
+ "./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 replace"
+ ],
+ "cmdUnderTest": "find $BATCH_DIR/replace* -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": "100000",
+ "teardown": [
+ "$TC qdisc del dev $DEV2 ingress",
+ "/bin/rm -rf $BATCH_DIR"
+ ]
}
]