Commit Graph

7 Commits

Author SHA1 Message Date
Artem Savkov 90344e6425 selftests/bpf: Replace extract_build_id with read_build_id
Bugzilla: https://bugzilla.redhat.com/2221599

commit dcc46f51d770bde625e4845cac42e808b3302b62
Author: Jiri Olsa <jolsa@kernel.org>
Date:   Fri Mar 31 11:31:57 2023 +0200

    selftests/bpf: Replace extract_build_id with read_build_id
    
    Replacing extract_build_id with read_build_id that parses out
    build id directly from elf without using readelf tool.
    
    Acked-by: Andrii Nakryiko <andrii@kernel.org>
    Signed-off-by: Jiri Olsa <jolsa@kernel.org>
    Link: https://lore.kernel.org/r/20230331093157.1749137-4-jolsa@kernel.org
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2023-09-22 09:12:24 +02:00
Yauheni Kaliuta f3948f6ae4 selftests/bpf: Convert some selftests to high-level BPF map APIs
Bugzilla: https://bugzilla.redhat.com/2120968

commit b2531d4bdce19f28364b45aac9132e153b1f23a4
Author: Andrii Nakryiko <andrii@kernel.org>
Date:   Thu May 12 15:07:13 2022 -0700

    selftests/bpf: Convert some selftests to high-level BPF map APIs
    
    Convert a bunch of selftests to using newly added high-level BPF map
    APIs.
    
    This change exposed that map_kptr selftests allocated too big buffer,
    which is fixed in this patch as well.
    
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20220512220713.2617964-2-andrii@kernel.org

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
2022-11-30 12:47:04 +02:00
Andrii Nakryiko 5dc7a8b211 bpftool, selftests/bpf: Embed object file inside skeleton
Embed contents of BPF object file used for BPF skeleton generation inside
skeleton itself. This allows to keep BPF object file and its skeleton in sync
at all times, and simpifies skeleton instantiation.

Also switch existing selftests to not require BPF_EMBED_OBJ anymore.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20191218052552.2915188-2-andriin@fb.com
2019-12-17 22:16:35 -08:00
Andrii Nakryiko dde53c1b76 selftests/bpf: Convert few more selftest to skeletons
Convert few more selftests to use generated BPF skeletons as a demonstration
on how to use it.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20191214014341.3442258-16-andriin@fb.com
2019-12-15 15:58:05 -08:00
Stanislav Fomichev 62d69f24fe selftests/bpf: test_progs: remove asserts from subtests
Otherwise they can bring the whole process down.

Cc: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2019-08-28 00:35:40 +02:00
Andrii Nakryiko 1bdb34274a selftests/bpf: convert existing tracepoint tests to new APIs
Convert some existing tests that attach to tracepoints to use
bpf_program__attach_tracepoint API instead.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2019-07-05 22:37:31 +02:00
Stanislav Fomichev 615741d81d selftests: bpf: break up test_progs - stackmap
Move stackmap prog tests into separate files.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-03-02 11:10:40 -08:00