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

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"
 }

             reply	other threads:[~2024-03-12 14:57 UTC|newest]

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

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=20240312145720.GE6188@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@redhat.com \
    --cc=ebiggers@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