Files
apfstests/tests/generic/534.out
T
Filipe Manana 8694a9b144 generic: add test for fsync after shrinking truncate and rename
Test that if we truncate a file to reduce its size, rename it and then
fsync it, after a power failure the file has a correct size and name.

This test is motivated by a bug found in btrfs, which is fixed by a
patch for the linux kernel titled:

  "Btrfs: fix incorrect file size after shrinking truncate and fsync"

This test currently passes on ext4, xfs, f2fs and patched btrfs.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2019-03-09 18:18:52 +08:00

9 lines
250 B
Plaintext

QA output created by 534
wrote 8000/8000 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
File content after power failure:
0000000 ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab
*
0002992 ab ab ab ab ab ab ab ab
0003000