public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "zhangyi (F)" <yi.zhang@huawei.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
	fstests <fstests@vger.kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>, Eryu Guan <eguan@redhat.com>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Miao Xie <miaoxie@huawei.com>
Subject: Re: [PATCH for xfstests 1/4] overlay: add filesystem check helper
Date: Thu, 14 Dec 2017 20:40:05 +0800	[thread overview]
Message-ID: <0860e6d0-cbdb-bc0d-33e3-ba0f800bdbf2@huawei.com> (raw)
In-Reply-To: <CAOQ4uximBJqFpsBMLQMWTJpJsoigBnYemtb7z1h-3PPWyjrkXA@mail.gmail.com>

On 2017/12/14 17:05, Amir Goldstein Write:
> On Thu, Dec 14, 2017 at 8:48 AM, zhangyi (F) <yi.zhang@huawei.com> wrote:
>> Add filesystem check helpers for the upcoming fsck.overlay utility,
>> and hook them to _check_test_fs and _check_scratch_fs. This helper
>> works only if fsck.overlay exists.
>>
>> [ _check_test_fs/_check_scratch_fs part picked from Amir's patch, thanks ]
>>
>> Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
>> ---
>>  common/config  |  1 +
>>  common/overlay | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  common/rc      |  4 +--
>>  3 files changed, 81 insertions(+), 2 deletions(-)
>>
[..]
>> +_overlay_check_dirs()
>> +{
>> +       local lowerdir=$1
>> +       local upperdir=$2
>> +       local workdir=$3
>> +       local err=0
>> +
>> +       _overlay_fsck_dirs $FSCK_OPTIONS $* >>$tmp.fsck 2>&1
>> +       if [ $? -ne 0 ]; then
>> +               _log_err "_overlay_check_fs: overlayfs on $lowerdir,$upperdir,$workdir is inconsistent"
>> +               echo "*** fsck.overlay output ***"      >>$seqres.full
>> +               cat $tmp.fsck                           >>$seqres.full
>> +               echo "*** end fsck.overlay output"      >>$seqres.full
>> +               echo "*** mount output ***"             >>$seqres.full
>> +               _mount                                  >>$seqres.full
>> +               echo "*** end mount output"             >>$seqres.full
>> +               err=1
>> +       fi
> 
> Maybe the tmp.fsck output reporting to seqres.full should be done in
> _overlay_fsck_dirs?
> I think this output could be useful for understanding fsck tests failure.

If we do these in _overlay_fsck_dirs, we can get output only when fsck return
fail, but this output maybe useful for understanding fsck.overlay even through
fsck pass when we test it. So I call _overlay_fsck_dirs and put output to
seqres.full alone in each test case now, see 0002-0004 patches.
But it's also fine to put these into _overlay_fsck_dirs.

[..]
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -2507,7 +2507,7 @@ _check_test_fs()
>>         # no way to check consistency for GlusterFS
>>         ;;
>>      overlay)
>> -       # no way to check consistency for overlay
>> +       _check_overlay_test_fs
>>         ;;
>>      pvfs2)
>>         ;;
>> @@ -2562,7 +2562,7 @@ _check_scratch_fs()
>>         # no way to check consistency for GlusterFS
>>         ;;
>>      overlay)
>> -       # no way to check consistency for overlay
>> +       _check_overlay_test_fs
> 
> _check_overlay_scratch_fs
> 

will fix

Thanks,
Yi.


  reply	other threads:[~2017-12-14 12:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14  6:48 [PATCH for xfstests 0/4] overlay: add fsck.overlay basic tests zhangyi (F)
2017-12-14  6:48 ` [PATCH for xfstests 1/4] overlay: add filesystem check helper zhangyi (F)
2017-12-14  9:05   ` Amir Goldstein
2017-12-14 12:40     ` zhangyi (F) [this message]
2017-12-14 13:14       ` Amir Goldstein
2017-12-14  6:48 ` [PATCH for xfstests 2/4] overlay: add fsck.overlay whiteout test zhangyi (F)
2017-12-14 13:13   ` Amir Goldstein
2017-12-15  5:35     ` zhangyi (F)
2017-12-14  6:48 ` [PATCH for xfstests 3/4] overlay: add fsck.overlay opaque directory test zhangyi (F)
2017-12-14 13:25   ` Amir Goldstein
2017-12-14  6:48 ` [PATCH for xfstests 4/4] overlay: add fsck.overlay redirect " zhangyi (F)
2017-12-14 13:44   ` Amir Goldstein
2017-12-15  6:42     ` zhangyi (F)
2017-12-15  7:23       ` Amir Goldstein
2017-12-15  8:57         ` 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=0860e6d0-cbdb-bc0d-33e3-ba0f800bdbf2@huawei.com \
    --to=yi.zhang@huawei.com \
    --cc=amir73il@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miaoxie@huawei.com \
    --cc=miklos@szeredi.hu \
    /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