[PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING

Juan Quintela posted 8 patches 3 years, 5 months ago
[PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING
Posted by Juan Quintela 3 years, 5 months ago
With this change "make check" works when configured with --disable-keyring.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/unit/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index b497a41378..988aed27cb 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -78,7 +78,6 @@ if have_block
     'test-crypto-hmac': [crypto],
     'test-crypto-cipher': [crypto],
     'test-crypto-akcipher': [crypto],
-    'test-crypto-secret': [crypto, keyutils],
     'test-crypto-der': [crypto],
     'test-authz-simple': [authz],
     'test-authz-list': [authz],
@@ -122,6 +121,9 @@ if have_block
   if config_host_data.get('CONFIG_EPOLL_CREATE1')
     tests += {'test-fdmon-epoll': [testblock]}
   endif
+  if config_host_data.get('CONFIG_SECRET_KEYRING')
+    tests += {'test-crypto-secret': [crypto, keyutils]}
+  endif
 endif
 
 if have_system
-- 
2.37.2
Re: [PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING
Posted by Daniel P. Berrangé 3 years, 4 months ago
On Fri, Sep 02, 2022 at 06:51:26PM +0200, Juan Quintela wrote:
> With this change "make check" works when configured with --disable-keyring.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  tests/unit/meson.build | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/unit/meson.build b/tests/unit/meson.build
> index b497a41378..988aed27cb 100644
> --- a/tests/unit/meson.build
> +++ b/tests/unit/meson.build
> @@ -78,7 +78,6 @@ if have_block
>      'test-crypto-hmac': [crypto],
>      'test-crypto-cipher': [crypto],
>      'test-crypto-akcipher': [crypto],
> -    'test-crypto-secret': [crypto, keyutils],
>      'test-crypto-der': [crypto],
>      'test-authz-simple': [authz],
>      'test-authz-list': [authz],
> @@ -122,6 +121,9 @@ if have_block
>    if config_host_data.get('CONFIG_EPOLL_CREATE1')
>      tests += {'test-fdmon-epoll': [testblock]}
>    endif
> +  if config_host_data.get('CONFIG_SECRET_KEYRING')
> +    tests += {'test-crypto-secret': [crypto, keyutils]}
> +  endif
>  endif

This is not right, as it disables testing on all non-Linux platforms.
The code in test-crypto-secret is already conditional on CONFIG_KEYUTILS
so it can run on all platforms. The code just needs changing to be using
CONFIG_SECRET_KEYRING instead of CONFIG_KEYUTILS as the former is more
general. Don't touch the meson rules at all.


With 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 :|
Re: [PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING
Posted by Thomas Huth 3 years, 4 months ago
On 02/09/2022 18.51, Juan Quintela wrote:
> With this change "make check" works when configured with --disable-keyring.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>   tests/unit/meson.build | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/unit/meson.build b/tests/unit/meson.build
> index b497a41378..988aed27cb 100644
> --- a/tests/unit/meson.build
> +++ b/tests/unit/meson.build
> @@ -78,7 +78,6 @@ if have_block
>       'test-crypto-hmac': [crypto],
>       'test-crypto-cipher': [crypto],
>       'test-crypto-akcipher': [crypto],
> -    'test-crypto-secret': [crypto, keyutils],
>       'test-crypto-der': [crypto],
>       'test-authz-simple': [authz],
>       'test-authz-list': [authz],
> @@ -122,6 +121,9 @@ if have_block
>     if config_host_data.get('CONFIG_EPOLL_CREATE1')
>       tests += {'test-fdmon-epoll': [testblock]}
>     endif
> +  if config_host_data.get('CONFIG_SECRET_KEYRING')
> +    tests += {'test-crypto-secret': [crypto, keyutils]}
> +  endif
>   endif
>   
>   if have_system

Reviewed-by: Thomas Huth <thuth@redhat.com>