Skip to content

Commit afef88e

Browse files
d-e-s-oborkmann
authored andcommitted
selftests/bpf: Store BPF object files with .bpf.o extension
BPF object files are, in a way, the final artifact produced as part of the ahead-of-time compilation process. That makes them somewhat special compared to "regular" object files, which are a intermediate build artifacts that can typically be removed safely. As such, it can make sense to name them differently to make it easier to spot this difference at a glance. Among others, libbpf-bootstrap [0] has established the extension .bpf.o for BPF object files. It seems reasonable to follow this example and establish the same denomination for selftest build artifacts. To that end, this change adjusts the corresponding part of the build system and the test programs loading BPF object files to work with .bpf.o files. [0] https://github.com/libbpf/libbpf-bootstrap Suggested-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Müller <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent fe2ad08 commit afef88e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+250
-250
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ifneq ($(BPF_GCC),)
4545
TEST_GEN_PROGS += test_progs-bpf_gcc
4646
endif
4747

48-
TEST_GEN_FILES = test_lwt_ip_encap.o test_tc_edt.o
48+
TEST_GEN_FILES = test_lwt_ip_encap.bpf.o test_tc_edt.bpf.o
4949
TEST_FILES = xsk_prereqs.sh $(wildcard progs/btf_dump_test_case_*.c)
5050

5151
# Order correspond to 'make run_tests' order
@@ -358,17 +358,17 @@ LSKELS := kfunc_call_test.c fentry_test.c fexit_test.c fexit_sleep.c \
358358
LSKELS_EXTRA := test_ksyms_module.c test_ksyms_weak.c kfunc_call_test_subprog.c
359359
SKEL_BLACKLIST += $$(LSKELS)
360360

361-
test_static_linked.skel.h-deps := test_static_linked1.o test_static_linked2.o
362-
linked_funcs.skel.h-deps := linked_funcs1.o linked_funcs2.o
363-
linked_vars.skel.h-deps := linked_vars1.o linked_vars2.o
364-
linked_maps.skel.h-deps := linked_maps1.o linked_maps2.o
361+
test_static_linked.skel.h-deps := test_static_linked1.bpf.o test_static_linked2.bpf.o
362+
linked_funcs.skel.h-deps := linked_funcs1.bpf.o linked_funcs2.bpf.o
363+
linked_vars.skel.h-deps := linked_vars1.bpf.o linked_vars2.bpf.o
364+
linked_maps.skel.h-deps := linked_maps1.bpf.o linked_maps2.bpf.o
365365
# In the subskeleton case, we want the test_subskeleton_lib.subskel.h file
366366
# but that's created as a side-effect of the skel.h generation.
367-
test_subskeleton.skel.h-deps := test_subskeleton_lib2.o test_subskeleton_lib.o test_subskeleton.o
368-
test_subskeleton_lib.skel.h-deps := test_subskeleton_lib2.o test_subskeleton_lib.o
369-
test_usdt.skel.h-deps := test_usdt.o test_usdt_multispec.o
367+
test_subskeleton.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o test_subskeleton.bpf.o
368+
test_subskeleton_lib.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o
369+
test_usdt.skel.h-deps := test_usdt.bpf.o test_usdt_multispec.bpf.o
370370

371-
LINKED_BPF_SRCS := $(patsubst %.o,%.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps)))
371+
LINKED_BPF_SRCS := $(patsubst %.bpf.o,%.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps)))
372372

