From: Amir Goldstein <amir73il@gmail.com>
To: Eryu Guan <eguan@redhat.com>
Cc: zhangyi <yi.zhang@huawei.com>, Miklos Szeredi <miklos@szeredi.hu>,
linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH 2/4] overlay/036: fix upper/lower dir mismatch
Date: Fri, 26 Jan 2018 09:59:06 +0200 [thread overview]
Message-ID: <1516953548-15679-3-git-send-email-amir73il@gmail.com> (raw)
In-Reply-To: <1516953548-15679-1-git-send-email-amir73il@gmail.com>
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 <amir73il@gmail.com>
---
tests/overlay/036 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/overlay/036 b/tests/overlay/036
index e0c13ae..e04aaee 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
--
2.7.4
next prev parent reply other threads:[~2018-01-26 7:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 7:59 [PATCH 0/4] Assorted overlay test fixes Amir Goldstein
2018-01-26 7:59 ` [PATCH 1/4] ovelray: drop explicit use of OVERLAY_MOUNT_OPTIONS Amir Goldstein
2018-01-26 7:59 ` Amir Goldstein [this message]
2018-01-26 7:59 ` [PATCH 3/4] overlay: consider index dir with whiteouts clean Amir Goldstein
2018-01-26 7:59 ` [PATCH 4/4] overlay/017: require and enable redirect_dir Amir Goldstein
2018-01-29 8:10 ` Eryu Guan
2018-01-29 9:25 ` Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516953548-15679-3-git-send-email-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=yi.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox