[PATCH bpf-next 2/2] selftests/bpf: Enable inline bpf_kptr_xchg() test for RV64

Pu Lehui pulehui at huaweicloud.com
Tue Jan 30 04:46:59 PST 2024


From: Pu Lehui <pulehui at huawei.com>

Enable inline bpf_kptr_xchg() test for RV64, and the test have passed as
show below:

Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Pu Lehui <pulehui at huawei.com>
---
 tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c b/tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c
index 15144943e88b..7def158da9eb 100644
--- a/tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c
+++ b/tools/testing/selftests/bpf/prog_tests/kptr_xchg_inline.c
@@ -13,7 +13,8 @@ void test_kptr_xchg_inline(void)
 	unsigned int cnt;
 	int err;
 
-#if !(defined(__x86_64__) || defined(__aarch64__))
+#if !(defined(__x86_64__) || defined(__aarch64__) || \
+      (defined(__riscv) && __riscv_xlen == 64))
 	test__skip();
 	return;
 #endif
-- 
2.34.1




More information about the linux-riscv mailing list