Skip to content

Commit 95b1c5d

Browse files
Pu LehuiAlexei Starovoitov
authored andcommitted
selftests/bpf: Add description for running vmtest on RV64
Add description in tools/testing/selftests/bpf/README.rst for running vmtest on RV64. Signed-off-by: Pu Lehui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent b2bc9d5 commit 95b1c5d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

tools/testing/selftests/bpf/README.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,38 @@ In case of linker errors when running selftests, try using static linking:
8585
If you want to change pahole and llvm, you can change `PATH` environment
8686
variable in the beginning of script.
8787

88+
Running vmtest on RV64
89+
======================
90+
To speed up testing and avoid various dependency issues, it is recommended to
91+
run vmtest in a Docker container. Before running vmtest, we need to prepare
92+
Docker container and local rootfs image. The overall steps are as follows:
93+
94+
1. Create Docker container as shown in link [0].
95+
96+
2. Use mkrootfs_debian.sh script [1] to build local rootfs image:
97+
98+
.. code-block:: console
99+
100+
$ sudo ./mkrootfs_debian.sh --arch riscv64 --distro noble
101+
102+
3. Start Docker container [0] and run vmtest in the container:
103+
104+
.. code-block:: console
105+
106+
$ PLATFORM=riscv64 CROSS_COMPILE=riscv64-linux-gnu- \
107+
tools/testing/selftests/bpf/vmtest.sh \
108+
-l <path of local rootfs image> -- \
109+
./test_progs -d \
110+
\"$(cat tools/testing/selftests/bpf/DENYLIST.riscv64 \
111+
| cut -d'#' -f1 \
112+
| sed -e 's/^[[:space:]]*//' \
113+
-e 's/[[:space:]]*$//' \
114+
| tr -s '\n' ',' \
115+
)\"
116+
117+
Link: https://github.com/pulehui/riscv-bpf-vmtest.git [0]
118+
Link: https://github.com/libbpf/ci/blob/main/rootfs/mkrootfs_debian.sh [1]
119+
88120
Additional information about selftest failures are
89121
documented here.
90122

0 commit comments

Comments
 (0)