[dpdk-dev] [PATCH v2 1/2] devtools: restore null test
David Marchand
david.marchand at redhat.com
Mon Jul 29 14:53:07 CEST 2019
On Mon, Jul 29, 2019 at 2:16 PM Thomas Monjalon <thomas at monjalon.net> wrote:
>
> 29/07/2019 12:35, David Marchand:
> > On Wed, Jul 17, 2019 at 5:53 PM Thomas Monjalon <thomas at monjalon.net> wrote:
> > > --- a/devtools/test-null.sh
> > > +++ b/devtools/test-null.sh
> > > -if grep -q SHARED_LIB=y $build/.config; then
> > > - pmd='-d librte_pmd_null.so'
> > > +testpmd=$build/app/dpdk-testpmd
> > > +[ -f "$testpmd" ] || testpmd=$build/app/testpmd
> > > +if [ ! -f "$testpmd" ] ; then
> >
> > You don't really care that testpmd is a file, prefer -e.
>
> Yes I care, I want to avoid finding a directory.
Ok, as long as we don't hit symbolic links.
>
> > > + echo 'ERROR: testpmd cannot be found' >&2
> > > + exit 1
> > > +fi
> > > +
> > > +unset libs
> >
> > You reference it later, I suppose you meant libs=
>
> I think "unset libs" is the standard syntax to initialize a variable
> to an empty value.
Nop, unset and initialising to empty are different, but the way you
use this works.
> > > +if ldd $testpmd | grep -q librte_ ; then
> > > + libs='-d librte_mempool_ring.so -d librte_pmd_null.so'
> > > fi
>
>
--
David Marchand
More information about the dev
mailing list