public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jan Kara <jack@suse.cz>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] Make ./new work for non-root user
Date: Tue, 29 May 2018 11:16:25 +1000	[thread overview]
Message-ID: <20180529011625.GH23861@dastard> (raw)
In-Reply-To: <20180528093758.va5pnwchjrgmb3sf@quack2.suse.cz>

On Mon, May 28, 2018 at 11:37:58AM +0200, Jan Kara wrote:
> On Fri 25-05-18 11:30:34, Dave Chinner wrote:
> > On Thu, May 24, 2018 at 08:30:55PM +0200, Jan Kara wrote:
> > > Currently 'new' script sources common/config which tries to find mkfs
> > > and fails if not found (which is likely for non-root user). This is
> > > inconvenient as development usually does not happen as root. In fact the
> > > vast majority of setup in common/config and common/rc is not necessary
> > > for 'new'. Split out the necessary bits into new common/config-base and
> > > use it in 'new'. Cleanup common/rc and common/config now that it's only
> > > used from 'check'.
> > > 
> > > Signed-off-by: Jan Kara <jack@suse.cz>
> > ....
> > > --- a/common/rc
> > > +++ b/common/rc
> > > @@ -20,18 +20,9 @@
> > >  #  Mountain View, CA 94043, USA, or: http://www.sgi.com
> > >  #-----------------------------------------------------------------------
> > >  
> > > -BC=$(which bc 2> /dev/null) || BC=
> > > +. common/config
> > 
> > Doesn't this means we now include common/config in every test setup
> > routine, even though the environment it sets up is inherited from
> > the check function.
> 
> What you describe was happening already in the past AFAICT. The test gets
> executed as "./$seq" so only exported variables are inherited.  Thus 'iam'
> variable is not set when executing the test and therefore common/rc was
> already including common/config. Also including common/config in each test
> is even required to get functions declared there. Am I missing something?

No, I just read the code incorrectly. The way common/config gets
included is a maze of twisty passages - I'll go back and look at the
patch again...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2018-05-29  1:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24 18:30 [PATCH] Make ./new work for non-root user Jan Kara
2018-05-25  1:30 ` Dave Chinner
2018-05-28  9:37   ` Jan Kara
2018-05-29  1:16     ` Dave Chinner [this message]
2018-05-29  1:39 ` Dave Chinner
2018-05-29  2:01   ` Dave Chinner
2018-05-29 16:36   ` Jan Kara

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=20180529011625.GH23861@dastard \
    --to=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=jack@suse.cz \
    /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