From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>
Cc: <andrii@kernel.org>, <kernel-team@fb.com>, Kui-Feng Lee <kuifeng@fb.com>
Subject: [PATCH bpf-next 3/3] selftests/bpf: switch fexit_stress to bpf_link_create() API
Date: Wed, 20 Apr 2022 20:39:45 -0700 [thread overview]
Message-ID: <20220421033945.3602803-4-andrii@kernel.org> (raw)
In-Reply-To: <20220421033945.3602803-1-andrii@kernel.org>
Use bpf_link_create() API in fexit_stress test to attach FEXIT programs.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
tools/testing/selftests/bpf/prog_tests/fexit_stress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/fexit_stress.c b/tools/testing/selftests/bpf/prog_tests/fexit_stress.c
index 3ee2107bbf7a..fe1f0f26ea14 100644
--- a/tools/testing/selftests/bpf/prog_tests/fexit_stress.c
+++ b/tools/testing/selftests/bpf/prog_tests/fexit_stress.c
@@ -53,7 +53,7 @@ void test_fexit_stress(void)
&trace_opts);
if (!ASSERT_GE(fexit_fd[i], 0, "fexit load"))
goto out;
- link_fd[i] = bpf_raw_tracepoint_open(NULL, fexit_fd[i]);
+ link_fd[i] = bpf_link_create(fexit_fd[i], 0, BPF_TRACE_FEXIT, NULL);
if (!ASSERT_GE(link_fd[i], 0, "fexit attach"))
goto out;
}
--
2.30.2
next prev parent reply other threads:[~2022-04-21 3:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 3:39 [PATCH bpf-next 0/3] LINK_CREATE support for fentry/tp_btf/lsm attachments Andrii Nakryiko
2022-04-21 3:39 ` [PATCH bpf-next 1/3] bpf: allow attach TRACING programs through LINK_CREATE command Andrii Nakryiko
2022-04-22 20:55 ` Kui-Feng Lee
2022-04-21 3:39 ` [PATCH bpf-next 2/3] libbpf: teach bpf_link_create() to fallback to bpf_raw_tracepoint_open() Andrii Nakryiko
2022-04-22 20:57 ` Kui-Feng Lee
2022-04-21 3:39 ` Andrii Nakryiko [this message]
2022-04-22 21:02 ` [PATCH bpf-next 3/3] selftests/bpf: switch fexit_stress to bpf_link_create() API Kui-Feng Lee
2022-04-22 22:40 ` [PATCH bpf-next 0/3] LINK_CREATE support for fentry/tp_btf/lsm attachments patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220421033945.3602803-4-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=kuifeng@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox