All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: Amir Goldstein <amir73il@gmail.com>,
	Eryu Guan <guaneryu@gmail.com>, Theodore Ts'o <tytso@mit.edu>,
	fstests <fstests@vger.kernel.org>, Jan Kara <jack@suse.cz>
Subject: Re: Widespread test setup template problems (was Re: [PATCH] generic: fix cleanup function for test 490)
Date: Sat, 26 May 2018 09:25:57 +1000	[thread overview]
Message-ID: <20180525232557.GI10363@dastard> (raw)
In-Reply-To: <20180525223300.GB199878@gmail.com>

On Fri, May 25, 2018 at 03:33:00PM -0700, Eric Biggers wrote:
> On Fri, May 25, 2018 at 06:45:19PM +1000, Dave Chinner wrote:
> > On Fri, May 25, 2018 at 11:06:23AM +0300, Amir Goldstein wrote:
> > > On Fri, May 25, 2018 at 9:25 AM, Dave Chinner <david@fromorbit.com> wrote:
> > > >> > +# remove previous $seqres.full before test
> > > >> > +rm -f $seqres.full
> > > >>
> > > >> Why can't the $seqres.full removal be done in the common preamble?
> > > >
> > > > Because it's common during test failure debugging to comment out the
> > > > removal of this file. I do it all the time, and I'm sure other
> > > > people do too.
> > > >
> > > 
> > > IDGI, this is removing the full log of previous test run.
> > > Why is it useful to comment it out?
> > 
> > Because when you have a test that doesn't fail every time and you
> > run it in a loop, you don't know which of the test runs is going to
> > fail, and often you get different failure signatures. Collecting
> > them all is easy this way - I've been using xfstests this way for the
> > last 15 years and I see no reason to make this harder to acheive.
> > 
> > > And if it is useful, better control keeping old log with env var and
> > > still keep the default code in setup_test, e.g.:
> > > KEEP_FULL_LOG=1 ./check ...
> > 
> > I don't like magic env settings that nobody (including me) will
> > remember or use and so will just bit rot. I'm trying to remove
> > technical debt from xfstests, not add more.
> > 
> 
> It could alternatively be an option passed to setup_test upon sourcing, so for
> your debugging workflow you would just replace
> 
> . common/setup_test
> 
> with
> 
> . common/setup_test --keep-full-log
> 
> Having the same boilerplate copy-and-pasted in 800 places solely for the purpose
> of being able to comment it out is very ugly.

Which conflicts with the goal of having a common fixed test setup
preamble that should not be modified by anyone.

i.e. I want to move towards a clean separation of the required test
harness setup parameters vs things that tests can change without
impacting the test harness or common/ test code. Things like $tmp,
$here, etc are controlled by the test harness and used in the common
code. OTOH, removal of $seqres.full output files is a per-test
option, not a test harness parameter - many tests don't use it and
never remove it. Hence it's /definition/ needs to be part of the
test harness setup preamble, but it's removal should not be as that
is a per-test and/or test-run context specific behaviour.


Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2018-05-25 23:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-20 18:45 [PATCH] generic: fix cleanup function for test 490 Theodore Ts'o
2018-05-21  2:29 ` Eryu Guan
2018-05-21  2:41 ` Dave Chinner
2018-05-21  2:54   ` Eryu Guan
2018-05-25  0:29     ` Dave Chinner
2018-05-25  0:59       ` Widespread test setup template problems (was Re: [PATCH] generic: fix cleanup function for test 490) Dave Chinner
2018-05-25  1:23         ` Dave Chinner
2018-05-25  4:17           ` Eric Biggers
2018-05-25  6:25             ` Dave Chinner
2018-05-25  8:06               ` Amir Goldstein
2018-05-25  8:45                 ` Dave Chinner
2018-05-25 22:33                   ` Eric Biggers
2018-05-25 23:25                     ` Dave Chinner [this message]
2018-05-27 12:38           ` Eryu Guan

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=20180525232557.GI10363@dastard \
    --to=david@fromorbit.com \
    --cc=amir73il@gmail.com \
    --cc=ebiggers3@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=jack@suse.cz \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.