]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Use CAN_USE_LOAD_ACQ_STORE_REL when appropriate
authorPeilin Ye <yepeilin@google.com>
Wed, 7 May 2025 03:43:13 +0000 (03:43 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 9 May 2025 17:05:27 +0000 (10:05 -0700)
commit13fdecf3456e21f91a4403f989464edcc5d61c22
tree6bd97c61ed66ec9f1618d1c1105a019ec4cb84be
parentdb7a3822b5f474b09db0a776e91f17c8b7d32137
selftests/bpf: Use CAN_USE_LOAD_ACQ_STORE_REL when appropriate

Instead of open-coding the conditions, use
'#ifdef CAN_USE_LOAD_ACQ_STORE_REL' to guard the following tests:

  verifier_precision/bpf_load_acquire
  verifier_precision/bpf_store_release
  verifier_store_release/*

Note that, for the first two tests in verifier_precision.c, switching to
'#ifdef CAN_USE_LOAD_ACQ_STORE_REL' means also checking if
'__clang_major__ >= 18', which has already been guaranteed by the outer
'#if' check.

Acked-by: Björn Töpel <bjorn@kernel.org>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Tested-by: Björn Töpel <bjorn@rivosinc.com> # QEMU/RVA23
Signed-off-by: Peilin Ye <yepeilin@google.com>
Link: https://lore.kernel.org/r/45d7e025f6e390a8ff36f08fc51e31705ac896bd.1746588351.git.yepeilin@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_precision.c
tools/testing/selftests/bpf/progs/verifier_store_release.c