Re: [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full

Carlos Maiolino
2026-02-05T17:17:12Z

On Mon, Feb 02, 2026 at 11:11:44AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Something went wrong with this test when testing with fuse4fs, but I
> couldn't tell what because this test writes so much data to seqres.full
> that it completely filled the log partition. Most of that output was
> from checks that actually succeeded, so let's reduce the amount of
> logging from _mread (which passes -v) by writing to a tempfile and only
> dumping the output to the .full file if something breaks.
>
> Cc: <fstests@vger.kernel.org> # v2024.06.27
> Fixes: e4a6b119e52295 ("fstests: add mmap page boundary tests")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> tests/generic/749 | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

>
>
> diff --git a/tests/generic/749 b/tests/generic/749
> index 7af019ddd7f98f..01e3eac0ff73be 100755
> --- a/tests/generic/749
> +++ b/tests/generic/749
> @@ -163,17 +163,20 @@ do_mmap_tests()
> new_filelen=$(_get_filesize $test_file)
> map_len=$(_round_up_to_page_boundary $new_filelen)
> csum_orig="$(_md5_checksum $test_file)"
> - _mread $test_file 0 $map_len >> $seqres.full 2>$tmp.err
> + _mread $test_file 0 $map_len > $tmp.out 2>$tmp.err
> if grep -q 'Bus error' $tmp.err; then
> failed=1
> + cat $tmp.out >> $seqres.full
> cat $tmp.err
> echo "Not expecting SIGBUS when reading up to page boundary"
> fi
>
> # This should just work
> - _mread $test_file 0 $map_len >> $seqres.full 2>$tmp.err
> + _mread $test_file 0 $map_len > $tmp.out 2>$tmp.err
> if [[ $? -ne 0 ]]; then
> let failed=$failed+1
> + cat $tmp.out >> $seqres.full
> + cat $tmp.err
> echo "mmap() read up to page boundary should work"
> fi
>
> @@ -205,9 +208,11 @@ do_mmap_tests()
> fi
>
> # Now let's go beyond the allowed mmap() page boundary
> - _mread $test_file 0 $((map_len + 10)) $((map_len + 10)) >> $seqres.full 2>$tmp.err
> + _mread $test_file 0 $((map_len + 10)) $((map_len + 10)) > $tmp.out 2>$tmp.err
> if ! grep -q 'Bus error' $tmp.err; then
> let failed=$failed+1
> + cat $tmp.out >> $seqres.full
> + cat $tmp.err
> echo "Expected SIGBUS when mmap() reading beyond page boundary"
> fi
>
>
>