diff options
author | Ruediger Meier | 2015-12-15 17:46:58 +0100 |
---|---|---|
committer | Karel Zak | 2016-01-05 12:21:56 +0100 |
commit | 1cb10736e4c5e51075d06ca9a0fc8ff49ac46c7d (patch) | |
tree | 1a7f54e6b05b88da91de3ec8e0cc68571e47a9cd /tests/functions.sh | |
parent | tests: no more sleep, udevadm settle only (diff) | |
download | kernel-qcow2-util-linux-1cb10736e4c5e51075d06ca9a0fc8ff49ac46c7d.tar.gz kernel-qcow2-util-linux-1cb10736e4c5e51075d06ca9a0fc8ff49ac46c7d.tar.xz kernel-qcow2-util-linux-1cb10736e4c5e51075d06ca9a0fc8ff49ac46c7d.zip |
tests: always create sparse image files
This saves about 400M disk I/O and space.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 3 |
1 files changed, 2 insertions, 1 deletions
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 } |