[Libguestfs] [libnbd PATCH] interop: Don't fail qemu tls testing if nbdkit was not installed

Eric Blake eblake at redhat.com
Wed May 22 16:24:23 UTC 2019


On Fedora 29, nbdkit-devel at 1.10.4 is too old for any of the
tests/Makefile.am actions to run, but this also means we don't create
any tls pki/ or keys.psk files that we then want to reuse during qemu
testing, as evidenced by 'make check' failures such as:

FAIL: interop-qemu-nbd-tls-certs
================================
qemu-nbd: Unable to access credentials /home/eblake/libnbd/tests/pki/ca-cert.pem: No such file or directory

For now, just hack out the qemu tests except under the same conditions
as the tls files get created. A better patch would generate the tls
files independently of nbdkit and/or qemu availability. Hence I'm just
throwing this out for discussion rather than actually pushing it.
---
 interop/Makefile.am | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/interop/Makefile.am b/interop/Makefile.am
index 16438dc..b0ee5a3 100644
--- a/interop/Makefile.am
+++ b/interop/Makefile.am
@@ -45,9 +45,22 @@ check_PROGRAMS += \
 	interop-qemu-nbd-tls-certs \
 	interop-qemu-nbd-tls-psk
 TESTS += \
-	interop-qemu-nbd \
-	interop-qemu-nbd-tls-certs \
+	interop-qemu-nbd
+
+# tls tests assume the pre-existence of files created in ../tests/Makefile.am,
+# so we can only run them under the same conditions used there
+if HAVE_NBDKIT
+if HAVE_GNUTLS
+if HAVE_CERTTOOL
+TESTS += \
+	interop-qemu-nbd-tls-certs
+endif
+if HAVE_PSKTOOL
+TESTS += \
 	interop-qemu-nbd-tls-psk
+endif
+endif
+endif

 interop_qemu_nbd_SOURCES = interop.c
 interop_qemu_nbd_CPPFLAGS = \
-- 
2.20.1




More information about the Libguestfs mailing list