* [PATCH bpf-next] selftests/bpf: Enable tests for atomics with cpuv4
@ 2024-04-10 15:33 Yonghong Song
2024-04-11 3:00 ` patchwork-bot+netdevbpf
2024-04-11 3:01 ` Alexei Starovoitov
0 siblings, 2 replies; 3+ messages in thread
From: Yonghong Song @ 2024-04-10 15:33 UTC (permalink / raw)
To: bpf
Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann, kernel-team,
Martin KaFai Lau
When looking at Alexei's patch ([1]) which added tests for atomics,
I noticed that the tests will be skipped with cpuv4. For example,
with latest llvm19, I see:
[root@arch-fb-vm1 bpf]# ./test_progs -t arena_atomics
#3/1 arena_atomics/add:OK
...
#3/7 arena_atomics/xchg:OK
#3 arena_atomics:OK
Summary: 1/7 PASSED, 0 SKIPPED, 0 FAILED
[root@arch-fb-vm1 bpf]# ./test_progs-cpuv4 -t arena_atomics
#3 arena_atomics:SKIP
Summary: 1/0 PASSED, 1 SKIPPED, 0 FAILED
[root@arch-fb-vm1 bpf]#
It is perfectly fine to enable atomics-related tests for cpuv4.
With this patch, I have
[root@arch-fb-vm1 bpf]# ./test_progs-cpuv4 -t arena_atomics
#3/1 arena_atomics/add:OK
...
#3/7 arena_atomics/xchg:OK
#3 arena_atomics:OK
Summary: 1/7 PASSED, 0 SKIPPED, 0 FAILED
[1] https://lore.kernel.org/r/20240405231134.17274-2-alexei.starovoitov@gmail.com
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
---
tools/testing/selftests/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index eea5b8deaaf0..edc73f8f5aef 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -658,7 +658,7 @@ $(eval $(call DEFINE_TEST_RUNNER,test_progs,no_alu32))
# Define test_progs-cpuv4 test runner.
ifneq ($(CLANG_CPUV4),)
TRUNNER_BPF_BUILD_RULE := CLANG_CPUV4_BPF_BUILD_RULE
-TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(CLANG_CFLAGS)
+TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(CLANG_CFLAGS) -DENABLE_ATOMICS_TESTS
$(eval $(call DEFINE_TEST_RUNNER,test_progs,cpuv4))
endif
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: Enable tests for atomics with cpuv4
2024-04-10 15:33 [PATCH bpf-next] selftests/bpf: Enable tests for atomics with cpuv4 Yonghong Song
@ 2024-04-11 3:00 ` patchwork-bot+netdevbpf
2024-04-11 3:01 ` Alexei Starovoitov
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-11 3:00 UTC (permalink / raw)
To: Yonghong Song; +Cc: bpf, ast, andrii, daniel, kernel-team, martin.lau
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Wed, 10 Apr 2024 08:33:26 -0700 you wrote:
> When looking at Alexei's patch ([1]) which added tests for atomics,
> I noticed that the tests will be skipped with cpuv4. For example,
> with latest llvm19, I see:
> [root@arch-fb-vm1 bpf]# ./test_progs -t arena_atomics
> #3/1 arena_atomics/add:OK
> ...
> #3/7 arena_atomics/xchg:OK
> #3 arena_atomics:OK
> Summary: 1/7 PASSED, 0 SKIPPED, 0 FAILED
> [root@arch-fb-vm1 bpf]# ./test_progs-cpuv4 -t arena_atomics
> #3 arena_atomics:SKIP
> Summary: 1/0 PASSED, 1 SKIPPED, 0 FAILED
> [root@arch-fb-vm1 bpf]#
>
> [...]
Here is the summary with links:
- [bpf-next] selftests/bpf: Enable tests for atomics with cpuv4
https://git.kernel.org/bpf/bpf-next/c/ffa6b26b4d8a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next] selftests/bpf: Enable tests for atomics with cpuv4
2024-04-10 15:33 [PATCH bpf-next] selftests/bpf: Enable tests for atomics with cpuv4 Yonghong Song
2024-04-11 3:00 ` patchwork-bot+netdevbpf
@ 2024-04-11 3:01 ` Alexei Starovoitov
1 sibling, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2024-04-11 3:01 UTC (permalink / raw)
To: Yonghong Song
Cc: bpf, Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
Kernel Team, Martin KaFai Lau
On Wed, Apr 10, 2024 at 8:33 AM Yonghong Song <yonghong.song@linux.dev> wrote:
>
> When looking at Alexei's patch ([1]) which added tests for atomics,
> I noticed that the tests will be skipped with cpuv4. For example,
> with latest llvm19, I see:
> [root@arch-fb-vm1 bpf]# ./test_progs -t arena_atomics
> #3/1 arena_atomics/add:OK
> ...
> #3/7 arena_atomics/xchg:OK
> #3 arena_atomics:OK
> Summary: 1/7 PASSED, 0 SKIPPED, 0 FAILED
> [root@arch-fb-vm1 bpf]# ./test_progs-cpuv4 -t arena_atomics
> #3 arena_atomics:SKIP
> Summary: 1/0 PASSED, 1 SKIPPED, 0 FAILED
> [root@arch-fb-vm1 bpf]#
>
> It is perfectly fine to enable atomics-related tests for cpuv4.
> With this patch, I have
> [root@arch-fb-vm1 bpf]# ./test_progs-cpuv4 -t arena_atomics
> #3/1 arena_atomics/add:OK
> ...
> #3/7 arena_atomics/xchg:OK
> #3 arena_atomics:OK
> Summary: 1/7 PASSED, 0 SKIPPED, 0 FAILED
>
> [1] https://lore.kernel.org/r/20240405231134.17274-2-alexei.starovoitov@gmail.com
>
> Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
> ---
> tools/testing/selftests/bpf/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index eea5b8deaaf0..edc73f8f5aef 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -658,7 +658,7 @@ $(eval $(call DEFINE_TEST_RUNNER,test_progs,no_alu32))
> # Define test_progs-cpuv4 test runner.
> ifneq ($(CLANG_CPUV4),)
> TRUNNER_BPF_BUILD_RULE := CLANG_CPUV4_BPF_BUILD_RULE
> -TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(CLANG_CFLAGS)
> +TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(CLANG_CFLAGS) -DENABLE_ATOMICS_TESTS
I noticed that as well and added to my todo list to follow up.
Thank you for fixing it sooner :)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-11 3:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 15:33 [PATCH bpf-next] selftests/bpf: Enable tests for atomics with cpuv4 Yonghong Song
2024-04-11 3:00 ` patchwork-bot+netdevbpf
2024-04-11 3:01 ` Alexei Starovoitov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox