Re: [PATCH bpf-next 7/7] selftests/bpf: Enable cpu v4 tests for RV64

From: Yonghong Song
Date: Wed Aug 23 2023 - 13:34:46 EST




On 8/23/23 4:10 PM, Pu Lehui wrote:
From: Pu Lehui <pulehui@xxxxxxxxxx>

Enable cpu v4 tests for RV64, and the relevant tests have passed.

Signed-off-by: Pu Lehui <pulehui@xxxxxxxxxx>

Thanks for working on this!

Acked-by: Yonghong Song <yonghong.song@xxxxxxxxx>

---
tools/testing/selftests/bpf/progs/test_ldsx_insn.c | 3 ++-
tools/testing/selftests/bpf/progs/verifier_bswap.c | 3 ++-
tools/testing/selftests/bpf/progs/verifier_gotol.c | 3 ++-
tools/testing/selftests/bpf/progs/verifier_ldsx.c | 3 ++-
tools/testing/selftests/bpf/progs/verifier_movsx.c | 3 ++-
tools/testing/selftests/bpf/progs/verifier_sdiv.c | 3 ++-
6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/bpf/progs/test_ldsx_insn.c b/tools/testing/selftests/bpf/progs/test_ldsx_insn.c
index 916d9435f12c..67c14ba1e87b 100644
--- a/tools/testing/selftests/bpf/progs/test_ldsx_insn.c
+++ b/tools/testing/selftests/bpf/progs/test_ldsx_insn.c
@@ -5,7 +5,8 @@
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
-#if (defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86)) && __clang_major__ >= 18
+#if (defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86) || \
+ (defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64)) && __clang_major__ >= 18
const volatile int skip = 0;
#else
const volatile int skip = 1;
[...]