Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/tc-testings: Be compatible with newer tc output

old tc(iproute2-5.9.0) output:
action order 1: bpf action.o:[action-ok] id 60 tag bcf7977d3b93787c jited default-action pipe
newer tc(iproute2-5.14.0) output:
action order 1: bpf action.o:[action-ok] id 64 name tag bcf7977d3b93787c jited default-action pipe

It can fix below errors:
# ok 260 f84a - Add cBPF action with invalid bytecode
# not ok 261 e939 - Add eBPF action with valid object-file
# Could not match regex pattern. Verify command output:
# total acts 0
#
# action order 1: bpf action.o:[action-ok] id 42 name tag bcf7977d3b93787c jited default-action pipe
# index 667 ref 1 bind 0

Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Li Zhijian and committed by
David S. Miller
ac2944ab bdf1565f

+1 -1
+1 -1
tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
··· 68 68 "cmdUnderTest": "$TC action add action bpf object-file $EBPFDIR/action.o section action-ok index 667", 69 69 "expExitCode": "0", 70 70 "verifyCmd": "$TC action get action bpf index 667", 71 - "matchPattern": "action order [0-9]*: bpf action.o:\\[action-ok\\] id [0-9]* tag [0-9a-f]{16}( jited)? default-action pipe.*index 667 ref", 71 + "matchPattern": "action order [0-9]*: bpf action.o:\\[action-ok\\] id [0-9].* tag [0-9a-f]{16}( jited)? default-action pipe.*index 667 ref", 72 72 "matchCount": "1", 73 73 "teardown": [ 74 74 "$TC action flush action bpf"