]> git.sur5r.net Git - u-boot/commit
test: fat: add error-checking to non-contig test
authorStephen Warren <swarren@nvidia.com>
Tue, 17 Nov 2015 17:29:07 +0000 (10:29 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 18 Nov 2015 20:28:59 +0000 (15:28 -0500)
commit34a60d9bc88b6b009da6f7ef4d8b70f807eaada4
tree73254cb35ceb138a57764045522aefa4dc95b151
parent60f989a939643a3fdf9553613f1b916a45a9c6ed
test: fat: add error-checking to non-contig test

Check the result code of all command that are executed. Without this,
if the fallocate invocation fails (this feature is not supported on ext3
filesystems for example) then a zero-length output file will be created,
and subsequent the mkfs and mount invocations will fail, which will cause
the subsequent dd invocation to attempt to fill up the host's entire free
disk space. That's not a nice user experience!

Related, if fallocate does fail, try to create the test disk image using
dd instead. That should work everywhere.

Fixes: 4a28274227d0 ("test: fat: add test of non-contiguous file reads")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
test/fs/fat-noncontig-test.sh