]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/bpf: Rename bpf_iter_task_vma.c to bpf_iter_task_vmas.c
authorDave Marchevsky <davemarchevsky@fb.com>
Fri, 13 Oct 2023 20:44:23 +0000 (13:44 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 13 Oct 2023 22:48:58 +0000 (15:48 -0700)
Further patches in this series will add a struct bpf_iter_task_vma,
which will result in a name collision with the selftest prog renamed in
this patch. Rename the selftest to avoid the collision.

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20231013204426.1074286-3-davemarchevsky@fb.com
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
tools/testing/selftests/bpf/progs/bpf_iter_task_vmas.c [moved from tools/testing/selftests/bpf/progs/bpf_iter_task_vma.c with 100% similarity]

index 1f02168103dd776fd5c9e83d4a90f173f0153ae1..41aba139b20b85f6bdca394f266773fc20e83fcc 100644 (file)
@@ -10,7 +10,7 @@
 #include "bpf_iter_task.skel.h"
 #include "bpf_iter_task_stack.skel.h"
 #include "bpf_iter_task_file.skel.h"
-#include "bpf_iter_task_vma.skel.h"
+#include "bpf_iter_task_vmas.skel.h"
 #include "bpf_iter_task_btf.skel.h"
 #include "bpf_iter_tcp4.skel.h"
 #include "bpf_iter_tcp6.skel.h"
@@ -1399,19 +1399,19 @@ static void str_strip_first_line(char *str)
 static void test_task_vma_common(struct bpf_iter_attach_opts *opts)
 {
        int err, iter_fd = -1, proc_maps_fd = -1;
-       struct bpf_iter_task_vma *skel;
+       struct bpf_iter_task_vmas *skel;
        int len, read_size = 4;
        char maps_path[64];
 
-       skel = bpf_iter_task_vma__open();
-       if (!ASSERT_OK_PTR(skel, "bpf_iter_task_vma__open"))
+       skel = bpf_iter_task_vmas__open();
+       if (!ASSERT_OK_PTR(skel, "bpf_iter_task_vmas__open"))
                return;
 
        skel->bss->pid = getpid();
        skel->bss->one_task = opts ? 1 : 0;
 
-       err = bpf_iter_task_vma__load(skel);
-       if (!ASSERT_OK(err, "bpf_iter_task_vma__load"))
+       err = bpf_iter_task_vmas__load(skel);
+       if (!ASSERT_OK(err, "bpf_iter_task_vmas__load"))
                goto out;
 
        skel->links.proc_maps = bpf_program__attach_iter(
@@ -1462,25 +1462,25 @@ static void test_task_vma_common(struct bpf_iter_attach_opts *opts)
 out:
        close(proc_maps_fd);
        close(iter_fd);
-       bpf_iter_task_vma__destroy(skel);
+       bpf_iter_task_vmas__destroy(skel);
 }
 
 static void test_task_vma_dead_task(void)
 {
-       struct bpf_iter_task_vma *skel;
+       struct bpf_iter_task_vmas *skel;
        int wstatus, child_pid = -1;
        time_t start_tm, cur_tm;
        int err, iter_fd = -1;
        int wait_sec = 3;
 
-       skel = bpf_iter_task_vma__open();
-       if (!ASSERT_OK_PTR(skel, "bpf_iter_task_vma__open"))
+       skel = bpf_iter_task_vmas__open();
+       if (!ASSERT_OK_PTR(skel, "bpf_iter_task_vmas__open"))
                return;
 
        skel->bss->pid = getpid();
 
-       err = bpf_iter_task_vma__load(skel);
-       if (!ASSERT_OK(err, "bpf_iter_task_vma__load"))
+       err = bpf_iter_task_vmas__load(skel);
+       if (!ASSERT_OK(err, "bpf_iter_task_vmas__load"))
                goto out;
 
        skel->links.proc_maps = bpf_program__attach_iter(
@@ -1533,7 +1533,7 @@ static void test_task_vma_dead_task(void)
 out:
        waitpid(child_pid, &wstatus, 0);
        close(iter_fd);
-       bpf_iter_task_vma__destroy(skel);
+       bpf_iter_task_vmas__destroy(skel);
 }
 
 void test_bpf_sockmap_map_iter_fd(void)