summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/tailcalls.c
diff options
context:
space:
mode:
authorSamasth Norway Ananda <samasth.norway.ananda@oracle.com>2024-02-02 17:12:28 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-23 08:55:15 +0100
commit62900d358c480b12681a60b0c0f2ff5cd80d630c (patch)
tree3de89ef3299888a857d787b88d823049f9565f1a /tools/testing/selftests/bpf/prog_tests/tailcalls.c
parent75ac8dc028506c2c57e5869b58b81d8e528ce2c5 (diff)
Revert "selftests/bpf: Test tail call counting with bpf2bpf and data on stack"
This reverts commit 3eefb2fbf4ec1c1ff239b8b65e6e78aae335e4a6. libbpf support for "tc" progs doesn't exist for the linux-5.15.y tree. This commit was backported too far back in upstream, to a kernel where the libbpf support was not there for the test. Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tailcalls.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/tailcalls.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/tailcalls.c b/tools/testing/selftests/bpf/prog_tests/tailcalls.c
index 28e30ad4a30e..2e3e525e8579 100644
--- a/tools/testing/selftests/bpf/prog_tests/tailcalls.c
+++ b/tools/testing/selftests/bpf/prog_tests/tailcalls.c
@@ -810,59 +810,6 @@ out:
bpf_object__close(obj);
}
-#include "tailcall_bpf2bpf6.skel.h"
-
-/* Tail call counting works even when there is data on stack which is
- * not aligned to 8 bytes.
- */
-static void test_tailcall_bpf2bpf_6(void)
-{
- struct tailcall_bpf2bpf6 *obj;
- int err, map_fd, prog_fd, main_fd, data_fd, i, val;
- LIBBPF_OPTS(bpf_test_run_opts, topts,
- .data_in = &pkt_v4,
- .data_size_in = sizeof(pkt_v4),
- .repeat = 1,
- );
-
- obj = tailcall_bpf2bpf6__open_and_load();
- if (!ASSERT_OK_PTR(obj, "open and load"))
- return;
-
- main_fd = bpf_program__fd(obj->progs.entry);
- if (!ASSERT_GE(main_fd, 0, "entry prog fd"))
- goto out;
-
- map_fd = bpf_map__fd(obj->maps.jmp_table);
- if (!ASSERT_GE(map_fd, 0, "jmp_table map fd"))
- goto out;
-
- prog_fd = bpf_program__fd(obj->progs.classifier_0);
- if (!ASSERT_GE(prog_fd, 0, "classifier_0 prog fd"))
- goto out;
-
- i = 0;
- err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY);
- if (!ASSERT_OK(err, "jmp_table map update"))
- goto out;
-
- err = bpf_prog_test_run_opts(main_fd, &topts);
- ASSERT_OK(err, "entry prog test run");
- ASSERT_EQ(topts.retval, 0, "tailcall retval");
-
- data_fd = bpf_map__fd(obj->maps.bss);
- if (!ASSERT_GE(data_fd, 0, "bss map fd"))
- goto out;
-
- i = 0;
- err = bpf_map_lookup_elem(data_fd, &i, &val);
- ASSERT_OK(err, "bss map lookup");
- ASSERT_EQ(val, 1, "done flag is set");
-
-out:
- tailcall_bpf2bpf6__destroy(obj);
-}
-
void test_tailcalls(void)
{
if (test__start_subtest("tailcall_1"))
@@ -885,6 +832,4 @@ void test_tailcalls(void)
test_tailcall_bpf2bpf_4(false);
if (test__start_subtest("tailcall_bpf2bpf_5"))
test_tailcall_bpf2bpf_4(true);
- if (test__start_subtest("tailcall_bpf2bpf_6"))
- test_tailcall_bpf2bpf_6();
}