generic/574: don't fail the test on intentional coredump
PATCH 1/1 generic/574: don't fail the test on intentional coredump
From: Darrick J. Wong <[email protected]>
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 <[email protected]>
--- tests/generic/574 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tests/generic/574 +2 -1
@@ -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" }
Quoted 6 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Don't fail this test just because the mmap read of a corrupt verity file causes
xfs_ioto segfault and then dump core.Signed-off-by Darrick J. Wong <[email protected]>
Looks fine.
Reviewed-by Bill O'Donnell <[email protected]>
Quoted 19 lines
--- tests/generic/574 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tests/generic/574 +2
-1@@ -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" }
Quoted 15 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Don't fail this test just because the mmap read of a corrupt verity file causes
xfs_ioto segfault and then dump core.Signed-off-by Darrick J. Wong <[email protected]>--- tests/generic/574 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tests/generic/574 +0
-0
tests/generic/574 mread() · line 81
Quoted 9 lines
tests/generic/574 +2
-1@@ -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 <[email protected]>
- Eric