373373
# Set up extra TRUNNER_XXX "temporary" variables in the environment (relies on
374374
# $eval()) and pass control to DEFINE_TEST_RUNNER_RULES.
@@ -386,7 +386,7 @@ TRUNNER_EXTRA_OBJS := $$(patsubst %.c,$$(TRUNNER_OUTPUT)/%.o, \
386386
TRUNNER_EXTRA_HDRS := $$(filter %.h,$(TRUNNER_EXTRA_SOURCES))
387387
TRUNNER_TESTS_HDR := $(TRUNNER_TESTS_DIR)/tests.h
388388
TRUNNER_BPF_SRCS := $$(notdir $$(wildcard $(TRUNNER_BPF_PROGS_DIR)/*.c))
389-
TRUNNER_BPF_OBJS := $$(patsubst %.c,$$(TRUNNER_OUTPUT)/%.o, $$(TRUNNER_BPF_SRCS))
389+
TRUNNER_BPF_OBJS := $$(patsubst %.c,$$(TRUNNER_OUTPUT)/%.bpf.o, $$(TRUNNER_BPF_SRCS))
390390
TRUNNER_BPF_SKELS := $$(patsubst %.c,$$(TRUNNER_OUTPUT)/%.skel.h, \
391391
$$(filter-out $(SKEL_BLACKLIST) $(LINKED_BPF_SRCS),\
392392
$$(TRUNNER_BPF_SRCS)))
@@ -416,7 +416,7 @@ endif
416416
# input/output directory combination
417417
ifeq ($($(TRUNNER_BPF_PROGS_DIR)$(if $2,-)$2-bpfobjs),)
418418
$(TRUNNER_BPF_PROGS_DIR)$(if $2,-)$2-bpfobjs := y
419-
$(TRUNNER_BPF_OBJS): $(TRUNNER_OUTPUT)/%.o: \
419+
$(TRUNNER_BPF_OBJS): $(TRUNNER_OUTPUT)/%.bpf.o: \
420420
$(TRUNNER_BPF_PROGS_DIR)/%.c \
421421
$(TRUNNER_BPF_PROGS_DIR)/*.h \
422422
$$(INCLUDE_DIR)/vmlinux.h \
@@ -426,25 +426,25 @@ $(TRUNNER_BPF_OBJS): $(TRUNNER_OUTPUT)/%.o: \
426426
$$(call $(TRUNNER_BPF_BUILD_RULE),$$<,$$@, \
427427
$(TRUNNER_BPF_CFLAGS))
428428

429-
$(TRUNNER_BPF_SKELS): %.skel.h: %.o $(BPFTOOL) | $(TRUNNER_OUTPUT)
429+
$(TRUNNER_BPF_SKELS): %.skel.h: %.bpf.o $(BPFTOOL) | $(TRUNNER_OUTPUT)
430430
$$(call msg,GEN-SKEL,$(TRUNNER_BINARY),$$@)
431431
$(Q)$$(BPFTOOL) gen object $$(<:.o=.linked1.o) $$<
432432
$(Q)$$(BPFTOOL) gen object $$(<:.o=.linked2.o) $$(<:.o=.linked1.o)
433433
$(Q)$$(BPFTOOL) gen object $$(<:.o=.linked3.o) $$(<:.o=.linked2.o)
434434
$(Q)diff $$(<:.o=.linked2.o) $$(<:.o=.linked3.o)
435-
$(Q)$$(BPFTOOL) gen skeleton $$(<:.o=.linked3.o) name $$(notdir $$(<:.o=)) > $$@
436-
$(Q)$$(BPFTOOL) gen subskeleton $$(<:.o=.linked3.o) name $$(notdir $$(<:.o=)) > $$(@:.skel.h=.subskel.h)
435+
$(Q)$$(BPFTOOL) gen skeleton $$(<:.o=.linked3.o) name $$(notdir $$(<:.bpf.o=)) > $$@
436+
$(Q)$$(BPFTOOL) gen subskeleton $$(<:.o=.linked3.o) name $$(notdir $$(<:.bpf.o=)) > $$(@:.skel.h=.subskel.h)
437437

438-
$(TRUNNER_BPF_LSKELS): %.lskel.h: %.o $(BPFTOOL) | $(TRUNNER_OUTPUT)
438+
$(TRUNNER_BPF_LSKELS): %.lskel.h: %.bpf.o $(BPFTOOL) | $(TRUNNER_OUTPUT)
439439
$$(call msg,GEN-SKEL,$(TRUNNER_BINARY),$$@)
440440
$(Q)$$(BPFTOOL) gen object $$(<:.o=.llinked1.o) $$<
441441
$(Q)$$(BPFTOOL) gen object $$(<:.o=.llinked2.o) $$(<:.o=.llinked1.o)
442442
$(Q)$$(BPFTOOL) gen object $$(<:.o=.llinked3.o) $$(<:.o=.llinked2.o)
443443
$(Q)diff $$(<:.o=.llinked2.o) $$(<:.o=.llinked3.o)
444-
$(Q)$$(BPFTOOL) gen skeleton -L $$(<:.o=.llinked3.o) name $$(notdir $$(<:.o=_lskel)) > $$@
444+
$(Q)$$(BPFTOOL) gen skeleton -L $$(<:.o=.llinked3.o) name $$(notdir $$(<:.bpf.o=_lskel)) > $$@
445445

446446
$(TRUNNER_BPF_SKELS_LINKED): $(TRUNNER_BPF_OBJS) $(BPFTOOL) | $(TRUNNER_OUTPUT)
447-
$$(call msg,LINK-BPF,$(TRUNNER_BINARY),$$(@:.skel.h=.o))
447+
$$(call msg,LINK-BPF,$(TRUNNER_BINARY),$$(@:.skel.h=.bpf.o))
448448
$(Q)$$(BPFTOOL) gen object $$(@:.skel.h=.linked1.o) $$(addprefix $(TRUNNER_OUTPUT)/,$$($$(@F)-deps))
449449
$(Q)$$(BPFTOOL) gen object $$(@:.skel.h=.linked2.o) $$(@:.skel.h=.linked1.o)
450450
$(Q)$$(BPFTOOL) gen object $$(@:.skel.h=.linked3.o) $$(@:.skel.h=.linked2.o)
@@ -500,7 +500,7 @@ $(OUTPUT)/$(TRUNNER_BINARY): $(TRUNNER_TEST_OBJS) \
500500
| $(TRUNNER_BINARY)-extras
501501
$$(call msg,BINARY,,$$@)
502502
$(Q)$$(CC) $$(CFLAGS) $$(filter %.a %.o,$$^) $$(LDLIBS) -o $$@
503-
$(Q)$(RESOLVE_BTFIDS) --btf $(TRUNNER_OUTPUT)/btf_data.o $$@
503+
$(Q)$(RESOLVE_BTFIDS) --btf $(TRUNNER_OUTPUT)/btf_data.bpf.o $$@
504504
$(Q)ln -sf $(if $2,..,.)/tools/build/bpftool/bootstrap/bpftool $(if $2,$2/)bpftool
505505

506506
endef

tools/testing/selftests/bpf/README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ available in 10.0.1. The patch is available in llvm 11.0.0 trunk.
126126

127127
__ https://reviews.llvm.org/D78466
128128

129-
bpf_verif_scale/loop6.o test failure with Clang 12
130-
==================================================
129+
bpf_verif_scale/loop6.bpf.o test failure with Clang 12
130+
======================================================
131131

132132
With Clang 12, the following bpf_verif_scale test failed:
133-
* ``bpf_verif_scale/loop6.o``
133+
* ``bpf_verif_scale/loop6.bpf.o``
134134

135135
The verifier output looks like
136136

@@ -245,7 +245,7 @@ See `kernel llvm reloc`_ for more explanation and some examples.
245245
Using clang 13 to compile old libbpf which has static linker support,
246246
there will be a compilation failure::
247247

248-
libbpf: ELF relo #0 in section #6 has unexpected type 2 in .../bpf_tcp_nogpl.o
248+
libbpf: ELF relo #0 in section #6 has unexpected type 2 in .../bpf_tcp_nogpl.bpf.o
249249

250250
Here, ``type 2`` refers to new relocation type ``R_BPF_64_ABS64``.
251251
To fix this issue, user newer libbpf.

tools/testing/selftests/bpf/get_cgroup_id_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static int bpf_find_map(const char *test, struct bpf_object *obj,
4848
int main(int argc, char **argv)
4949
{
5050
const char *probe_name = "syscalls/sys_enter_nanosleep";
51-
const char *file = "get_cgroup_id_kern.o";
51+
const char *file = "get_cgroup_id_kern.bpf.o";
5252
int err, bytes, efd, prog_fd, pmu_fd;
5353
int cgroup_fd, cgidmap_fd, pidmap_fd;
5454
struct perf_event_attr attr = {};

tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void serial_test_bpf_obj_id(void)
77
{
88
const __u64 array_magic_value = 0xfaceb00c;
99
const __u32 array_key = 0;
10-
const char *file = "./test_obj_id.o";
10+
const char *file = "./test_obj_id.bpf.o";
1111
const char *expected_prog_name = "test_obj_id";
1212
const char *expected_map_name = "test_map_id";
1313
const __u64 nsec_per_sec = 1000000000;

tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -75,45 +75,45 @@ static void scale_test(const char *file,
7575

7676
void test_verif_scale1()
7777
{
78-
scale_test("test_verif_scale1.o", BPF_PROG_TYPE_SCHED_CLS, false);
78+
scale_test("test_verif_scale1.bpf.o", BPF_PROG_TYPE_SCHED_CLS, false);
7979
}
8080

8181
void test_verif_scale2()
8282
{
83-
scale_test("test_verif_scale2.o", BPF_PROG_TYPE_SCHED_CLS, false);
83+
scale_test("test_verif_scale2.bpf.o", BPF_PROG_TYPE_SCHED_CLS, false);
8484
}
8585

8686
void test_verif_scale3()
8787
{
88-
scale_test("test_verif_scale3.o", BPF_PROG_TYPE_SCHED_CLS, false);
88+
scale_test("test_verif_scale3.bpf.o", BPF_PROG_TYPE_SCHED_CLS, false);
8989
}
9090

9191
void test_verif_scale_pyperf_global()
9292
{
93-
scale_test("pyperf_global.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
93+
scale_test("pyperf_global.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
9494
}
9595

9696
void test_verif_scale_pyperf_subprogs()
9797
{
98-
scale_test("pyperf_subprogs.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
98+
scale_test("pyperf_subprogs.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
9999
}
100100

101101
void test_verif_scale_pyperf50()
102102
{
103103
/* full unroll by llvm */
104-
scale_test("pyperf50.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
104+
scale_test("pyperf50.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
105105
}
106106

107107
void test_verif_scale_pyperf100()
108108
{
109109
/* full unroll by llvm */
110-
scale_test("pyperf100.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
110+
scale_test("pyperf100.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
111111
}
112112

113113
void test_verif_scale_pyperf180()
114114
{
115115
/* full unroll by llvm */
116-
scale_test("pyperf180.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
116+
scale_test("pyperf180.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
117117
}
118118

119119
void test_verif_scale_pyperf600()
@@ -124,13 +124,13 @@ void test_verif_scale_pyperf600()
124124
* 16k insns in loop body.
125125
* Total of 5 such loops. Total program size ~82k insns.
126126
*/
127-
scale_test("pyperf600.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
127+
scale_test("pyperf600.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
128128
}
129129

130130
void test_verif_scale_pyperf600_bpf_loop(void)
131131
{
132132
/* use the bpf_loop helper*/
133-
scale_test("pyperf600_bpf_loop.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
133+
scale_test("pyperf600_bpf_loop.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
134134
}
135135

136136
void test_verif_scale_pyperf600_nounroll()
@@ -141,37 +141,37 @@ void test_verif_scale_pyperf600_nounroll()
141141
* ~110 insns in loop body.
142142
* Total of 5 such loops. Total program size ~1500 insns.
143143
*/
144-
scale_test("pyperf600_nounroll.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
144+
scale_test("pyperf600_nounroll.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
145145
}
146146

147147
void test_verif_scale_loop1()
148148
{
149-
scale_test("loop1.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
149+
scale_test("loop1.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
150150
}
151151

152152
void test_verif_scale_loop2()
153153
{
154-
scale_test("loop2.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
154+
scale_test("loop2.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
155155
}
156156

157157
void test_verif_scale_loop3_fail()
158158
{
159-
scale_test("loop3.o", BPF_PROG_TYPE_RAW_TRACEPOINT, true /* fails */);
159+
scale_test("loop3.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, true /* fails */);
160160
}
161161

162162
void test_verif_scale_loop4()
163163
{
164-
scale_test("loop4.o", BPF_PROG_TYPE_SCHED_CLS, false);
164+
scale_test("loop4.bpf.o", BPF_PROG_TYPE_SCHED_CLS, false);
165165
}
166166

167167
void test_verif_scale_loop5()
168168
{
169-
scale_test("loop5.o", BPF_PROG_TYPE_SCHED_CLS, false);
169+
scale_test("loop5.bpf.o", BPF_PROG_TYPE_SCHED_CLS, false);
170170
}
171171

172172
void test_verif_scale_loop6()
173173
{
174-
scale_test("loop6.o", BPF_PROG_TYPE_KPROBE, false);
174+
scale_test("loop6.bpf.o", BPF_PROG_TYPE_KPROBE, false);
175175
}
176176

177177
void test_verif_scale_strobemeta()
@@ -180,54 +180,54 @@ void test_verif_scale_strobemeta()
180180
* Total program size 20.8k insn.
181181
* ~350k processed_insns
182182
*/
183-
scale_test("strobemeta.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
183+
scale_test("strobemeta.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
184184
}
185185

186186
void test_verif_scale_strobemeta_bpf_loop(void)
187187
{
188188
/* use the bpf_loop helper*/
189-
scale_test("strobemeta_bpf_loop.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
189+
scale_test("strobemeta_bpf_loop.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
190190
}
191191

192192
void test_verif_scale_strobemeta_nounroll1()
193193
{
194194
/* no unroll, tiny loops */
195-
scale_test("strobemeta_nounroll1.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
195+
scale_test("strobemeta_nounroll1.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
196196
}
197197

198198
void test_verif_scale_strobemeta_nounroll2()
199199
{
200200
/* no unroll, tiny loops */
201-
scale_test("strobemeta_nounroll2.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
201+
scale_test("strobemeta_nounroll2.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
202202
}
203203

204204
void test_verif_scale_strobemeta_subprogs()
205205
{
206206
/* non-inlined subprogs */
207-
scale_test("strobemeta_subprogs.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
207+
scale_test("strobemeta_subprogs.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
208208
}
209209

210210
void test_verif_scale_sysctl_loop1()
211211
{
212-
scale_test("test_sysctl_loop1.o", BPF_PROG_TYPE_CGROUP_SYSCTL, false);
212+
scale_test("test_sysctl_loop1.bpf.o", BPF_PROG_TYPE_CGROUP_SYSCTL, false);
213213
}
214214

215215
void test_verif_scale_sysctl_loop2()
216216
{
217-
scale_test("test_sysctl_loop2.o", BPF_PROG_TYPE_CGROUP_SYSCTL, false);
217+
scale_test("test_sysctl_loop2.bpf.o", BPF_PROG_TYPE_CGROUP_SYSCTL, false);
218218
}
219219

220220
void test_verif_scale_xdp_loop()
221221
{
222-
scale_test("test_xdp_loop.o", BPF_PROG_TYPE_XDP, false);
222+
scale_test("test_xdp_loop.bpf.o", BPF_PROG_TYPE_XDP, false);
223223
}
224224

225225
void test_verif_scale_seg6_loop()
226226
{
227-
scale_test("test_seg6_loop.o", BPF_PROG_TYPE_LWT_SEG6LOCAL, false);
227+
scale_test("test_seg6_loop.bpf.o", BPF_PROG_TYPE_LWT_SEG6LOCAL, false);
228228
}
229229

230230
void test_verif_twfw()
231231
{
232-
scale_test("twfw.o", BPF_PROG_TYPE_CGROUP_SKB, false);
232+
scale_test("twfw.bpf.o", BPF_PROG_TYPE_CGROUP_SKB, false);
233233
}

tools/testing/selftests/bpf/prog_tests/btf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4651,8 +4651,8 @@ struct btf_file_test {
46514651
};
46524652

46534653
static struct btf_file_test file_tests[] = {
4654-
{ .file = "test_btf_newkv.o", },
4655-
{ .file = "test_btf_nokv.o", .btf_kv_notfound = true, },
4654+
{ .file = "test_btf_newkv.bpf.o", },
4655+
{ .file = "test_btf_nokv.bpf.o", .btf_kv_notfound = true, },
46564656
};
46574657

46584658
static void do_test_file(unsigned int test_num)

tools/testing/selftests/bpf/prog_tests/btf_dump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static int test_btf_dump_case(int n, struct btf_dump_test_case *t)
5252
int err = 0, fd = -1;
5353
FILE *f = NULL;
5454

55-
snprintf(test_file, sizeof(test_file), "%s.o", t->file);
55+
snprintf(test_file, sizeof(test_file), "%s.bpf.o", t->file);
5656

5757
btf = btf__parse_elf(test_file, NULL);
5858
if (!ASSERT_OK_PTR(btf, "btf_parse_elf")) {
@@ -841,8 +841,8 @@ static void test_btf_dump_datasec_data(char *str)
841841
char license[4] = "GPL";
842842
struct btf_dump *d;
843843

844-
btf = btf__parse("xdping_kern.o", NULL);
845-
if (!ASSERT_OK_PTR(btf, "xdping_kern.o BTF not found"))
844+
btf = btf__parse("xdping_kern.bpf.o", NULL);
845+
if (!ASSERT_OK_PTR(btf, "xdping_kern.bpf.o BTF not found"))
846846
return;
847847

848848
d = btf_dump__new(btf, btf_dump_snprintf, str, NULL);

tools/testing/selftests/bpf/prog_tests/btf_endian.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void test_btf_endian() {
2323
int var_id;
2424

2525
/* Load BTF in native endianness */
26-
btf = btf__parse_elf("btf_dump_test_case_syntax.o", NULL);
26+
btf = btf__parse_elf("btf_dump_test_case_syntax.bpf.o", NULL);
2727
if (!ASSERT_OK_PTR(btf, "parse_native_btf"))
2828
goto err_out;
2929

tools/testing/selftests/bpf/prog_tests/connect_force_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static int run_test(int cgroup_fd, int server_fd, int family, int type)
5353
__u16 expected_peer_port = 60000;
5454
struct bpf_program *prog;
5555
struct bpf_object *obj;
56-
const char *obj_file = v4 ? "connect_force_port4.o" : "connect_force_port6.o";
56+
const char *obj_file = v4 ? "connect_force_port4.bpf.o" : "connect_force_port6.bpf.o";
5757
int fd, err;
5858
__u32 duration = 0;
5959

0 commit comments

Comments
 (0)