public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: fstests <fstests@vger.kernel.org>,
	xfs <linux-xfs@vger.kernel.org>,
	aalbersh@redhat.com, Zorro Lang <zlang@redhat.com>
Subject: Re: [PATCH] generic/574: don't fail the test on intentional coredump
Date: Tue, 12 Mar 2024 09:43:24 -0700	[thread overview]
Message-ID: <20240312164324.GA1148@sol.localdomain> (raw)
In-Reply-To: <20240312145720.GE6188@frogsfrogsfrogs>

On Tue, Mar 12, 2024 at 07:57:20AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Don't fail this test just because the mmap read of a corrupt verity file
> causes xfs_io to segfault and then dump core.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  tests/generic/574 |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/generic/574 b/tests/generic/574
> index 067b3033a8..cb42baaa67 100755
> --- a/tests/generic/574
> +++ b/tests/generic/574
> @@ -74,7 +74,8 @@ mread()
>  	# shell instance from optimizing out the fork and directly exec'ing
>  	# xfs_io.  The easiest way to do that is to append 'true' to the
>  	# commands, so that xfs_io is no longer the last command the shell sees.
> -	bash -c "trap '' SIGBUS; $XFS_IO_PROG -r $file \
> +	# Don't let it write core files to the filesystem.
> +	bash -c "trap '' SIGBUS; ulimit -c 0; $XFS_IO_PROG -r $file \
>  		-c 'mmap -r 0 $map_len' \
>  		-c 'mread -v $offset $length'; true"
>  }

Reviewed-by: Eric Biggers <ebiggers@google.com>

- Eric

      parent reply	other threads:[~2024-03-12 16:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 14:57 [PATCH] generic/574: don't fail the test on intentional coredump Darrick J. Wong
2024-03-12 15:30 ` Bill O'Donnell
2024-03-12 16:43 ` Eric Biggers [this message]

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=20240312164324.GA1148@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=aalbersh@redhat.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox