mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-24 10:49:54 +02:00
selftests/bpf: Use vmlinux.h in test_xdp_meta
- Replace linux/* includes with vmlinux.h - Include errno.h - Include bpf_tracing_net.h for TC_ACT_* and ETH_* - Use BPF_STDERR instead of BPF_STREAM_STDERR Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev> Link: https://lore.kernel.org/r/20260218215651.2057673-2-ihor.solodrai@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Alexei Starovoitov
parent
3b39d73cc3
commit
b3dfa128f7
@@ -1,12 +1,12 @@
|
||||
#include <stdbool.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/pkt_cls.h>
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <vmlinux.h>
|
||||
|
||||
#include <bpf/bpf_endian.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "bpf_kfuncs.h"
|
||||
#include "bpf_tracing_net.h"
|
||||
|
||||
#define META_SIZE 32
|
||||
|
||||
@@ -42,7 +42,7 @@ static bool check_metadata(const char *file, int line, __u8 *meta_have)
|
||||
if (!__builtin_memcmp(meta_have, meta_want, META_SIZE))
|
||||
return true;
|
||||
|
||||
bpf_stream_printk(BPF_STREAM_STDERR,
|
||||
bpf_stream_printk(BPF_STDERR,
|
||||
"FAIL:%s:%d: metadata mismatch\n"
|
||||
" have:\n %pI6\n %pI6\n"
|
||||
" want:\n %pI6\n %pI6\n",
|
||||
|
||||
Reference in New Issue
Block a user