summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-03-12 07:57:20 -0700
committerZorro Lang <zlang@kernel.org>2024-03-13 23:19:20 +0800
commitc9d50e4d1c2a12431e4c1dea3bd32a45d94cc43b (patch)
treeb233da02298b7887b8ac36e986d7ed11b7dc9e52
parent7a97d9c0fa1b07c967eee864e07f5279193d1b9a (diff)
generic/574: don't fail the test on intentional coredump
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> Reviewed-by: Bill O'Donnell <bodonnel@redhat.com> Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/generic/5743
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/generic/574 b/tests/generic/574
index 067b3033..cb42baaa 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"
}