All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: fstests@vger.kernel.org, Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH 6/6] xfstests: Add mkfs input validation tests
Date: Sat, 16 Jul 2016 17:33:58 +0800	[thread overview]
Message-ID: <20160716093358.GL2432@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1468500214-6237-7-git-send-email-jtulak@redhat.com>

On Thu, Jul 14, 2016 at 02:43:34PM +0200, Jan Tulak wrote:
> mkfs.xfs does not do a very good job of input validation. This test
> is designed to exercise the input validation and test good/bad
> combinations of options being set. It will not pass on an old
> mkfs.xfs binary - it is designed to be the test case for an input
> validation cleanup (merged in spring/summer 2016).
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> 
> ---
> CHANGES:
> Use common/rc feature check for mkfs version testing.
> 
> Cheers,
> Jan
> 
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> ---
>  tests/xfs/400-input-validation     | 338 +++++++++++++++++++++++++++++++++++++
>  tests/xfs/400-input-validation.out |   2 +
>  tests/xfs/group                    |   1 +
>  3 files changed, 341 insertions(+)
>  create mode 100755 tests/xfs/400-input-validation
>  create mode 100644 tests/xfs/400-input-validation.out
> 
> diff --git a/tests/xfs/400-input-validation b/tests/xfs/400-input-validation
> new file mode 100755
> index 0000000..83a4ff9
> --- /dev/null
> +++ b/tests/xfs/400-input-validation
> @@ -0,0 +1,338 @@
> +#! /bin/bash
> +# FS QA Test No. xfs/400
> +#
> +# mkfs.xfs input validation test. Designed to break mkfs.xfs if it doesn't
> +# filter garbage input or invalid option combinations correctly.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2016 Red Hat, Inc.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#-----------------------------------------------------------------------
> +#
> +
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
[snip]
> +do_mkfs_fail -l internal=1,logdev=$fsimg $SCRATCH_DEV
> +do_mkfs_fail -l lazy-count=1garbage $SCRATCH_DEV
> +do_mkfs_fail -l lazy-count=2 $SCRATCH_DEV
> +do_mkfs_fail -l lazy-count=0 -m crc=1 $SCRATCH_DEV
> +do_mkfs_fail -l version=1 -m crc=1 $SCRATCH_DEV

This test fails in my DAX testing, where SCRATCH_DEV is ramdisk. The
mkfs itself should fail, but it passed. Log version 2 was used
automatically, instead of prompting "V2 logs always enabled for CRC
enabled filesytems"

[root@dhcp-66-86-11 xfstests]# mkfs -t xfs -f -l version=1 -m crc=1 /dev/ram0
meta-data=/dev/ram0              isize=512    agcount=1, agsize=4096 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=0
data     =                       bsize=4096   blocks=4096, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=1605, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

Is it a mkfs.xfs bug or the test case should handle the special case?

Thanks,
Eryu

  reply	other threads:[~2016-07-16  9:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 12:43 [PATCH 0/6 v3] xfstests: some small fixes and mkfs validation test Jan Tulak
2016-07-14 12:43 ` [PATCH 1/6] xfstests: Fix installation for extended names Jan Tulak
2016-07-14 12:43 ` [PATCH 2/6] fstests: filename handling for extended names in ./check was on a wrong place Jan Tulak
2016-07-14 12:43 ` [PATCH 3/6] xfstests: remove unused variable Jan Tulak
2016-07-14 12:43 ` [PATCH 4/6] xfstests: add _require_xfs_mkfs_validation to common/rc Jan Tulak
2016-07-14 14:21   ` Eryu Guan
2016-07-14 15:16     ` Jan Tulak
2016-07-14 15:57   ` [PATCH v2] " Jan Tulak
2016-07-14 12:43 ` [PATCH 5/6] xfstests: update xfs/096 for new behaviour Jan Tulak
2016-07-14 12:43 ` [PATCH 6/6] xfstests: Add mkfs input validation tests Jan Tulak
2016-07-16  9:33   ` Eryu Guan [this message]
2016-07-17 23:30     ` Dave Chinner
2016-07-18 11:29       ` Jan Tulak
2016-07-18 11:29         ` Jan Tulak
2016-07-18 11:47         ` Eryu Guan
2016-07-18 11:47           ` Eryu Guan
2016-07-18 11:54           ` Jan Tulak
2016-07-18 11:54             ` Jan Tulak
2016-07-18 12:33             ` Jan Tulak
2016-07-18 12:33               ` Jan Tulak
2016-07-20 23:54               ` Dave Chinner
2016-07-20 23:54                 ` Dave Chinner
2016-07-21 14:24                 ` Jan Tulak
2016-07-21 14:24                   ` Jan Tulak
2016-07-21 22:40                   ` Dave Chinner
2016-07-21 22:40                     ` Dave Chinner
2016-07-22 13:08                     ` Jan Tulak
2016-07-22 13:08                       ` Jan Tulak
2016-07-16 10:28 ` [PATCH 0/6 v3] xfstests: some small fixes and mkfs validation test Eryu Guan
2016-07-18  8:47 ` [PATCH v2] xfstests: Fix installation for extended names Jan Tulak

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=20160716093358.GL2432@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=jtulak@redhat.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.