FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Misono, Tomohiro" <misono.tomohiro@jp.fujitsu.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs/029: fix wrong usage of name filter
Date: Wed, 30 Aug 2017 15:56:09 +0900	[thread overview]
Message-ID: <4b4e2e7d-1c28-da38-4729-a4eb231fcce5@jp.fujitsu.com> (raw)
In-Reply-To: <f0fc8c9e-fb9b-fe82-6ebd-29149ef01b8e@jp.fujitsu.com>

Sorry, this patch contains leading spaces, I will resend this soon.

On 2017/08/30 11:44, Misono, Tomohiro wrote:
> btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and
> $SCRATCH_MNT directory.
> 
> In this function, it calls both _filter_test_dir and _filter_scratch
> concatenated by pipe. Therefore if $TEST_DIR is a prefix of
> $SCRATCH_MNT, this filter function gives wrong filtered name for
> $SCRATCH_MNT and the test fails.
> 
> Fix this by calling _filter_test_dir and _filter_scratch directly.
> 
> Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujits.com>
> ---
>   tests/btrfs/029 | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/btrfs/029 b/tests/btrfs/029
> index c390c95..74fded7 100755
> --- a/tests/btrfs/029
> +++ b/tests/btrfs/029
> @@ -66,19 +66,14 @@ _scratch_mkfs > /dev/null 2>&1
>   _scratch_mount
>   $XFS_IO_PROG -f -c 'pwrite -S 0x61 0 9000' $SCRATCH_MNT/original >> 
> $seqres.full
> 
> -_filter_testdirs()
> -{
> -    _filter_test_dir | _filter_scratch
> -}
> -
>   _create_reflinks()
>   {
>       # auto reflink, should fall back to non-reflink
>       rm -rf $2
>       echo "reflink=auto:"
>       cp --reflink=auto $1 $2
> -    md5sum $1 | _filter_testdirs
> -    md5sum $2 | _filter_testdirs
> +    md5sum $1 | _filter_scratch
> +    md5sum $2 | _filter_test_dir
> 
>       # always reflink, should fail outright
>       rm -rf $2
> @@ -86,7 +81,7 @@ _create_reflinks()
>       cp --reflink=always $1 $2 >> $seqres.full 2>&1 || echo "cp reflink 
> failed"
> 
>       # The failed target actually gets created by cp:
> -    ls $2 | _filter_testdirs
> +    ls $2 | _filter_test_dir
>   }
> 
>   echo "test reflinks across different devices"
> 


  reply	other threads:[~2017-08-30  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30  2:44 [PATCH] btrfs/029: fix wrong usage of name filter Misono, Tomohiro
2017-08-30  6:56 ` Misono, Tomohiro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-08-30  7:38 Misono, Tomohiro
2017-08-30 11:09 ` Eryu Guan
2017-08-30 23:53   ` Misono, Tomohiro
2017-08-31  7:33     ` Eryu Guan
2017-09-01  0:44       ` Misono, Tomohiro
2017-09-01  3:47         ` 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=4b4e2e7d-1c28-da38-4729-a4eb231fcce5@jp.fujitsu.com \
    --to=misono.tomohiro@jp.fujitsu.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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