All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Andreas Grünbacher" <andreas.gruenbacher@gmail.com>
Cc: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>,
	fstests@vger.kernel.org, linux-mtd@lists.infradead.org,
	richard.weinberger@gmail.com
Subject: Re: [PATCH] fstests: link .out to correct output when we set USE_ATTR_SECURE=yes
Date: Fri, 21 Aug 2015 07:08:12 +1000	[thread overview]
Message-ID: <20150820210812.GO3902@dastard> (raw)
In-Reply-To: <CAHpGcMLZT5xYx5EUBLTPyLQd0f+jQ-g+c_f-oErsHP33m7-ROg@mail.gmail.com>

On Thu, Aug 20, 2015 at 08:18:28AM +0200, Andreas Grünbacher wrote:
> Dongsheng,
> 
> 2015-08-20 3:01 GMT+02:00 Dongsheng Yang <yangds.fnst@cn.fujitsu.com>:
> >
> > When we set USE_ATTR_SECURE to yes or no, the expected outputs of generic/062
> > would be different. So we need to link the .out to different file.
> 
> Can the tests for the different namespaces please be separated from
> each other here (see below)?

I certainly agree with this approach ;)

> 
> diff --git a/tests/generic/062 b/tests/generic/062
> index 194b638..9dd4498 100755
> --- a/tests/generic/062
> +++ b/tests/generic/062
> @@ -142,6 +142,7 @@ for nsp in $ATTR_MODES; do
>                 echo "*** final list (strings, type=$inode, nsp=$nsp)"
>                 getfattr -m '.' -e hex $SCRATCH_MNT/$inode
> 
> +               # FIXME: Remove all remaining xattrs
>         done
>  done
> 
> Next, can the security namespace tests be put in their own test case
> so that we don't need to switch between two different .out files? This
> could be done by setting ATTR_MODES and then invoking
> tests/generic/062 to avoid duplicating the entire test script.

Just not the suggested mechanism :)

We can't execute one test from another - that will lead to all sorts
of bad juju occurring with results and timing and so on because they
are all based on $0.  The correct way to do this is to factor the
test internals into a common file, then wrap the common functions
with a new test file.

e.g. see _test_generic_punch(), which started off as corner case
testing the XFS_IOC_ZERORANGE ioctl in a single test, Then got
extended to testing hole punching in a new test, then got factored
into common functions in common/punch, and it is now called by 14
different tests....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2015-08-20 21:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18 12:15 [kernel.org bug 103071] Dead "security.*" xattr code in ubifs Andreas Grünbacher
2015-08-18 20:55 ` Richard Weinberger
2015-08-19  1:07   ` Sheng Yong
2015-08-19  1:37     ` Sheng Yong
2015-08-19  6:59       ` Richard Weinberger
2015-08-19  7:36         ` Sheng Yong
2015-08-19  7:51           ` Richard Weinberger
2015-08-20  9:32             ` Andreas Grünbacher
2015-08-20  0:50   ` Dongsheng Yang
2015-08-20  1:01     ` [PATCH] fstests: link .out to correct output when we set USE_ATTR_SECURE=yes Dongsheng Yang
2015-08-20  1:01       ` Dongsheng Yang
2015-08-20  6:18       ` Andreas Grünbacher
2015-08-20 21:08         ` Dave Chinner [this message]
2015-08-20 21:17           ` Andreas Grünbacher
2015-08-21  0:36           ` Dongsheng Yang
2015-08-21  0:36             ` Dongsheng Yang
2015-08-20  6:49     ` [kernel.org bug 103071] Dead "security.*" xattr code in ubifs Richard Weinberger

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=20150820210812.GO3902@dastard \
    --to=david@fromorbit.com \
    --cc=andreas.gruenbacher@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard.weinberger@gmail.com \
    --cc=yangds.fnst@cn.fujitsu.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 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.