History log of /linux-master/tools/testing/selftests/bpf/progs/test_xdp_attach_fail.c
Revision Date Author Comments
# 7fedbf32 01-Aug-2023 Leon Hwang <hffilwlqm@gmail.com>

selftests/bpf: Add testcase for xdp attaching failure tracepoint

Add a test case for the tracepoint of xdp attaching failure by bpf
tracepoint when attach XDP to a device with invalid flags option.

The bpf tracepoint retrieves error message from the tracepoint, and
then put the error message to a perf buffer. The testing code receives
error message from perf buffer, and then ASSERT "Invalid XDP flags for
BPF link attachment".

Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Link: https://lore.kernel.org/r/20230801142621.7925-3-hffilwlqm@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>