From 1cb10736e4c5e51075d06ca9a0fc8ff49ac46c7d Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Tue, 15 Dec 2015 17:46:58 +0100 Subject: tests: always create sparse image files This saves about 400M disk I/O and space. Signed-off-by: Ruediger Meier --- tests/functions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/functions.sh') diff --git a/tests/functions.sh b/tests/functions.sh index f6c4d33ee..c7e0ded61 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -464,7 +464,8 @@ function ts_image_init { local mib=${1:-"5"} # size in MiBs local img=${2:-"$TS_OUTDIR/${TS_TESTNAME}.img"} - dd if=/dev/zero of="$img" bs=1M count=$mib &> /dev/null + rm -f $img + truncate -s "${mib}M" "$img" echo "$img" return 0 } -- cgit v1.2.3-55-g7522