mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:51:00 +07:00
selftests/bpf: fix test_attach_probe map definition
ef99b02b23
("libbpf: capture value in BTF type info for BTF-defined map defs") changed BTF-defined maps syntax, while independently merged1e8611bbdf
("selftests/bpf: add kprobe/uprobe selftests") added new test using outdated syntax of maps. This patch fixes this test after corresponding patch sets were merged. Fixes:ef99b02b23
("libbpf: capture value in BTF type info for BTF-defined map defs") Fixes:1e8611bbdf
("selftests/bpf: add kprobe/uprobe selftests") Signed-off-by: Andrii Nakryiko <andriin@fb.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
8bfec4f325
commit
06ec0e2c49
@ -6,14 +6,11 @@
|
|||||||
#include "bpf_helpers.h"
|
#include "bpf_helpers.h"
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int type;
|
__uint(type, BPF_MAP_TYPE_ARRAY);
|
||||||
int max_entries;
|
__uint(max_entries, 4);
|
||||||
int *key;
|
__type(key, int);
|
||||||
int *value;
|
__type(value, int);
|
||||||
} results_map SEC(".maps") = {
|
} results_map SEC(".maps");
|
||||||
.type = BPF_MAP_TYPE_ARRAY,
|
|
||||||
.max_entries = 4,
|
|
||||||
};
|
|
||||||
|
|
||||||
SEC("kprobe/sys_nanosleep")
|
SEC("kprobe/sys_nanosleep")
|
||||||
int handle_sys_nanosleep_entry(struct pt_regs *ctx)
|
int handle_sys_nanosleep_entry(struct pt_regs *ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user