mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -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
|
||||
|
||||
@@ -55,7 +55,7 @@ guestfish <<EOF
|
||||
list-filesystems
|
||||
EOF
|
||||
|
||||
truncate -s 10G rhbz1285847-2.img
|
||||
guestfish disk-create rhbz1285847-2.img raw 10G
|
||||
virt-resize rhbz1285847.img rhbz1285847-2.img --expand /dev/sda2
|
||||
|
||||
# Check that the filesystems made it across.
|
||||
|
||||
@@ -56,7 +56,7 @@ pushd $d
|
||||
|
||||
# Create a phony OVA. This is only a test of source parsing, not
|
||||
# conversion, so the contents of the disks doesn't matter.
|
||||
truncate -s 10k disk1.vmdk
|
||||
guestfish disk-create disk1.vmdk raw 10K
|
||||
sha=`do_sha1 disk1.vmdk`
|
||||
echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf
|
||||
cp ../test-v2v-i-ova-formats.ovf .
|
||||
|
||||
@@ -42,7 +42,7 @@ mkdir $d
|
||||
|
||||
pushd $d
|
||||
|
||||
truncate -s 10k disk1.vmdk
|
||||
guestfish disk-create disk1.vmdk raw 10K
|
||||
gzip disk1.vmdk
|
||||
sha=`do_sha1 disk1.vmdk.gz`
|
||||
echo -e "SHA1(disk1.vmdk.gz)= $sha\r" > disk1.mf
|
||||
|
||||
@@ -44,7 +44,7 @@ cp test-v2v-i-ova-subfolders.ovf $d/subfolder/
|
||||
|
||||
pushd $d/subfolder
|
||||
|
||||
truncate -s 10k disk1.vmdk
|
||||
guestfish disk-create disk1.vmdk raw 10K
|
||||
sha=`do_sha1 disk1.vmdk`
|
||||
echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ pushd $d
|
||||
|
||||
# Create a phony OVA. This is only a test of source parsing, not
|
||||
# conversion, so the contents of the disks doesn't matter.
|
||||
truncate -s 10k disk1.vmdk
|
||||
guestfish disk-create disk1.vmdk raw 10k
|
||||
sha=`do_sha1 disk1.vmdk`
|
||||
echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf
|
||||
cp ../test-v2v-i-ova-tar.ovf .
|
||||
|
||||
@@ -45,10 +45,10 @@ pushd $d
|
||||
|
||||
# Create a phony OVA. This is only a test of source parsing, not
|
||||
# conversion, so the contents of the disks doesn't matter.
|
||||
truncate -s 10k disk1.vmdk
|
||||
guestfish disk-create disk1.vmdk raw 10K
|
||||
sha=`do_sha1 disk1.vmdk`
|
||||
echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf
|
||||
truncate -s 100k disk2.vmdk
|
||||
guestfish disk-create disk2.vmdk raw 100K
|
||||
sha=`do_sha1 disk2.vmdk`
|
||||
echo -e "SHA1(disk2.vmdk)= $sha\r" > disk2.mf
|
||||
cp ../test-v2v-i-ova-two-disks.ovf .
|
||||
|
||||
Reference in New Issue
Block a user