[PATCH] testing/bpf: Update test names for xchg and cmpxchg

Subsystems: bpf [general] (safe dynamic programs and tools), bpf [selftests] (test runners & infrastructure), kernel selftest framework, the rest

STALE1772d LANDED

Landed in mainline as 8b4ff5f8bb12 on 2021-12-02.

2 messages, 2 authors, 2021-12-02 · open the first message on its own page

[PATCH] testing/bpf: Update test names for xchg and cmpxchg

From: "Paul E. McKenney" <paulmck@kernel.org>
Date: 2021-12-01 00:52:32

The test_cmpxchg() and test_xchg() functions say "test_run add".
Therefore, make them say "test_run cmpxchg" and "test_run xchg",
respectively.

Cc: Shuah Khan <shuah@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <redacted>
Cc: Song Liu <redacted>
Cc: Yonghong Song <redacted>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: <redacted>
Cc: <redacted>
Cc: <redacted>
Cc: <redacted>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
diff --git a/tools/testing/selftests/bpf/prog_tests/atomics.c b/tools/testing/selftests/bpf/prog_tests/atomics.c
index 0f9525293881b..86b7d5d84eec4 100644
--- a/tools/testing/selftests/bpf/prog_tests/atomics.c
+++ b/tools/testing/selftests/bpf/prog_tests/atomics.c
@@ -167,7 +167,7 @@ static void test_cmpxchg(struct atomics_lskel *skel)
 	prog_fd = skel->progs.cmpxchg.prog_fd;
 	err = bpf_prog_test_run(prog_fd, 1, NULL, 0,
 				NULL, NULL, &retval, &duration);
-	if (CHECK(err || retval, "test_run add",
+	if (CHECK(err || retval, "test_run cmpxchg",
 		  "err %d errno %d retval %d duration %d\n", err, errno, retval, duration))
 		goto cleanup;
 
@@ -196,7 +196,7 @@ static void test_xchg(struct atomics_lskel *skel)
 	prog_fd = skel->progs.xchg.prog_fd;
 	err = bpf_prog_test_run(prog_fd, 1, NULL, 0,
 				NULL, NULL, &retval, &duration);
-	if (CHECK(err || retval, "test_run add",
+	if (CHECK(err || retval, "test_run xchg",
 		  "err %d errno %d retval %d duration %d\n", err, errno, retval, duration))
 		goto cleanup;
 

Re: [PATCH] testing/bpf: Update test names for xchg and cmpxchg

From: Andrii Nakryiko <hidden>
Date: 2021-12-02 20:14:07

On Tue, Nov 30, 2021 at 4:50 PM Paul E. McKenney [off-list ref] wrote:
The test_cmpxchg() and test_xchg() functions say "test_run add".
Therefore, make them say "test_run cmpxchg" and "test_run xchg",
respectively.

Cc: Shuah Khan <shuah@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <redacted>
Cc: Song Liu <redacted>
Cc: Yonghong Song <redacted>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: <redacted>
Cc: <redacted>
Cc: <redacted>
Cc: <redacted>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
fixed up "testing/bpf" to more commonly used "selftests/bpf" and
pushed to bpf-next, thanks.

quoted hunk
diff --git a/tools/testing/selftests/bpf/prog_tests/atomics.c b/tools/testing/selftests/bpf/prog_tests/atomics.c
index 0f9525293881b..86b7d5d84eec4 100644
--- a/tools/testing/selftests/bpf/prog_tests/atomics.c
+++ b/tools/testing/selftests/bpf/prog_tests/atomics.c
@@ -167,7 +167,7 @@ static void test_cmpxchg(struct atomics_lskel *skel)
        prog_fd = skel->progs.cmpxchg.prog_fd;
        err = bpf_prog_test_run(prog_fd, 1, NULL, 0,
                                NULL, NULL, &retval, &duration);
-       if (CHECK(err || retval, "test_run add",
+       if (CHECK(err || retval, "test_run cmpxchg",
                  "err %d errno %d retval %d duration %d\n", err, errno, retval, duration))
                goto cleanup;
@@ -196,7 +196,7 @@ static void test_xchg(struct atomics_lskel *skel)
        prog_fd = skel->progs.xchg.prog_fd;
        err = bpf_prog_test_run(prog_fd, 1, NULL, 0,
                                NULL, NULL, &retval, &duration);
-       if (CHECK(err || retval, "test_run add",
+       if (CHECK(err || retval, "test_run xchg",
                  "err %d errno %d retval %d duration %d\n", err, errno, retval, duration))
                goto cleanup;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help