[PATCH v2 0/2] selftests/bpf: Fix d_path check_mem_access and drop CHECK()

From: Jonathan Bastari Thamrin via B4 Relay

Date: Thu Nov 05 2026 - 22:38:26 EST


Patch 1 replaces the deprecated CHECK() calls with ASSERT_*().

Patch 2 fixes check_mem_access, which creates a temp file in
/dev/shm that isn't mounted under vmtest.sh in local runs. This
causes mkstemp() to fail with ENOENT. mkstemp() is replaced with
memfd_create() as it gives a shmem-backed file with no mount
needed while still reaching vfs_fallocate.

Changes in v2:
- Added patch 1 converting CHECK() to ASSERT_*() (Andrii)
- Link to v1: https://lore.kernel.org/bpf/20261102-d-path-memfd-v1-1-692a5664b36d@xxxxxxxxx/

---
Jonathan Bastari Thamrin (2):
selftests/bpf: Replace d_path CHECK() with ASSERT_*()
selftests/bpf: Use memfd_create instead of mkstemp in d_path

tools/testing/selftests/bpf/prog_tests/d_path.c | 74 +++++++++----------------
1 file changed, 26 insertions(+), 48 deletions(-)
---
base-commit: 87eddc739d20b466881e4c5cdd2ddf465a5debfd
change-id: 20261106-dpath-memfd-ae568d05895f

Best regards,
--
Jonathan Bastari Thamrin <thamrinjonathan@xxxxxxxxx>