mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
selftests/tc-testing: add tests for cls_fw and cls_flow on shared blocks
Regression tests for the shared-block NULL derefs fixed in the previous
two patches:
- fw: attempt to attach an empty fw filter to a shared block and
verify the configuration is rejected with EINVAL.
- flow: create a flow filter on a shared block without a baseclass
and verify the configuration is rejected with EINVAL.
Signed-off-by: Xiang Mei <xmei5@asu.edu>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Link: https://patch.msgid.link/20260331050217.504278-3-xmei5@asu.edu
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
@@ -22,5 +22,49 @@
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DUMMY root handle 1: htb default 1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "b7e3",
|
||||
"name": "Empty fw filter on shared block - rejected at config time",
|
||||
"category": [
|
||||
"filter",
|
||||
"fw"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$TC qdisc add dev $DEV1 egress_block 1 clsact"
|
||||
],
|
||||
"cmdUnderTest": "$TC filter add block 1 protocol ip prio 1 fw",
|
||||
"expExitCode": "2",
|
||||
"verifyCmd": "$TC filter show block 1",
|
||||
"matchPattern": "fw",
|
||||
"matchCount": "0",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DEV1 clsact"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "c8f4",
|
||||
"name": "Flow filter on shared block without baseclass - rejected at config time",
|
||||
"category": [
|
||||
"filter",
|
||||
"flow"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$TC qdisc add dev $DEV1 ingress_block 1 clsact"
|
||||
],
|
||||
"cmdUnderTest": "$TC filter add block 1 protocol ip prio 1 handle 1 flow map key dst",
|
||||
"expExitCode": "2",
|
||||
"verifyCmd": "$TC filter show block 1",
|
||||
"matchPattern": "flow",
|
||||
"matchCount": "0",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DEV1 clsact"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user