Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: rename btf_decl_tag.c to test_btf_decl_tag.c

The uapi btf.h contains the following declaration:
struct btf_decl_tag {
__s32 component_idx;
};

The skeleton will also generate a struct with name
"btf_decl_tag" for bpf program btf_decl_tag.c.

Rename btf_decl_tag.c to test_btf_decl_tag.c so
the corresponding skeleton struct name becomes
"test_btf_decl_tag". This way, we could include
uapi btf.h in prog_tests/btf_tag.c.
There is no functionality change for this patch.

Signed-off-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20220127154611.656699-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Yonghong Song and committed by
Alexei Starovoitov
571d01a9 c6f1bfe8

+4 -4
+4 -4
tools/testing/selftests/bpf/prog_tests/btf_tag.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* Copyright (c) 2021 Facebook */ 3 3 #include <test_progs.h> 4 - #include "btf_decl_tag.skel.h" 4 + #include "test_btf_decl_tag.skel.h" 5 5 6 6 /* struct btf_type_tag_test is referenced in btf_type_tag.skel.h */ 7 7 struct btf_type_tag_test { ··· 11 11 12 12 static void test_btf_decl_tag(void) 13 13 { 14 - struct btf_decl_tag *skel; 14 + struct test_btf_decl_tag *skel; 15 15 16 - skel = btf_decl_tag__open_and_load(); 16 + skel = test_btf_decl_tag__open_and_load(); 17 17 if (!ASSERT_OK_PTR(skel, "btf_decl_tag")) 18 18 return; 19 19 ··· 22 22 test__skip(); 23 23 } 24 24 25 - btf_decl_tag__destroy(skel); 25 + test_btf_decl_tag__destroy(skel); 26 26 } 27 27 28 28 static void test_btf_type_tag(void)
tools/testing/selftests/bpf/progs/btf_decl_tag.c tools/testing/selftests/bpf/progs/test_btf_decl_tag.c