Skip to content

Commit 852c2ee

Browse files
tohojoborkmann
authored andcommitted
selftests/bpf/test_offload.py: Fix expected case of extack messages
Commit 7f0a838 ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") changed the case of some of the extack messages being returned when attaching of XDP programs failed. This broke test_offload.py, so let's fix the test to reflect this. Fixes: 7f0a838 ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/bpf/160752226175.110217.11214100824416344952.stgit@toke.dk
1 parent d8b5e76 commit 852c2ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/test_offload.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ def test_multi_prog(simdev, sim, obj, modename, modeid):
10041004
fail=False, include_stderr=True)
10051005
fail(ret == 0, "Replaced XDP program with a program in different mode")
10061006
check_extack(err,
1007-
"native and generic XDP can't be active at the same time.",
1007+
"Native and generic XDP can't be active at the same time.",
10081008
args)
10091009

10101010
start_test("Test MTU restrictions...")
@@ -1035,7 +1035,7 @@ def test_multi_prog(simdev, sim, obj, modename, modeid):
10351035
offload = bpf_pinned("/sys/fs/bpf/offload")
10361036
ret, _, err = sim.set_xdp(offload, "drv", fail=False, include_stderr=True)
10371037
fail(ret == 0, "attached offloaded XDP program to drv")
1038-
check_extack(err, "using device-bound program without HW_MODE flag is not supported.", args)
1038+
check_extack(err, "Using device-bound program without HW_MODE flag is not supported.", args)
10391039
rm("/sys/fs/bpf/offload")
10401040
sim.wait_for_flush()
10411041

0 commit comments

Comments
 (0)