diff mbox series

[11/16] meson: disable crypto tests are empty under win32

Message ID 20200908194820.702-12-luoyonggang@gmail.com (mailing list archive)
State New, archived
Headers show
Series W32, W64 patches | expand

Commit Message

Yonggang Luo Sept. 8, 2020, 7:48 p.m. UTC
Disable following tests on msys2/mingw
      'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
                                   tasn1, crypto],
      'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
                                 tasn1, crypto],
      'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
                              tasn1, io, crypto]}

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 tests/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Huth Sept. 9, 2020, 8:07 a.m. UTC | #1
On 08/09/2020 21.48, Yonggang Luo wrote:
> Disable following tests on msys2/mingw
>       'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
>                                    tasn1, crypto],
>       'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
>                                  tasn1, crypto],
>       'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
>                               tasn1, io, crypto]}
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  tests/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/meson.build b/tests/meson.build
> index 998e4c48f9..b470a90e3a 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -145,7 +145,8 @@ if have_block
>      'test-crypto-block': [io],
>    }
>    if 'CONFIG_GNUTLS' in config_host and \
> -     'CONFIG_TASN1' in config_host
> +     'CONFIG_TASN1' in config_host and \
> +     'CONFIG_POSIX' in config_host
>      tests += {
>        'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
>                                     tasn1, crypto],
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé Sept. 9, 2020, 8:10 a.m. UTC | #2
On Wed, Sep 09, 2020 at 03:48:15AM +0800, Yonggang Luo wrote:
> Disable following tests on msys2/mingw
>       'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
>                                    tasn1, crypto],
>       'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
>                                  tasn1, crypto],
>       'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
>                               tasn1, io, crypto]}

Why ?   GNUTLS is available on Windows and if it is enabled
at build time, then we should certainly be running the tests.

> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  tests/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/meson.build b/tests/meson.build
> index 998e4c48f9..b470a90e3a 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -145,7 +145,8 @@ if have_block
>      'test-crypto-block': [io],
>    }
>    if 'CONFIG_GNUTLS' in config_host and \
> -     'CONFIG_TASN1' in config_host
> +     'CONFIG_TASN1' in config_host and \
> +     'CONFIG_POSIX' in config_host
>      tests += {
>        'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
>                                     tasn1, crypto],
> -- 
> 2.28.0.windows.1
> 
> 

Regards,
Daniel
Yonggang Luo Sept. 9, 2020, 8:17 a.m. UTC | #3
On Wed, Sep 9, 2020 at 4:11 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> On Wed, Sep 09, 2020 at 03:48:15AM +0800, Yonggang Luo wrote:
> > Disable following tests on msys2/mingw
> >       'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c',
> 'pkix_asn1_tab.c',
> >                                    tasn1, crypto],
> >       'test-crypto-tlssession': ['crypto-tls-x509-helpers.c',
> 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
> >                                  tasn1, crypto],
> >       'test-io-channel-tls': ['io-channel-helpers.c',
> 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
> >                               tasn1, io, crypto]}
>
> Why ?   GNUTLS is available on Windows and if it is enabled
> at build time, then we should certainly be running the tests.
>

Don't know why., the header disable it totally. and it's requires
CONFIG_TASN1, don't know if  CONFIG_TASN1 works under win32
```
#ifndef TESTS_CRYPTO_TLS_X509_HELPERS_H
#define TESTS_CRYPTO_TLS_X509_HELPERS_H

#include <gnutls/gnutls.h>
#include <gnutls/x509.h>

#if !(defined WIN32) && \
    defined(CONFIG_TASN1)
# define QCRYPTO_HAVE_TLS_TEST_SUPPORT
#endif

#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
# include <libtasn1.h>
```




>
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> >  tests/meson.build | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/meson.build b/tests/meson.build
> > index 998e4c48f9..b470a90e3a 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -145,7 +145,8 @@ if have_block
> >      'test-crypto-block': [io],
> >    }
> >    if 'CONFIG_GNUTLS' in config_host and \
> > -     'CONFIG_TASN1' in config_host
> > +     'CONFIG_TASN1' in config_host and \
> > +     'CONFIG_POSIX' in config_host
> >      tests += {
> >        'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c',
> 'pkix_asn1_tab.c',
> >                                     tasn1, crypto],
> > --
> > 2.28.0.windows.1
> >
> >
>
> 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 :|
>
>
Daniel P. Berrangé Sept. 9, 2020, 8:22 a.m. UTC | #4
On Wed, Sep 09, 2020 at 04:17:22PM +0800, 罗勇刚(Yonggang Luo) wrote:
> On Wed, Sep 9, 2020 at 4:11 PM Daniel P. Berrangé <berrange@redhat.com>
> wrote:
> 
> > On Wed, Sep 09, 2020 at 03:48:15AM +0800, Yonggang Luo wrote:
> > > Disable following tests on msys2/mingw
> > >       'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c',
> > 'pkix_asn1_tab.c',
> > >                                    tasn1, crypto],
> > >       'test-crypto-tlssession': ['crypto-tls-x509-helpers.c',
> > 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
> > >                                  tasn1, crypto],
> > >       'test-io-channel-tls': ['io-channel-helpers.c',
> > 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
> > >                               tasn1, io, crypto]}
> >
> > Why ?   GNUTLS is available on Windows and if it is enabled
> > at build time, then we should certainly be running the tests.
> >
> 
> Don't know why., the header disable it totally.

