Skip to contentSkip to conversation

iotests: Skip 233 if certtool not installed

PATCH Applied Eric Blake 5 participants 6 messages Nov 20, 2018 – Nov 21, 2018

lore
Share & tools
lore

Eric Blake

author
#0 lore raw

PATCH 1/1 iotests: Skip 233 if certtool not installed

The use of TLS while building qemu is optional. While the 'certtool' binary should be available on every platform that supports building against TLS, that does not imply that the developer has installed it. Make the test gracefully skip in that case.

---

On Fedora, libvirt requires libtls-utils to be present, but not qemu.

I'm fine if Kevin wants to pick this up in a pull request related to iotests in general; if not, I'll do a pull request through my NBD tree in time for -rc3.

 tests/qemu-iotests/common.tls | 3 +++
 1 file changed, 3 insertions(+)
tests/qemu-iotests/common.tls +3 -0
index 39f17c1b999..eae81789bbc 100644
@@ -31,6 +31,9 @@ tls_x509_cleanup()
 
 tls_x509_init()
 {
+    (certtool --help) >/dev/null 2>&1 || \
+	_notrun "certtool utility not found, skipping test"
+
     mkdir -p "${tls_dir}"
 
     # use a fixed key so we don't waste system entropy on
Signature · 1 line
2.17.2
author
#1 lore raw
Quoted 11 lines · Eric Blake

The use of TLS while building qemu is optional. While the 'certtool' binary should be available on every platform that supports building against TLS, that does not imply that the developer has installed it. Make the test gracefully skip in that case.

---

On Fedora, libvirt requires libtls-utils to be present, but not qemu.

Sorry for the typo; certtool is part of gnutls-utils

Quoted 4 lines

I'm fine if Kevin wants to pick this up in a pull request related to iotests in general; if not, I'll do a pull request through my NBD tree in time for -rc3.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
Reviewed-by on v1 1/1
#2 lore raw
In reply to Eric Blake
Quoted 8 lines · Eric Blake

The use of TLS while building qemu is optional. While the 'certtool' binary should be available on every platform that supports building against TLS, that does not imply that the developer has installed it. Make the test gracefully skip in that case.

Quoted 16 lines

---

On Fedora, libvirt requires libtls-utils to be present, but not qemu.

I'm fine if Kevin wants to pick this up in a pull request related to iotests in general; if not, I'll do a pull request through my NBD tree in time for -rc3.

 tests/qemu-iotests/common.tls | 3 +++
 1 file changed, 3 insertions(+)
tests/qemu-iotests/common.tls +0 -0
index 39f17c1b999..eae81789bbc 100644

tests/qemu-iotests/common.tls tls_x509_cleanup() · line 36

Quoted 6 lines
tests/qemu-iotests/common.tls +3 -0
@@ -31,6 +31,9 @@ tls_x509_cleanup()
 
 tls_x509_init()
 {
+    (certtool --help) >/dev/null 2>&1 || \
+	_notrun "certtool utility not found, skipping test"
+

Or something wickedly foul has happened :)

Quoted 4 lines
tests/qemu-iotests/common.tls +0 -0
     mkdir -p "${tls_dir}"
 
     # use a fixed key so we don't waste system entropy on
Applied
#3 lore raw
In reply to Eric Blake

Am 20.11.2018 um 23:52 hat Eric Blake geschrieben:

Quoted 8 lines

The use of TLS while building qemu is optional. While the 'certtool' binary should be available on every platform that supports building against TLS, that does not imply that the developer has installed it. Make the test gracefully skip in that case.

Thanks, applied to the block branch.

Kevin

Reviewed-by on v1 1/1
#4 lore raw
In reply to Eric Blake
Quoted 10 lines · Eric Blake

The use of TLS while building qemu is optional. While the 'certtool' binary should be available on every platform that supports building against TLS, that does not imply that the developer has installed it. Make the test gracefully skip in that case.

---

Quoted 8 lines

On Fedora, libvirt requires libtls-utils to be present, but not qemu.

I'm fine if Kevin wants to pick this up in a pull request related to iotests in general; if not, I'll do a pull request through my NBD tree in time for -rc3.

 tests/qemu-iotests/common.tls | 3 +++
 1 file changed, 3 insertions(+)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 1/1
#5 lore raw
In reply to Eric Blake
Quoted 8 lines · Eric Blake

The use of TLS while building qemu is optional. While the 'certtool' binary should be available on every platform that supports building against TLS, that does not imply that the developer has installed it. Make the test gracefully skip in that case.

Quoted 25 lines

---

On Fedora, libvirt requires libtls-utils to be present, but not qemu.

I'm fine if Kevin wants to pick this up in a pull request related to iotests in general; if not, I'll do a pull request through my NBD tree in time for -rc3.

  tests/qemu-iotests/common.tls | 3 +++
  1 file changed, 3 insertions(+)
tests/qemu-iotests/common.tls +3 -0
index 39f17c1b999..eae81789bbc 100644
@@ -31,6 +31,9 @@ tls_x509_cleanup()
 
  tls_x509_init()
  {
+    (certtool --help) >/dev/null 2>&1 || \
+	_notrun "certtool utility not found, skipping test"
+
      mkdir -p "${tls_dir}"
 
      # use a fixed key so we don't waste system entropy on