Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ce46451 authored by Vlad Buslov's avatar Vlad Buslov Committed by David S. Miller
Browse files

selftests: concurrency: add test to verify parallel replace/delete



Implement test that runs 5 instances of tc replace filter in parallel with
5 instances of tc del filter from same tp instance. Each instance uses its
own filter handle and key range.

Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent be6b294d
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -147,5 +147,31 @@
            "$TC qdisc del dev $DEV2 ingress",
            "/bin/rm -rf $BATCH_DIR"
        ]
    },
    {
        "id": "6e8f",
        "name": "Replace and delete from same tp with 10 tc instances",
        "category": [
            "filter",
            "flower",
            "concurrency"
        ],
        "setup": [
            "/bin/mkdir $BATCH_DIR",
            "$TC qdisc add dev $DEV2 ingress",
            "./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 10 add",
            "find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b",
            "./tdc_multibatch.py -x par_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 replace",
            "./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del"
        ],
        "cmdUnderTest": "find $BATCH_DIR/par_* -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": "500000",
        "teardown": [
            "$TC qdisc del dev $DEV2 ingress",
            "/bin/rm -rf $BATCH_DIR"
        ]
    }
]