diff options
| author | 2026-09-17 15:27:06 +0530 | |
|---|---|---|
| committer | 2026-09-25 13:01:31 +0200 | |
| commit | 26915b4664906b627a8210620c7d49d547cbab49 (patch) | |
| tree | b88441395b3f8da51a27774a12f816f92581463e /scripts/Makefile.thinlto | |
| parent | selftests/filesystems/openat2: fix O_LARGEFILE definitions for non-arm64 architectures (diff) | |
selftests/filesystems/openat2: make /tmp a mountpoint inside private namespace
In resolve_test.c, the test unshares the mount namespace and attempts to
make /tmp private via:
mount("", "/tmp", "", MS_PRIVATE, "")
This fails with EINVAL on environments where /tmp is not already a
separate mount point (e.g. if /tmp is just a standard directory on the
root filesystem /). Furthermore, the resolve_no_xdev test relies on
crossing into /tmp to verify RESOLVE_NO_XDEV and trigger an -EXDEV
error. If /tmp is not a mount point, resolving /tmp never crosses a
mount boundary, leading to a test failure.
Fix this by:
1. Making the entire root directory recursively private (MS_PRIVATE |
MS_REC) after unsharing the mount namespace.
2. Performing a self-bind-mount of /tmp on /tmp inside the isolated
private mount namespace, which guarantees that /tmp is a separate
mount point and that resolving /tmp will cross a mount boundary as
expected by the test.
Signed-off-by: Disha Goel <disgoel@linux.ibm.com>
Link: https://patch.msgid.link/20260917095707.16986-2-disgoel@linux.ibm.com
Tested-by: andy_gao <andy23320@yahoo.com>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
