[PATCH bpf-next 0/5] Support local vmtest for riscv64

Pu Lehui
2024-03-28T12:48:04Z

Patch 1 is to enable cross platform testing for local vmtest. The
remaining patch adds local vmtest support for riscv64. It relies on
commit [0] [1] for better regression.

We can now perform cross platform testing for riscv64 bpf using the
following command:

PLATFORM=riscv64 CROSS_COMPILE=riscv64-linux-gnu- \
tools/testing/selftests/bpf/vmtest.sh -- \
./test_progs -d \
\"$(cat tools/testing/selftests/bpf/DENYLIST.riscv64 \
| cut -d'#' -f1 \
| sed -e 's/^[[:space:]]*//' \
-e 's/[[:space:]]*$//' \
| tr -s '\n' ','\
)\"

The test platform is x86_64 architecture, and the versions of relevant
components are as follows:
QEMU: 8.2.0
CLANG: 17.0.6 (align to BPF CI)
OpenSBI: 1.3.1 (default by QEMU)
ROOTFS: ubuntu jammy (generated by [2])

Link: https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?id=ea6873118493 [0]
Link: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=443574b033876c85 [1]
Link: https://github.com/libbpf/ci/blob/main/rootfs/mkrootfs_debian.sh [2]

Pu Lehui (5):
selftests/bpf: Enable cross platform testing for local vmtest
riscv, bpf: Relax restrictions on Zbb instructions
selftests/bpf: Add config.riscv64
selftests/bpf: Add DENYLIST.riscv64
selftests/bpf: Add riscv64 configurations to local vmtest

arch/riscv/net/bpf_jit.h | 2 +-
tools/testing/selftests/bpf/DENYLIST.riscv64 | 5 ++
tools/testing/selftests/bpf/config.riscv64 | 85 ++++++++++++++++++++
tools/testing/selftests/bpf/vmtest.sh | 48 ++++++++---
4 files changed, 127 insertions(+), 13 deletions(-)
create mode 100644 tools/testing/selftests/bpf/DENYLIST.riscv64
create mode 100644 tools/testing/selftests/bpf/config.riscv64

--
2.34.1