fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: Murphy Zhou <jencce.kernel@gmail.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/175, generic/176: cleanup testdir before exit
Date: Wed, 22 Jul 2020 13:16:02 +0800	[thread overview]
Message-ID: <20200722051602.GA2937@dhcp-12-102.nay.redhat.com> (raw)
In-Reply-To: <20200722031131.amr6qntxtihjcuzt@xzhoux.usersys.redhat.com>

On Wed, Jul 22, 2020 at 11:11:31AM +0800, Murphy Zhou wrote:
> On Fri, Jul 17, 2020 at 01:58:53PM +0800, Zorro Lang wrote:
> > On Fri, Jul 17, 2020 at 12:40:17PM +0800, Murphy Zhou wrote:
> > > Usually the _mkfs helper will cleanup these directories at the
> > > beginning of testcase. However, when testing on NFS, the cleanup
> > > could be very slow and it is confusing that: We have already
> > 
> > The _scratch_mkfs logic for NFS is:
> >   [ -n "$SCRATCH_MNT" ] || return 1
> >   _scratch_mount
> >   rm -rf $SCRATCH_MNT/*
> >   _scratch_unmount
> > 
> > If you feel NFS is 'very slow', and isn't normal, you can check how
> > NFS is dealing with the reflink file of g/175.
> > 
> > > started to run generic/176 but we get stuck in _mkfs, cleaning
> > > up files left by the previous testcase generic/175.
> > 
> > Hmm... that makes more sense than above reason, although we generally
> > don't cleanup SCRATCH_MNT/* at the end of a case. Due to if you need to
> > cleanup SCRATCH_MNT/* for NFS, why only these 2 cases need to do that?
> > We might need a better reason/comment to explain, e.g. it cover a issue
> > of NFS?
> > 
> > BTW, the cleanup operation can be in _cleanup() function, likes:
> >   [ -d "$testdir" ] && rm -rf $testdir
> > 
> > Thanks,
> > Zorro
> > 
> > > 
> > > To be clear, cleanup testdir before exit. Also, deleting files
> > > should be part of the stress test.
> 
> These 2 lines are the real reasons for adding this.

Yeah, I see. I mean if for this reason, too lots of cases need to do
'rm -rf $SCRATCH_MNT/*' at the end, due to most of them leave something
in $SCRATCH_MNT/ , and will be cleaned by next _scratch_mkfs*, especially
for un-local filesystem(e.g. NFS, CIFS, glusterfs ...). They all make no
sense.

If only cleanup $SCRATCH_MNT/* in g/175 and g/176, the reason is better to be
'cover a known issue' when cleanup $SCRATCH_MNT in g/175 and g/176. That's
my personal review point :)

Thanks,
Zorro



> 
> Thanks!
> 
> > > 
> > > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> > > ---
> > >  tests/generic/175 | 1 +
> > >  tests/generic/176 | 1 +
> > >  2 files changed, 2 insertions(+)
> > > 
> > > diff --git a/tests/generic/175 b/tests/generic/175
> > > index 79e5b3d6..bd966a28 100755
> > > --- a/tests/generic/175
> > > +++ b/tests/generic/175
> > > @@ -61,6 +61,7 @@ bytes=$((blks * blksz))
> > >  echo "reflinking $blks blocks, $bytes bytes" >> "$seqres.full"
> > >  _reflink_range "$testdir/file1" 0 "$testdir/file2" 0 $bytes >> "$seqres.full"
> > >  
> > > +rm -rf $testdir
> > >  # success, all done
> > >  status=0
> > >  exit
> > > diff --git a/tests/generic/176 b/tests/generic/176
> > > index a084578a..bc83762e 100755
> > > --- a/tests/generic/176
> > > +++ b/tests/generic/176
> > > @@ -73,6 +73,7 @@ bytes=$((blocks_needed * blksz))
> > >  echo "reflinking $((blocks_needed / 2)) blocks, $((bytes / 2)) bytes" >> "$seqres.full"
> > >  _reflink_range "$testdir/file1" 0 "$testdir/file2" 0 $bytes >> "$seqres.full"
> > >  
> > > +rm -rf $testdir
> > >  # success, all done
> > >  status=0
> > >  exit
> > > -- 
> > > 2.20.1
> > > 
> > 
> 
> -- 
> Murphy
> 


  reply	other threads:[~2020-07-22  5:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  4:40 [PATCH] generic/175, generic/176: cleanup testdir before exit Murphy Zhou
2020-07-17  5:58 ` Zorro Lang
2020-07-22  3:11   ` Murphy Zhou
2020-07-22  5:16     ` Zorro Lang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-01-13  3:24 Murphy Zhou
2020-01-13 22:42 ` Darrick J. Wong
2020-01-15  4:21   ` Murphy Zhou
2020-01-15 17:19     ` Darrick J. Wong
2020-01-16  7:45       ` Murphy Zhou
2020-01-16 15:52         ` Darrick J. Wong
2020-01-17 10:04           ` Murphy Zhou

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=20200722051602.GA2937@dhcp-12-102.nay.redhat.com \
    --to=zlang@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=jencce.kernel@gmail.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;
as well as URLs for NNTP newsgroup(s).