All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Brian Foster <bfoster@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>,
	xiao yang <yangx.jy@cn.fujitsu.com>,
	fstests@vger.kernel.org, darrick.wong@oracle.com
Subject: Re: [PATCH v2 2/2] xfs: Regression test for invalid sb_logsunit
Date: Thu, 18 Jan 2018 16:44:18 +0800	[thread overview]
Message-ID: <20180118084418.GS3102@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20180116140914.GB52829@bfoster.bfoster>

On Tue, Jan 16, 2018 at 09:09:14AM -0500, Brian Foster wrote:
> On Tue, Jan 16, 2018 at 07:50:23PM +1100, Dave Chinner wrote:
> > On Tue, Jan 16, 2018 at 12:02:54PM +0800, Eryu Guan wrote:
> > > On Tue, Jan 16, 2018 at 08:03:52AM +1100, Dave Chinner wrote:
> > > > On Mon, Jan 15, 2018 at 07:45:23AM -0500, Brian Foster wrote:
> > > > > On Sat, Jan 13, 2018 at 01:23:53PM +1100, Dave Chinner wrote:
> > > > > > That's the whole point of adding debug asserts in cases like this -
> > > > > > they are supposed to stop test execution in it's tracks and leave a
> > > > > > corpse to analyse. The auto group regression tests are not supposed
> > > > > > to take the machine down on normal test configs (i.e.
> > > > > > CONFIG_XFS_DEBUG=y).
> > > > > > 
> > > > > 
> > > > > FWIW, my understanding of the dangerous group has always been that it's
> > > > > for tests that when they trigger a regression, forcibly affect the
> > > > > entire system as such (lockup, hang, crash, etc.). IMO, a test that
> > > 
> > > I had the same understanding of dangerous group. And I recommended the
> > > usage of "-g auto -x dangerous" before[1], and Dave acknowledged this
> > > dangerous group usage[2] :)
> > > 
> > > [1] https://www.spinics.net/lists/linux-btrfs/msg57312.html
> > > [2] https://www.spinics.net/lists/linux-btrfs/msg57330.html
> > 
> > Context is important. The context that the above links were talking
> > about filtering the dangerous group was for older kernels that don't
> > have the fixes for the bugs that crash the kernel.
> > 
> > This particular test fails this auto group criteria in the case of
> > people using CONFIG_XFS_DEBUG=y:
> > 
> > "
> >     - it passes on current upstream kernels, if it fails, it's
> >       likely to be resolved in forseeable future [2]
> > "
> > 
> > It fails, and isn't likely to ever work, because the assert needs to
> > remain there to catch userspace tool screwups....
> > 
> > > > If we really want to test these "should not ever happen" conditions
> > > > that trigger asserts on debug kernels as "everyone always runs"
> > > > regression testing, then these need to _notrun on CONFIG_XFS_DEBUG=y
> > > > kernels.  fstests already knows that it's running on a debug kernel,
> > > > so adding a _requires_production_kernel check may be the way around
> > > > this being considered a dangerous test.
> > > 
> > > This reminds that we already have a _require_no_xfs_debug rule, as used
> > > in xfs/115, which is known to trigger ASSERT failure on debug build. So
> > > we can do the same in this new test.
> > 
> > Ok, good! And it appears to be addressing the same "intentional
> > corruption triggers failures" case as we are discussing here:
> > 
> 
> My only suggestion (re: my previous comment) is to consider using a new
> check that looks at bug_on_assert when the knob is available for tests
> that are expected to generate asserts as such. The test stil has to

Looks like we need a new _require_no_xfs_bug_on_assert, which looks at
/sys/fs/xfs/debug/bug_on_assert value if it's available, and just calls
_require_no_xfs_debug if it's not available.

> filter the assert itself to cover the WARN=1 case, right?

I think so (and to cover the bug_on_assert=0 case).

> 
> > # we corrupt XFS on purpose, and debug built XFS would crash due to assert
> > # failure, so skip if we're testing on a debug built XFS
> > _require_no_xfs_debug
> > 
> 
> Only with CONFIG_XFS_ASSERT_FATAL=y! :)

