[PATCH bpf-next 3/5] selftests/bpf: Use /tmp for temporary file in d_path
Pu Lehui
pulehui at huaweicloud.com
Tue Sep 29 01:39:22 PDT 2026
From: Pu Lehui <pulehui at huawei.com>
When running selftests via vmtest.sh on riscv64, the d_path test fails.
The failure occurs because the rootfs created by libbpf/ci [0] does not
mount /dev/shm, causing temporary file creation under /dev/shm to fail.
Let's switch to using /tmp instead to fix this issue.
Note that older rootfs images did not mount tmpfs on /tmp, writing
temporary files directly into the image. This has been fixed in [1] for
newly built images.
Link: https://github.com/libbpf/ci/tree/main/rootfs [0]
Link: https://github.com/libbpf/ci/commit/92caeba5960c [1]
Signed-off-by: Pu Lehui <pulehui at huawei.com>
---
tools/testing/selftests/bpf/prog_tests/d_path.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/d_path.c b/tools/testing/selftests/bpf/prog_tests/d_path.c
index 1a2a2f1abf03..b72825d1edee 100644
--- a/tools/testing/selftests/bpf/prog_tests/d_path.c
+++ b/tools/testing/selftests/bpf/prog_tests/d_path.c
@@ -220,7 +220,7 @@ static void test_d_path_check_types(void)
static void test_d_path_mem_access(void)
{
int localfd = -1;
- char path_template[] = "/dev/shm/d_path_loadgen.XXXXXX";
+ char path_template[] = "/tmp/d_path_loadgen.XXXXXX";
struct test_d_path__bss *bss;
struct test_d_path *skel;
--
2.34.1
More information about the linux-riscv
mailing list