2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 SUSE. All Rights Reserved.
7 # This is a regression test for kernel patch
8 # "ext4: Fix data corruption for mmap writes"
10 # The problem this test checks for is when too much is zeroed in the tail
11 # page that gets written out just while the file gets extended and written
14 # Based on test program by Michael Zimmer <michael@swarm64.com>
17 seqres=$RESULT_DIR/$seq
18 echo "QA output created by $seq"
22 status=1 # failure is the default!
23 trap "_cleanup; exit \$status" 0 1 2 3 15
32 # get standard environment, filters and checks
36 # remove previous $seqres.full before test
39 # Modify as appropriate.
42 _require_test_program "t_mmap_fallocate"
44 # real QA test starts here
45 FILE=$TEST_DIR/testfile_fallocate
46 # Make sure file exists
48 # Force frequent writeback of the file
52 while [ $STOP -eq 0 ]; do
53 $XFS_IO_PROG -c fsync $FILE
59 $here/src/t_mmap_fallocate $FILE 256 && echo "Silence is golden"