Skip to content

Commit f7017ca

Browse files
dcarattidavem330
authored andcommitted
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: 440ea4a ("tc-testing: add selftests for 'bpf' action") Signed-off-by: Davide Caratti <[email protected]> Acked-by: Lucas Bates <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6ad4e91 commit f7017ca

File tree

1 file changed

+8
-3
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/actions

1 file changed

+8
-3
lines changed

tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"cmdUnderTest": "$TC action add action bpf object-file _b.o index 667",
6767
"expExitCode": "0",
6868
"verifyCmd": "$TC action get action bpf index 667",
69-
"matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9]* tag 3b185187f1855c4c default-action pipe.*index 667 ref",
69+
"matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9]* tag 3b185187f1855c4c( jited)? default-action pipe.*index 667 ref",
7070
"matchCount": "1",
7171
"teardown": [
7272
"$TC action flush action bpf",
@@ -92,10 +92,15 @@
9292
"cmdUnderTest": "$TC action add action bpf object-file _c.o index 667",
9393
"expExitCode": "255",
9494
"verifyCmd": "$TC action get action bpf index 667",
95-
"matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9].*index 667 ref",
95+
"matchPattern": "action order [0-9]*: bpf _c.o:\\[action\\] id [0-9].*index 667 ref",
9696
"matchCount": "0",
9797
"teardown": [
98-
"$TC action flush action bpf",
98+
[
99+
"$TC action flush action bpf",
100+
0,
101+
1,
102+
255
103+
],
99104
"rm -f _c.o"
100105
]
101106
},

0 commit comments

Comments
 (0)