[nbdkit PATCH] tests: test-single: create the fake disk
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
On Wed, Jan 31, 2018 at 04:24:05PM +0100, Pino Toscano wrote:
Make sure the fake disk exist, otherwise nbdkit fails. Also, give the fake disk a less generic file name.
The fix is fine but this description is wrong. The actual problem is you don't have guestfish installed, which is required to build ‘disk’. However ‘test-single.sh’ is outside the automake conditional for HAVE_GUESTFISH, so the test can run without ‘disk’ having been created. ACK, but with the description fixed to reflect what's really going on. There may be other tests which are similarly broken, I didn't check. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Wednesday, 31 January 2018 16:35:34 CET Richard W.M. Jones wrote:
On Wed, Jan 31, 2018 at 04:24:05PM +0100, Pino Toscano wrote:
Make sure the fake disk exist, otherwise nbdkit fails. Also, give the fake disk a less generic file name.
The fix is fine but this description is wrong.
The actual problem is you don't have guestfish installed, which is required to build ‘disk’. However ‘test-single.sh’ is outside the automake conditional for HAVE_GUESTFISH, so the test can run without ‘disk’ having been created.
Yes, I discovered that right after sending the patch.
ACK, but with the description fixed to reflect what's really going on.
What about the following commit message: "tests: test-single: use an own fake disk Instead of rely on the disk created as test data in the Makefile, use a simple fake disk created inside the test itself. This fixes test-single.sh when at least one between gzip and guestfish was not found." Thanks, -- Pino Toscano
On Wed, Jan 31, 2018 at 04:43:16PM +0100, Pino Toscano wrote:
On Wednesday, 31 January 2018 16:35:34 CET Richard W.M. Jones wrote:
On Wed, Jan 31, 2018 at 04:24:05PM +0100, Pino Toscano wrote:
Make sure the fake disk exist, otherwise nbdkit fails. Also, give the fake disk a less generic file name.
The fix is fine but this description is wrong.
The actual problem is you don't have guestfish installed, which is required to build ‘disk’. However ‘test-single.sh’ is outside the automake conditional for HAVE_GUESTFISH, so the test can run without ‘disk’ having been created.
Yes, I discovered that right after sending the patch.
ACK, but with the description fixed to reflect what's really going on.
What about the following commit message:
"tests: test-single: use an own fake disk
Instead of rely on the disk created as test data in the Makefile, use a simple fake disk created inside the test itself. This fixes test-single.sh when at least one between gzip and guestfish was not found."
OK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
participants (2)
-
Pino Toscano -
Richard W.M. Jones