]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/574: don't fail the test on intentional coredump
authorDarrick J. Wong <djwong@kernel.org>
Tue, 12 Mar 2024 14:57:20 +0000 (07:57 -0700)
committerZorro Lang <zlang@kernel.org>
Wed, 13 Mar 2024 15:19:20 +0000 (23:19 +0800)
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>
tests/generic/574

index 067b3033a81b41ff89df0937ec852a0f5eee5072..cb42baaa67aa851cb211e68782cbce7819f6b29a 100755 (executable)
@@ -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"
 }