All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/102: Update strict check
Date: Thu, 5 Jan 2017 17:38:43 +0800	[thread overview]
Message-ID: <20170105093843.GU1859@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1483606569-6515-1-git-send-email-yangx.jy@cn.fujitsu.com>

On Thu, Jan 05, 2017 at 04:56:09PM +0800, Xiao Yang wrote:
> Low memory may lead to "written less bytes than
> requested".  We only care about if xfs_io returned
> ENOSPC or not, so we can check stderr of xfs_io
> instead of stdout.
> 
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>

I thought this was fine, but I'm not sure now. Because I recalled that
there was an ext4 bug in dax mount exposed by generic/102, and it was
the case that xfs_io returned less bytes than requested. See commit

e84dfbe ext4: retry block allocation for failed DIO and DAX writes

If we discard all the xfs_io stdout, we may miss such bugs in the
future. But I'd like to see more comments on this from filesystem
developers.

> ---
>  tests/generic/102     |  5 +++--
>  tests/generic/102.out | 20 --------------------
>  2 files changed, 3 insertions(+), 22 deletions(-)
> 
> diff --git a/tests/generic/102 b/tests/generic/102
> index 3cdc2ba..104edc0 100755
> --- a/tests/generic/102
> +++ b/tests/generic/102
> @@ -54,8 +54,9 @@ _scratch_mount
>  for ((i = 0; i < 10; i++)); do
>  	echo "loop $i" >>$seqres.full
>  
> -	$XFS_IO_PROG -f -c "pwrite -b 1m 0 400m" "$SCRATCH_MNT"/file | \
> -_filter_xfs_io | _filter_scratch
> +	out="$($XFS_IO_PROG -f -c "pwrite -b 1m 0 400m" "$SCRATCH_MNT"/file 2>&1)"
> +	echo $out >>$seqres.full 2>&1
> +	echo $out | grep -q "No space left on device" && echo "pwrite failed with ENOSPC"

If we want to discard xfs_io stdout, just redirect it to /dev/null,
ENOSPC error messgage will go to stderr and break the golden image
anyway.

Thanks,
Eryu

  reply	other threads:[~2017-01-05  9:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05  8:56 [PATCH] generic/102: Update strict check Xiao Yang
2017-01-05  9:38 ` Eryu Guan [this message]
2017-01-11  7:49   ` Xiao Yang
2017-01-11  8:24   ` [PATCH v2] " Xiao Yang

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=20170105093843.GU1859@eguan.usersys.redhat.com \
    --to=eguan@redhat.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.