diff --git a/tools/testing/selftests/bpf/prog_tests/raw_tp_writable_reject_nbd_invalid.c b/tools/testing/selftests/bpf/prog_tests/raw_tp_writable_reject_bad_access.c similarity index 75% rename from tools/testing/selftests/bpf/prog_tests/raw_tp_writable_reject_nbd_invalid.c rename to tools/testing/selftests/bpf/prog_tests/raw_tp_writable_reject_bad_access.c index 216b0dfac0fe..e0a1ca3c1e6a 100644 --- a/tools/testing/selftests/bpf/prog_tests/raw_tp_writable_reject_nbd_invalid.c +++ b/tools/testing/selftests/bpf/prog_tests/raw_tp_writable_reject_bad_access.c @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-2.0 #include -#include +#include "test_kmods/bpf_testmod.h" #include "bpf_util.h" -void test_raw_tp_writable_reject_nbd_invalid(void) +void test_raw_tp_writable_reject_bad_access(void) { __u32 duration = 0; char error[4096]; @@ -13,9 +13,9 @@ void test_raw_tp_writable_reject_nbd_invalid(void) const struct bpf_insn program[] = { /* r6 is our tp buffer */ BPF_LDX_MEM(BPF_DW, BPF_REG_6, BPF_REG_1, 0), - /* one byte beyond the end of the nbd_request struct */ + /* one byte beyond the end of the writable context struct */ BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_6, - sizeof(struct nbd_request)), + sizeof(struct bpf_testmod_test_writable_ctx)), BPF_EXIT_INSN(), }; @@ -32,7 +32,7 @@ void test_raw_tp_writable_reject_nbd_invalid(void) "failed: %d errno %d\n", bpf_fd, errno)) return; - tp_fd = bpf_raw_tracepoint_open("nbd_send_request", bpf_fd); + tp_fd = bpf_raw_tracepoint_open("bpf_testmod_test_writable_bare_tp", bpf_fd); if (CHECK(tp_fd >= 0, "bpf_raw_tracepoint_writable open", "erroneously succeeded\n")) goto out_bpffd;