]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/749: don't write a ton of _mread output to seqres.full
authorDarrick J. Wong <djwong@kernel.org>
Mon, 2 Feb 2026 19:11:44 +0000 (11:11 -0800)
committerZorro Lang <zlang@kernel.org>
Sun, 8 Feb 2026 17:36:00 +0000 (01:36 +0800)
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>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/749

index 7af019ddd7f98f4f824e5a8936f7d24fac5aa217..01e3eac0ff73be779b3cf68a060eb51fda224206 100755 (executable)
@@ -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