[dpdk-dev] [PATCH] config: make libarchive optional

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Jun 14 11:50:44 CEST 2016


2016-06-14 11:33, Jan Viktorin:
> Thomas Monjalon <thomas.monjalon at 6wind.com> wrote:
> > +ifeq ($(CONFIG_RTE_APP_TEST_RESOURCE_TAR),y)
> > +$(eval $(call linked_tar_resource,test_resource_tar,test_resource.c))
> > +SRCS-y += test_pci.c
> > +$(eval $(call linked_tar_resource,test_pci_sysfs,test_pci_sysfs))
> > +LDLIBS += -larchive
> > +endif
> 
> I don't like this very much. I think, the linked_tar_resource can be
> disabled at the place of its definition. What about:
> 
> ifeq ($(CONFIG_RTE_APP_TEST_RESOURCE_TAR),y)
> define linked_tar_resource
> ...
> endef
> else
> linked_tar_resource =
> endif
> 
> ...
> 
> SRCS-$(CONFIG_RTE_APP_TEST_RESOURCE_TAR) += test_pci.c
> 
> ...
> 
> ifeq ($(CONFIG_RTE_APP_TEST_RESOURCE_TAR),y)
> LDLIBS += -larchive
> endif

Yes, that's better.

> > --- a/app/test/test_mp_secondary.c
> > +++ b/app/test/test_mp_secondary.c
> > @@ -245,6 +245,7 @@ run_object_creation_tests(void)
> >  	printf("# Checked rte_lpm_create() OK\n");
> >  #endif
> >  
> > +#ifdef RTE_APP_TEST_RESOURCE_TAR
> >  	/* Run a test_pci call */
> >  	if (test_pci() != 0) {
> >  		printf("PCI scan failed in secondary\n");
> > @@ -252,6 +253,7 @@ run_object_creation_tests(void)
> >  			return -1;
> >  	} else
> >  		printf("PCI scan succeeded in secondary\n");
> > +#endif
> 
> Is it right to call a test from another test? I think this is
> wrong... A user should first test the PCI and then the mp_seconday...
> Or?

:)
This is out of scope for this patch.
Yes this is a part of app/test/ which could be improved a lot.
We don't even have a maintainer for the autotest architecture.


More information about the dev mailing list