diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2019-02-22 16:00:44 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-24 12:49:59 -0800 |
commit | 424c5bd46ad3da8d69f302375bbda69d4a7107bc (patch) | |
tree | c0e2288d6e74aa54a381fb6369d7177363cd5ff7 /tools/testing/selftests/tc-testing/tdc_multibatch.py | |
parent | 4ba21de23a7656a91de9b002294be6c37ffc5627 (diff) | |
download | lwn-424c5bd46ad3da8d69f302375bbda69d4a7107bc.tar.gz lwn-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/tdc_multibatch.py')
-rwxr-xr-x | tools/testing/selftests/tc-testing/tdc_multibatch.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/testing/selftests/tc-testing/tdc_multibatch.py b/tools/testing/selftests/tc-testing/tdc_multibatch.py index cd980d1785bb..0d8be39b5580 100755 --- a/tools/testing/selftests/tc-testing/tdc_multibatch.py +++ b/tools/testing/selftests/tc-testing/tdc_multibatch.py @@ -21,6 +21,11 @@ parser.add_argument( "operation", choices=['add', 'del', 'replace'], help="operation to perform on filters") +parser.add_argument( + "-d", + "--duplicate_handles", + action="store_true", + help="duplicate filter handle range in all files") args = parser.parse_args() device = args.device @@ -29,10 +34,12 @@ file_prefix = args.operation + "_" num_filters = args.num_filters num_files = args.num_files operation = args.operation +duplicate_handles = args.duplicate_handles handle = 1 for i in range(num_files): file = dir + '/' + file_prefix + str(i) os.system("./tdc_batch.py -n {} -a {} -e {} -m {} {} {}".format( num_filters, handle, operation, i, device, file)) - handle += num_filters + if not duplicate_handles: + handle += num_filters |