xfs/020: fix truncation test
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 5 Feb 2020 00:01:54 +0000 (16:01 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 9 Feb 2020 15:56:09 +0000 (23:56 +0800)
commit13a86fa73d52381fbc291c8d9223c8c6ce5a9103
tree3c0c6d4beb0023b22d21a32a28c895feaccb4d5b
parent1d22275b06aa6d1e66144e12775d23b058317978
xfs/020: fix truncation test

If we can't create the 60T sparse image for testing repair on a large fs
(such as when running on 32-bit), don't bother running the rest of the
test.  This requires the actual truncate(1) command, because it returns
nonzero if the system call fails.

[Eryu: the original bug was introduced by me when committing the
original patch, which was a correct fix. Sorry about that.. ]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/020