[Qemu-devel] [PATCH] iotests: Skip 233 if certtool not installed

Eric Blake posted 1 patch 5 years, 5 months ago
Test asan passed
Test checkpatch passed
Test docker-quick@centos7 passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181120225241.2371769-1-eblake@redhat.com
tests/qemu-iotests/common.tls | 3 +++
1 file changed, 3 insertions(+)
[Qemu-devel] [PATCH] iotests: Skip 233 if certtool not installed
Posted by Eric Blake 5 years, 5 months ago
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.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
---

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(+)

diff --git a/tests/qemu-iotests/common.tls b/tests/qemu-iotests/common.tls
index 39f17c1b999..eae81789bbc 100644
--- a/tests/qemu-iotests/common.tls
+++ b/tests/qemu-iotests/common.tls
@@ -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
-- 
2.17.2


Re: [Qemu-devel] [PATCH] iotests: Skip 233 if certtool not installed
Posted by Eric Blake 5 years, 5 months ago
On 11/20/18 4:52 PM, Eric Blake wrote:
> 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.
> 
> Reported-by: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> 
> On Fedora, libvirt requires libtls-utils to be present, but not qemu.

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

> 
> 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.
-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] iotests: Skip 233 if certtool not installed
Posted by Kevin Wolf 5 years, 5 months ago
Am 20.11.2018 um 23:52 hat Eric Blake geschrieben:
> 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.
> 
> Reported-by: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>

Thanks, applied to the block branch.

Kevin

Re: [Qemu-devel] [PATCH] iotests: Skip 233 if certtool not installed
Posted by Wainer dos Santos Moschetta 5 years, 5 months ago

On 11/20/2018 08:52 PM, Eric Blake wrote:
> 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.
>
> Reported-by: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>

> ---
>
> 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(+)
>
> diff --git a/tests/qemu-iotests/common.tls b/tests/qemu-iotests/common.tls
> index 39f17c1b999..eae81789bbc 100644
> --- a/tests/qemu-iotests/common.tls
> +++ b/tests/qemu-iotests/common.tls
> @@ -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


Re: [Qemu-devel] [Qemu-block] [PATCH] iotests: Skip 233 if certtool not installed
Posted by John Snow 5 years, 5 months ago

On 11/20/18 5:52 PM, Eric Blake wrote:
> 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.
> 
> Reported-by: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>

Reviewed-by: John Snow <jsnow@redhat.com>

> ---
> 
> 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(+)
> 
> diff --git a/tests/qemu-iotests/common.tls b/tests/qemu-iotests/common.tls
> index 39f17c1b999..eae81789bbc 100644
> --- a/tests/qemu-iotests/common.tls
> +++ b/tests/qemu-iotests/common.tls
> @@ -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 :)

>      mkdir -p "${tls_dir}"
> 
>      # use a fixed key so we don't waste system entropy on
> 


Re: [Qemu-devel] [PATCH] iotests: Skip 233 if certtool not installed
Posted by Daniel P. Berrangé 5 years, 5 months ago
On Tue, Nov 20, 2018 at 04:52:41PM -0600, Eric Blake wrote:
> 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.
> 
> Reported-by: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> 
> 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(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: 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 :|