selftests/ovl: fix detached layer mountinfo expectations
PATCH 1/1 selftests/ovl: fix detached layer mountinfo expectations
set_layers_via_detached_mount_fds was copied from the attached-fd test and still looks for /tmp paths. Detached open_tree() layers are recorded by d_path() as upperdir=/upper, workdir=/work, and lowerdir+=/ and datadir+=/ for each cloned directory. The test has failed since it was added.
--- .../filesystems/overlayfs/set_layers_via_fds.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c +9 -9
@@ -686,23 +686,23 @@ TEST_F(set_layers_via_fds, set_layers_via_detached_mount_fds)while (getline (&line, &len, f_mountinfo) !=-1 ) {char *haystack = line; -if (strstr (haystack,"workdir=/tmp/w" )) +if (strstr (haystack,"workdir=/work" )) layers_found[0 ] = true; -if (strstr (haystack,"upperdir=/tmp/u" )) +if (strstr (haystack,"upperdir=/upper" )) layers_found[1 ] = true; -if (strstr (haystack,"lowerdir+=/tmp/l1" )) +if (strstr (haystack,"lowerdir+=/" )) layers_found[2 ] = true; -if (strstr (haystack,"lowerdir+=/tmp/l2" )) +if (strstr (haystack,"lowerdir+=/" )) layers_found[3 ] = true; -if (strstr (haystack,"lowerdir+=/tmp/l3" )) +if (strstr (haystack,"lowerdir+=/" )) layers_found[4 ] = true; -if (strstr (haystack,"lowerdir+=/tmp/l4" )) +if (strstr (haystack,"lowerdir+=/" )) layers_found[5 ] = true; -if (strstr (haystack,"datadir+=/tmp/d1" )) +if (strstr (haystack,"datadir+=/" )) layers_found[6 ] = true; -if (strstr (haystack,"datadir+=/tmp/d2" )) +if (strstr (haystack,"datadir+=/" )) layers_found[7 ] = true; -if (strstr (haystack,"datadir+=/tmp/d3" )) +if (strstr (haystack,"datadir+=/" )) layers_found[8 ] = true; }free (line);
Signature · 1 line
2.55.0
Quoted 8 lines · Amir Goldstein
set_layers_via_detached_mount_fdswas copied from the attached-fd test and still looks for /tmp paths. Detachedopen_tree()layers are recorded byd_path()as upperdir=/upper, workdir=/work, and lowerdir+=/ and datadir+=/ for each cloned directory. The test has failed since it was added.[...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.fixes
[1/1] selftests/ovl: fix detached layer mountinfo expectations
https://git.kernel.org/vfs/vfs/c/8457ca071fab
Quoted 20 lines · Christian Brauner
Quoted 8 lines · Amir Goldstein
set_layers_via_detached_mount_fdswas copied from the attached-fd test and still looks for /tmp paths. Detachedopen_tree()layers are recorded byd_path()as upperdir=/upper, workdir=/work, and lowerdir+=/ and datadir+=/ for each cloned directory. The test has failed since it was added.[...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Quoted 9 lines
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.fixes[1/1] selftests/ovl: fix detached layer mountinfo expectations
https://git.kernel.org/vfs/vfs/c/8457ca071fab
Sorry, I forgot to say that I already took this patch to my tree.
This patch is already on ovl-fixes in linux-next of today.
Thanks,
Amir.
Christian Brauner
maintainerQuoted 1 line
This patch is already on ovl-fixes in linux-next of today.
But the fix is already in mainline. I think we got our wires crossed.