[Libguestfs] [nbdkit PATCH] tests: test-single: create the fake disk

Pino Toscano
2018-01-31T15:24:05Z

Make sure the fake disk exist, otherwise nbdkit fails.  Also, give the
fake disk a less generic file name.
---
 tests/test-single.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/test-single.sh b/tests/test-single.sh
index d60538d..9dc462b 100755
--- a/tests/test-single.sh
+++ b/tests/test-single.sh
@@ -45,11 +45,13 @@ if ! qemu-img --help >/dev/null; then
     exit 77
 fi

-files="single.sock"
+files="single.sock single.disk"
 rm -f $files

+truncate -s 1G single.disk
+
 socat unix-listen:single.sock,reuseaddr,fork \
-    exec:'nbdkit -r -s file file=disk' &
+    exec:'nbdkit -r -s file file=single.disk' &
 pid=$!

 cleanup ()
--
2.14.3