Commit f7017caf authored by Davide Caratti's avatar Davide Caratti Committed by David S. Miller

tc-testing: fix tdc tests for 'bpf' action

- correct a typo in the value of 'matchPattern' of test 282d, potentially
 causing false negative
- allow errors when 'teardown' executes '$TC action flush action bpf' in
 test 282d, to fix false positive when it is run with act_bpf unloaded
- correct the value of 'matchPattern' in test e939, causing false positive
 in case the BPF JIT is enabled

Fixes: 440ea4ae ("tc-testing: add selftests for 'bpf' action")
Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
Acked-by: default avatarLucas Bates <lucasb@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ad4e91c
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
"cmdUnderTest": "$TC action add action bpf object-file _b.o index 667", "cmdUnderTest": "$TC action add action bpf object-file _b.o index 667",
"expExitCode": "0", "expExitCode": "0",
"verifyCmd": "$TC action get action bpf index 667", "verifyCmd": "$TC action get action bpf index 667",
"matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9]* tag 3b185187f1855c4c default-action pipe.*index 667 ref", "matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9]* tag 3b185187f1855c4c( jited)? default-action pipe.*index 667 ref",
"matchCount": "1", "matchCount": "1",
"teardown": [ "teardown": [
"$TC action flush action bpf", "$TC action flush action bpf",
...@@ -92,10 +92,15 @@ ...@@ -92,10 +92,15 @@
"cmdUnderTest": "$TC action add action bpf object-file _c.o index 667", "cmdUnderTest": "$TC action add action bpf object-file _c.o index 667",
"expExitCode": "255", "expExitCode": "255",
"verifyCmd": "$TC action get action bpf index 667", "verifyCmd": "$TC action get action bpf index 667",
"matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9].*index 667 ref", "matchPattern": "action order [0-9]*: bpf _c.o:\\[action\\] id [0-9].*index 667 ref",
"matchCount": "0", "matchCount": "0",
"teardown": [ "teardown": [
"$TC action flush action bpf", [
"$TC action flush action bpf",
0,
1,
255
],
"rm -f _c.o" "rm -f _c.o"
] ]
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment