tests: Replace truncate command with 'guestfish sparse'.

RHEL 5 didn't have the truncate command, but we can replace:

  truncate -s SIZE FILE

with the roughly equivalent command:

  guestfish sparse FILE SIZE
This commit is contained in:
Richard W.M. Jones
2012-06-18 13:04:46 +01:00
parent 4846b84476
commit 39df80dcc0
6 changed files with 13 additions and 7 deletions

View File

@@ -24,7 +24,10 @@ rm -f test1.img test2.img test3.img test4.img test.xml test.out
cwd="$(pwd)"
truncate -s 1M test1.img test2.img test3.img test4.img
./guestfish sparse test1.img 1M
./guestfish sparse test2.img 1M
./guestfish sparse test3.img 1M
./guestfish sparse test4.img 1M
# Libvirt test XML, see libvirt.git/examples/xml/test/testnode.xml
cat > test.xml <<EOF

View File

@@ -24,7 +24,10 @@ rm -f test1.img test2.img test3.img test4.img test.xml test.out
cwd="$(pwd)"
truncate -s 1M test1.img test2.img test3.img test4.img
./guestfish sparse test1.img 1M
./guestfish sparse test2.img 1M
./guestfish sparse test3.img 1M
./guestfish sparse test4.img 1M
# Libvirt test XML, see libvirt.git/examples/xml/test/testnode.xml
cat > test.xml <<EOF