Skip to content

Commit b2bc9d5

Browse files
Pu LehuiAlexei Starovoitov
authored andcommitted
selftests/bpf: Add riscv64 configurations to local vmtest
Add riscv64 configurations to local vmtest. We can now perform cross platform testing for riscv64 bpf using the following command: PLATFORM=riscv64 CROSS_COMPILE=riscv64-linux-gnu- vmtest.sh \ -l ./libbpf-vmtest-rootfs-2024.08.30-noble-riscv64.tar.zst -- \ ./test_progs -d \ \"$(cat tools/testing/selftests/bpf/DENYLIST.riscv64 \ | cut -d'#' -f1 \ | sed -e 's/^[[:space:]]*//' \ -e 's/[[:space:]]*$//' \ | tr -s '\n' ','\ )\" Tested-by: Eduard Zingerman <[email protected]> Signed-off-by: Pu Lehui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent c402cb8 commit b2bc9d5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/testing/selftests/bpf/vmtest.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ aarch64)
3434
BZIMAGE="arch/arm64/boot/Image"
3535
ARCH="arm64"
3636
;;
37+
riscv64)
38+
# required qemu version v7.2.0+
39+
QEMU_BINARY=qemu-system-riscv64
40+
QEMU_CONSOLE="ttyS0,115200"
41+
HOST_FLAGS=(-M virt -cpu host -enable-kvm -smp 8)
42+
CROSS_FLAGS=(-M virt -cpu rv64,sscofpmf=true -smp 8)
43+
BZIMAGE="arch/riscv/boot/Image"
44+
ARCH="riscv"
45+
;;
3746
*)
3847
echo "Unsupported architecture"
3948
exit 1

0 commit comments

Comments
 (0)