From: Amir Goldstein Date: Fri, 26 Jan 2018 07:59:06 +0000 (+0200) Subject: overlay/036: fix upper/lower dir mismatch X-Git-Tag: v2022.05.01~1672 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7aa1d4bcd4297335d6baa11c83a387f74923bce8;p=users%2Fhch%2Fxfstests-dev.git overlay/036: fix upper/lower dir mismatch Mount option index=on checks on mount that upper dir is not being reused with a different lower dir than the first lower dir it was mounted with. This behavior is verified by test overlay/037. In this test however, it is not desired to fail mount on mismatch of upper/lower, so use the matching upper/lower dirs in this test. The mismatch went unnoticed because the index=off mounts do not verify lower dir and the index=on mounts fails on EBUSY (dir in use by another live mount) before failing on ESTALE (upper/lower dir mismatch). Never the less, fix the mismatch, so a change in the kernel between the two sanity checks (EBUSY vs. ESTALE) won't break the test. Signed-off-by: Amir Goldstein Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/tests/overlay/036 b/tests/overlay/036 index e0c13ae88..e04aaeee4 100755 --- a/tests/overlay/036 +++ b/tests/overlay/036 @@ -90,7 +90,7 @@ _overlay_mount_dirs $lowerdir $upperdir $workdir \ # Try to mount another overlay with the same upperdir # with index=off - expect success -_overlay_mount_dirs $lowerdir2 $upperdir $workdir2 \ +_overlay_mount_dirs $lowerdir $upperdir $workdir2 \ overlay0 $SCRATCH_MNT -oindex=off && \ $UMOUNT_PROG $SCRATCH_MNT @@ -102,7 +102,7 @@ _overlay_mount_dirs $lowerdir2 $upperdir2 $workdir \ # Try to mount another overlay with the same upperdir # with index=on - expect EBUSY -_overlay_mount_dirs $lowerdir2 $upperdir $workdir2 \ +_overlay_mount_dirs $lowerdir $upperdir $workdir2 \ overlay2 $SCRATCH_MNT -oindex=on 2>&1 | _filter_busy_mount # Try to mount another overlay with the same workdir