linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: guaneryu@gmail.com, linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 1/2] inject: skip tests when knob dir exists but knob doesn't
Date: Tue, 12 Feb 2019 09:03:42 -0500	[thread overview]
Message-ID: <20190212140341.GD35803@bfoster> (raw)
In-Reply-To: <154993786856.2062.15965021741779968907.stgit@magnolia>

On Mon, Feb 11, 2019 at 06:17:48PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> If the XFS error injection knob directory exists but the knob itself
> doesn't, then we know that this kernel doesn't support the knob and
> can skip the test.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  common/inject |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> 
> diff --git a/common/inject b/common/inject
> index 903fb379..984ec209 100644
> --- a/common/inject
> +++ b/common/inject
> @@ -62,6 +62,13 @@ _require_xfs_io_error_injection()
>  	knob="$(_find_xfs_mountdev_errortag_knob "${TEST_DEV}" "${type}")"
>  	test -w "${knob}" && return
>  
> +	# If the directory containing the sysfs error injection knob exists
> +	# but the knob itself isn't usable, this kernel doesn't know about
> +	# the knob.  Skip the test.
> +	if [ -d "$(dirname "${knob}")" ]; then
> +		_notrun "XFS error injection $type unknown on this kernel."
> +	fi
> +
>  	# NOTE: We can't actually test error injection here because xfs
>  	# hasn't always range checked the argument to xfs_errortag_add.
>  	# We also don't want to trip an error before we're ready to deal
> 

  reply	other threads:[~2019-02-12 14:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  2:17 [PATCH 0/2] fstests: incore unlinked list Darrick J. Wong
2019-02-12  2:17 ` [PATCH 1/2] inject: skip tests when knob dir exists but knob doesn't Darrick J. Wong
2019-02-12 14:03   ` Brian Foster [this message]
2019-02-12  2:17 ` [PATCH 2/2] generic: check the behavior of programs opening a lot of O_TMPFILE files Darrick J. Wong
2019-02-12  2:42   ` Amir Goldstein
2019-02-13  4:33     ` Darrick J. Wong
2019-02-12 14:04   ` Brian Foster
2019-02-13  4:51     ` Darrick J. Wong
2019-02-13  5:11       ` Darrick J. Wong
2019-02-13 15:44         ` Brian Foster
2019-02-13 15:44       ` Brian Foster
2019-02-13 16:20         ` Darrick J. Wong
2019-02-13 16:36           ` Brian Foster
2019-02-13 20:49   ` [PATCH v2 " 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=20190212140341.GD35803@bfoster \
    --to=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).