Skip to content

Commit 3b282d2

Browse files
borkmannKernel Patches Daemon
authored and
Kernel Patches Daemon
committed
selftests/bpf: Add selftests for meta
Add a bigger batch of test coverage to assert correct operation of meta device and its BPF program management: # ./vmtest.sh -- ./test_progs -t tc_meta [...] ./test_progs -t tc_meta [ 1.211407] bpf_testmod: loading out-of-tree module taints kernel. [ 1.211805] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel [ 1.271692] tsc: Refined TSC clocksource calibration: 3407.989 MHz [ 1.274015] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc9c9451, max_idle_ns: 440795361646 ns [ 1.275241] clocksource: Switched to clocksource tsc #255 tc_meta_basic:OK #256 tc_meta_device:OK #257 tc_meta_multi_links:OK #258 tc_meta_multi_opts:OK #259 tc_meta_neigh_links:OK Summary: 5/0 PASSED, 0 SKIPPED, 0 FAILED [...] Signed-off-by: Daniel Borkmann <[email protected]>
1 parent d0ff0fc commit 3b282d2

File tree

4 files changed

+668
-0
lines changed

4 files changed

+668
-0
lines changed

tools/testing/selftests/bpf/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ CONFIG_IPV6_TUNNEL=y
4343
CONFIG_KEYS=y
4444
CONFIG_LIRC=y
4545
CONFIG_LWTUNNEL=y
46+
CONFIG_META=y
4647
CONFIG_MODULE_SIG=y
4748
CONFIG_MODULE_SRCVERSION_ALL=y
4849
CONFIG_MODULE_UNLOAD=y

tools/testing/selftests/bpf/prog_tests/tc_helpers.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#define TC_HELPERS
55
#include <test_progs.h>
66

7+
#ifndef loopback
8+
# define loopback 1
9+
#endif
10+
711
static inline __u32 id_from_prog_fd(int fd)
812
{
913
struct bpf_prog_info prog_info = {};

0 commit comments

Comments
 (0)