From: "zhangyi (F)" <yi.zhang@huawei.com>
To: linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Cc: miklos@szeredi.hu, amir73il@gmail.com, eguan@redhat.com,
yi.zhang@huawei.com, miaoxie@huawei.com, yangerkun@huawei.com
Subject: [PATCH v3 6/7] overlay/010: fix fs check failure
Date: Fri, 12 Jan 2018 20:05:32 +0800 [thread overview]
Message-ID: <20180112120533.6099-7-yi.zhang@huawei.com> (raw)
In-Reply-To: <20180112120533.6099-1-yi.zhang@huawei.com>
This test use ovl_lower.1/ovl_lower.2 and ovl_upper in scratch
filesystem as underlying directories of overlay filesystem, but
_check_overlay_scratch_fs() only check ovl_lower and ovl_upper
directories. So whiteout "testdir" in ovl_upper becomes an orphan
whiteout, which will lead to fsck.overlay check failure.
This patch change to invoke _overlay_check_dirs() to check real
test dirs instead of pre-defined common dirs.
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
---
tests/overlay/010 | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/overlay/010 b/tests/overlay/010
index f55ebec..d6b7180 100755
--- a/tests/overlay/010
+++ b/tests/overlay/010
@@ -48,17 +48,17 @@ rm -f $seqres.full
# real QA test starts here
_supported_fs overlay
_supported_os Linux
-_require_scratch
+_require_scratch_nocheck
# Remove all files from previous tests
_scratch_mkfs
# Need two lower dirs in this test, and we mount overlay ourselves,
# create upper and workdir as well
-lowerdir1=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER.1
-lowerdir2=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER.2
-upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER
-workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK
+lowerdir1=$OVL_BASE_SCRATCH_MNT/lower1
+lowerdir2=$OVL_BASE_SCRATCH_MNT/lower2
+upperdir=$OVL_BASE_SCRATCH_MNT/upper
+workdir=$OVL_BASE_SCRATCH_MNT/work
mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir
# One lowerdir contains test dir and test files, the other contains whiteout
@@ -70,6 +70,7 @@ mknod $lowerdir2/testdir/a c 0 0
_overlay_scratch_mount_dirs "$lowerdir2:$lowerdir1" $upperdir $workdir
rm -rf $SCRATCH_MNT/testdir
+_overlay_check_dirs "$lowerdir2:$lowerdir1" $upperdir $workdir
# success, all done
echo "Silence is golden"
status=0
--
2.9.5
next prev parent reply other threads:[~2018-01-12 11:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 12:05 [PATCH v3 0/7] overlay: add fsck.overlay basic tests zhangyi (F)
2018-01-12 12:05 ` [PATCH v3 1/7] overlay: add filesystem check helper zhangyi (F)
2018-01-12 12:05 ` [PATCH v3 2/7] overlay: add fsck.overlay whiteout test zhangyi (F)
2018-01-12 20:58 ` Amir Goldstein
2018-01-12 12:05 ` [PATCH v3 3/7] overlay: add fsck.overlay redirect directory test zhangyi (F)
2018-01-12 21:32 ` Amir Goldstein
2018-01-12 12:05 ` [PATCH v3 4/7] overlay: add fsck.overlay impure xattr test zhangyi (F)
2018-01-12 20:52 ` Amir Goldstein
2018-01-12 12:05 ` [PATCH v3 5/7] overlay/003: fix fs check failure zhangyi (F)
2018-01-12 19:12 ` Amir Goldstein
2018-01-12 12:05 ` zhangyi (F) [this message]
2018-01-12 19:10 ` [PATCH v3 6/7] overlay/010: " Amir Goldstein
2018-01-12 12:05 ` [PATCH v3 7/7] overlay/019: " zhangyi (F)
2018-01-12 19:10 ` Amir Goldstein
2018-01-12 19:19 ` [PATCH v3 0/7] overlay: add fsck.overlay basic tests Amir Goldstein
2018-01-15 4:11 ` zhangyi (F)
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=20180112120533.6099-7-yi.zhang@huawei.com \
--to=yi.zhang@huawei.com \
--cc=amir73il@gmail.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=miklos@szeredi.hu \
--cc=yangerkun@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