Yes, I know the source disables it, because it creates various
files and no effort has been made to use WIndows filename
building code.

Given that it is already disabled in the source, why do we need
to disable it a second time in meson.build ?

Regards,
Daniel
Yonggang Luo Sept. 9, 2020, 8:30 a.m. UTC | #5
On Wed, Sep 9, 2020 at 4:22 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> On Wed, Sep 09, 2020 at 04:17:22PM +0800, 罗勇刚(Yonggang Luo) wrote:
> > On Wed, Sep 9, 2020 at 4:11 PM Daniel P. Berrangé <berrange@redhat.com>
> > wrote:
> >
> > > On Wed, Sep 09, 2020 at 03:48:15AM +0800, Yonggang Luo wrote:
> > > > Disable following tests on msys2/mingw
> > > >       'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c',
> > > 'pkix_asn1_tab.c',
> > > >                                    tasn1, crypto],
> > > >       'test-crypto-tlssession': ['crypto-tls-x509-helpers.c',
> > > 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
> > > >                                  tasn1, crypto],
> > > >       'test-io-channel-tls': ['io-channel-helpers.c',
> > > 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
> > > >                               tasn1, io, crypto]}
> > >
> > > Why ?   GNUTLS is available on Windows and if it is enabled
> > > at build time, then we should certainly be running the tests.
> > >
> >
> > Don't know why., the header disable it totally.
>
> Yes, I know the source disables it, because it creates various
> files and no effort has been made to use WIndows filename
> building code.
>
> Given that it is already disabled in the source, why do we need
> to disable it a second time in meson.build ?
>
Because when there is no testcase ,the test runner would complain
ERROR - missing test plan


>
> 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 :|
>
>
Daniel P. Berrangé Sept. 9, 2020, 8:39 a.m. UTC | #6
On Wed, Sep 09, 2020 at 04:30:26PM +0800, 罗勇刚(Yonggang Luo) wrote:
> On Wed, Sep 9, 2020 at 4:22 PM Daniel P. Berrangé <berrange@redhat.com>
> wrote:
> 
> > On Wed, Sep 09, 2020 at 04:17:22PM +0800, 罗勇刚(Yonggang Luo) wrote:
> > > On Wed, Sep 9, 2020 at 4:11 PM Daniel P. Berrangé <berrange@redhat.com>
> > > wrote:
> > >
> > > > On Wed, Sep 09, 2020 at 03:48:15AM +0800, Yonggang Luo wrote:
> > > > > Disable following tests on msys2/mingw
> > > > >       'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c',
> > > > 'pkix_asn1_tab.c',
> > > > >                                    tasn1, crypto],
> > > > >       'test-crypto-tlssession': ['crypto-tls-x509-helpers.c',
> > > > 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
> > > > >                                  tasn1, crypto],
> > > > >       'test-io-channel-tls': ['io-channel-helpers.c',
> > > > 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
> > > > >                               tasn1, io, crypto]}
> > > >
> > > > Why ?   GNUTLS is available on Windows and if it is enabled
> > > > at build time, then we should certainly be running the tests.
> > > >
> > >
> > > Don't know why., the header disable it totally.
> >
> > Yes, I know the source disables it, because it creates various
> > files and no effort has been made to use WIndows filename
> > building code.
> >
> > Given that it is already disabled in the source, why do we need
> > to disable it a second time in meson.build ?
> >
> Because when there is no testcase ,the test runner would complain
> ERROR - missing test plan

Ok, please say that in the commit message to explain why the change
is needed.

Regards,
Daniel
diff mbox series

Patch

diff --git a/tests/meson.build b/tests/meson.build
index 998e4c48f9..b470a90e3a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -145,7 +145,8 @@  if have_block
     'test-crypto-block': [io],
   }
   if 'CONFIG_GNUTLS' in config_host and \
-     'CONFIG_TASN1' in config_host
+     'CONFIG_TASN1' in config_host and \
+     'CONFIG_POSIX' in config_host
     tests += {
       'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
                                    tasn1, crypto],