RHEL 5: tests: Don't use 'truncate' command.

The coreutils 'truncate' command does not exist in RHEL 5.  Replace
use of this command in tests with the guestfish 'disk-create' command.
This commit is contained in:
Richard W.M. Jones
2017-02-07 17:34:14 +00:00
parent 7461a8fab1
commit 74ded0dbc1
7 changed files with 10 additions and 13 deletions

View File

@@ -32,22 +32,19 @@ CLEANFILES += $(files)
# Blank disk images in various sizes and formats.
blank-disk-1s.raw:
rm -f $@
truncate -s 512 $@
guestfish disk-create $@ raw 512
blank-disk-1s.qcow2:
qemu-img create -f qcow2 -o preallocation=metadata $@ 512
blank-disk-1K.raw:
rm -f $@
truncate -s 1K $@
guestfish disk-create $@ raw 1K
blank-disk-1K.qcow2:
qemu-img create -f qcow2 -o preallocation=metadata $@ 1K
blank-disk-1M.raw:
rm -f $@
truncate -s 1M $@
guestfish disk-create $@ raw 1M
blank-disk-1M.qcow2:
qemu-img create -f qcow2 -o preallocation=metadata $@ 1M