XFS_ASSERT_FATAL and _require_no_xfs_debug were introduced closely in
time. XFS_ASSERT_FATAL was there first, and it was too new to be noticed
when we then introduced _require_no_xfs_debug..

Thanks,
Eryu

  reply	other threads:[~2018-01-18  8:44 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11  8:25 [PATCH] xfs: Regression test for invalid sb_logsunit xiao yang
2018-01-11 18:07 ` Darrick J. Wong
2018-01-12  1:58   ` Xiao Yang
2018-01-12  6:14   ` [PATCH v2] syscalls/madvise09.c: Use custom mount point instead of /sys/fs/cgroup/memory xiao yang
2018-01-12  6:14     ` [PATCH v2] xfs: Regression test for invalid sb_logsunit xiao yang
2018-01-12  6:19     ` [PATCH v2] syscalls/madvise09.c: Use custom mount point instead of /sys/fs/cgroup/memory Xiao Yang
2018-01-12  6:16   ` [PATCH v2 1/2] common/xfs: Check if write supports [-c|-d] option in xfs_db xiao yang
2018-01-12  6:16     ` [PATCH v2 2/2] xfs: Regression test for invalid sb_logsunit xiao yang
2018-01-12  7:49       ` Eryu Guan
2018-01-12  8:36         ` Dave Chinner
2018-01-12  8:50           ` Eryu Guan
2018-01-12 16:41             ` Darrick J. Wong
2018-01-13  2:23             ` Dave Chinner
2018-01-15  6:29               ` Eryu Guan
2018-01-15  7:48                 ` [PATCH v3 1/3] common/xfs: Check if write supports [-c|-d] option in xfs_db xiao yang
2018-01-15  7:48                   ` [PATCH v3 2/3] common/filter: factor out expected XFS warnings for mount xiao yang
2018-01-15  7:48                   ` [PATCH v3 3/3] xfs: Regression test for invalid sb_logsunit xiao yang
2018-01-15 12:45               ` [PATCH v2 2/2] " Brian Foster
2018-01-15 21:03                 ` Dave Chinner
2018-01-16  4:02                   ` Eryu Guan
2018-01-16  6:41                     ` Xiao Yang
2018-01-16  7:26                     ` [PATCH v4 1/3] common/xfs: Check if write supports [-c|-d] option in xfs_db xiao yang
2018-01-16  7:26                       ` [PATCH v4 2/3] common/filter: factor out expected XFS warnings for mount xiao yang
2018-01-18  8:48                         ` Eryu Guan
2018-01-18  8:56                           ` Xiao Yang
2018-01-16  7:26                       ` [PATCH v4 3/3] xfs: Regression test for invalid sb_logsunit xiao yang
2018-01-18  8:46                         ` Eryu Guan
2018-01-18 10:49                           ` [PATCH v5 1/3] common/xfs: Check if write supports [-c|-d] option in xfs_db xiao yang
2018-01-18 10:49                             ` [PATCH v5 2/3] common/filter: Factor out expected XFS warnings for assert xiao yang
2018-01-18 18:29                               ` Darrick J. Wong
2018-01-19  2:51                                 ` Eryu Guan
2018-01-19  4:04                                 ` Xiao Yang
2018-01-19  5:38                                 ` [PATCH v6 2/3] common: Add _require_no_xfs_bug_on_assert && Factor out filter_xfs_dmesg xiao yang
2018-01-19  5:38                                   ` [PATCH v6 3/3] xfs: Regression test for invalid sb_logsunit xiao yang
2018-01-18 10:49                             ` [PATCH v5 " xiao yang
2018-01-18 18:19                             ` [PATCH v5 1/3] common/xfs: Check if write supports [-c|-d] option in xfs_db Darrick J. Wong
2018-01-16  8:50                     ` [PATCH v2 2/2] xfs: Regression test for invalid sb_logsunit Dave Chinner
2018-01-16 14:09                       ` Brian Foster
2018-01-18  8:44                         ` Eryu Guan [this message]
2018-01-16 13:58                   ` Brian Foster
2018-01-12  7:44     ` [PATCH v2 1/2] common/xfs: Check if write supports [-c|-d] option in xfs_db Eryu Guan
2018-01-12 16:43     ` Darrick J. Wong

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=20180118084418.GS3102@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=yangx.jy@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.