diff mbox

qtest: fix make check complaint in crypto module

Message ID 1474526149-318028-1-git-send-email-arei.gonglei@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gonglei (Arei) Sept. 22, 2016, 6:35 a.m. UTC
CC    tests/test-crypto-tlscredsx509.o
  CC    tests/crypto-tls-x509-helpers.o
  CC    tests/pkix_asn1_tab.o
tests/pkix_asn1_tab.c:7:22: warning: libtasn1.h: No such file or directory
tests/pkix_asn1_tab.c:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pkix_asn1_tab’
make: *** [tests/pkix_asn1_tab.o] Error 1

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 tests/Makefile.include | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Daniel P. Berrangé Sept. 22, 2016, 8:12 a.m. UTC | #1
On Thu, Sep 22, 2016 at 02:35:49PM +0800, Gonglei wrote:
>   CC    tests/test-crypto-tlscredsx509.o
>   CC    tests/crypto-tls-x509-helpers.o
>   CC    tests/pkix_asn1_tab.o
> tests/pkix_asn1_tab.c:7:22: warning: libtasn1.h: No such file or directory
> tests/pkix_asn1_tab.c:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pkix_asn1_tab’
> make: *** [tests/pkix_asn1_tab.o] Error 1
> 
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  tests/Makefile.include | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index e560ecb..ad6950f 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -92,8 +92,10 @@ gcov-files-test-write-threshold-y = block/write-threshold.c
>  check-unit-y += tests/test-crypto-hash$(EXESUF)
>  check-unit-y += tests/test-crypto-cipher$(EXESUF)
>  check-unit-y += tests/test-crypto-secret$(EXESUF)
> +ifeq ($(CONFIG_TASN1),y)
>  check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlscredsx509$(EXESUF)
>  check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlssession$(EXESUF)
> +endif

We already check this condition in tests/crypto-tls-x509-helpers.h  and
.c files should conditionalize themselves with

   #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT

the tests/pkix_asn1_tab.c file is just missing that check

Regards,
Daniel
Gonglei (Arei) Sept. 22, 2016, 8:43 a.m. UTC | #2
> -----Original Message-----

> From: Daniel P. Berrange [mailto:berrange@redhat.com]

> Sent: Thursday, September 22, 2016 4:12 PM

> To: Gonglei (Arei)

> Cc: qemu-devel@nongnu.org; Wubin (H)

> Subject: Re: [PATCH] qtest: fix make check complaint in crypto module

> 

> On Thu, Sep 22, 2016 at 02:35:49PM +0800, Gonglei wrote:

> >   CC    tests/test-crypto-tlscredsx509.o

> >   CC    tests/crypto-tls-x509-helpers.o

> >   CC    tests/pkix_asn1_tab.o

> > tests/pkix_asn1_tab.c:7:22: warning: libtasn1.h: No such file or directory

> > tests/pkix_asn1_tab.c:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or

> ‘__attribute__’ before ‘pkix_asn1_tab’

> > make: *** [tests/pkix_asn1_tab.o] Error 1

> >

> > Signed-off-by: Gonglei <arei.gonglei@huawei.com>

> > ---

> >  tests/Makefile.include | 4 ++++

> >  1 file changed, 4 insertions(+)

> >

> > diff --git a/tests/Makefile.include b/tests/Makefile.include

> > index e560ecb..ad6950f 100644

> > --- a/tests/Makefile.include

> > +++ b/tests/Makefile.include

> > @@ -92,8 +92,10 @@ gcov-files-test-write-threshold-y =

> block/write-threshold.c

> >  check-unit-y += tests/test-crypto-hash$(EXESUF)

> >  check-unit-y += tests/test-crypto-cipher$(EXESUF)

> >  check-unit-y += tests/test-crypto-secret$(EXESUF)

> > +ifeq ($(CONFIG_TASN1),y)

> >  check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlscredsx509$(EXESUF)

> >  check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlssession$(EXESUF)

> > +endif

> 

> We already check this condition in tests/crypto-tls-x509-helpers.h  and

> .c files should conditionalize themselves with

> 

>    #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT

> 

> the tests/pkix_asn1_tab.c file is just missing that check

> 


Yes, I see it.

Regards,
-Gonglei

> Regards,

> Daniel

> --

> |: http://berrange.com      -o-

> http://www.flickr.com/photos/dberrange/ :|

> |: http://libvirt.org              -o-

> http://virt-manager.org :|

> |: http://autobuild.org       -o-

> http://search.cpan.org/~danberr/ :|

> |: http://entangle-photo.org       -o-

> http://live.gnome.org/gtk-vnc :|
diff mbox

Patch

diff --git a/tests/Makefile.include b/tests/Makefile.include
index e560ecb..ad6950f 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -92,8 +92,10 @@  gcov-files-test-write-threshold-y = block/write-threshold.c
 check-unit-y += tests/test-crypto-hash$(EXESUF)
 check-unit-y += tests/test-crypto-cipher$(EXESUF)
 check-unit-y += tests/test-crypto-secret$(EXESUF)
+ifeq ($(CONFIG_TASN1),y)
 check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlscredsx509$(EXESUF)
 check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlssession$(EXESUF)
+endif
 ifneq (,$(findstring qemu-ga,$(TOOLS)))
 check-unit-$(CONFIG_LINUX) += tests/test-qga$(EXESUF)
 endif
@@ -101,7 +103,9 @@  check-unit-y += tests/test-timed-average$(EXESUF)
 check-unit-y += tests/test-io-task$(EXESUF)
 check-unit-y += tests/test-io-channel-socket$(EXESUF)
 check-unit-y += tests/test-io-channel-file$(EXESUF)
+ifeq ($(CONFIG_TASN1),y)
 check-unit-$(CONFIG_GNUTLS) += tests/test-io-channel-tls$(EXESUF)
+endif
 check-unit-y += tests/test-io-channel-command$(EXESUF)
 check-unit-y += tests/test-io-channel-buffer$(EXESUF)
 check-unit-y += tests/test-base64$(EXESUF)