]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Check for correct program attach/detach in xdp_attach test
authorToke Høiland-Jørgensen <toke@redhat.com>
Tue, 14 Apr 2020 14:50:25 +0000 (16:50 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 15 Apr 2020 11:26:08 +0000 (13:26 +0200)
commitead0ca2758bf5fa8ff672c686e56cd773ea938a7
treefb949e0ba4bb00676e818ac3d3a70efa62781a18
parent4b3f197956ffc589a15068dc69c976cd55e88415
selftests/bpf: Check for correct program attach/detach in xdp_attach test

David Ahern noticed that there was a bug in the EXPECTED_FD code so
programs did not get detached properly when that parameter was supplied.
This case was not included in the xdp_attach tests; so let's add it to be
sure that such a bug does not sneak back in down.

Fixes: 6be3e9595cb2 ("selftests/bpf: Add tests for attaching XDP programs")
Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200414145025.182163-2-toke@redhat.com
tools/testing/selftests/bpf/prog_tests/xdp_attach.c