From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id A3A74A0487
	for <public@inbox.dpdk.org>; Mon, 29 Jul 2019 14:53:21 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 7D1A21BF80;
	Mon, 29 Jul 2019 14:53:20 +0200 (CEST)
Received: from mail-ua1-f66.google.com (mail-ua1-f66.google.com
 [209.85.222.66]) by dpdk.org (Postfix) with ESMTP id 40FCB1BF75
 for <dev@dpdk.org>; Mon, 29 Jul 2019 14:53:19 +0200 (CEST)
Received: by mail-ua1-f66.google.com with SMTP id v18so23882471uad.12
 for <dev@dpdk.org>; Mon, 29 Jul 2019 05:53:19 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=HMNq3K+q7/nBFGW4QGwnDJRCWTdvQxn2EcyftyiIwgU=;
 b=sKh2cbYjtlJS2yusPhjU0uyymLu4NijErkYynUUgtF3Foe7VEFnIhASsnlYYs4uBTd
 LDZLeVmNoeJcyH9E663rqH0AenXxQb3meyzVRn/SuVXIvAfJbJxy2y4kklI+Ta0W0PtY
 tRePvb1F96mfM9nQQkw1wWlK8LdNL9+TsZZpPg7gcBY+3s51m6Dvx25bbtvUFRcDUSr1
 tKwiHa6DhZVglyc3y+qR5P+FagIPxFQxvVGR+XLRrZxlC+2eIs1xe/kbXTiI97Nhsr/O
 9hqssBFf7a+QwuNHSwm0jNyy4DElec2dFmDditpYdrh3vO68wXNP4yWgRoL0GL/zKEyR
 zCyw==
X-Gm-Message-State: APjAAAUttIP4vnheQikdliHRCSCeYTPpPn8X+fA0aL1uAemm2/wctykb
 DPspKJR6J9gkSTeGOTHAqJL6tKkYw3BIDyoEIlPUkUjk
X-Google-Smtp-Source: APXvYqx1tkZmFUmCV7kKph4ngyM+ZXoQ7+vioFmkM5cBwwwlfE5nFk1eSFVUU21PZ4yFKdJzdezzaPYXf4AXC6beyrw=
X-Received: by 2002:ab0:168a:: with SMTP id e10mr20889332uaf.87.1564404798626; 
 Mon, 29 Jul 2019 05:53:18 -0700 (PDT)
MIME-Version: 1.0
References: <20190717112031.10968-1-thomas@monjalon.net>
 <20190717155202.1674-1-thomas@monjalon.net>
 <CAJFAV8ya4jcCqjRepWmoxQHaDpkXWLLa07Om39S-qRaZys=oAg@mail.gmail.com>
 <1605746.aTWFI4qxfl@xps>
In-Reply-To: <1605746.aTWFI4qxfl@xps>
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 29 Jul 2019 14:53:07 +0200
Message-ID: <CAJFAV8yX=SDg3AMwuJ-f62W3crwjm4XfYwMgWV4Rn90fTbM8WA@mail.gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev <dev@dpdk.org>
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH v2 1/2] devtools: restore null test
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Mon, Jul 29, 2019 at 2:16 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 29/07/2019 12:35, David Marchand:
> > On Wed, Jul 17, 2019 at 5:53 PM Thomas Monjalon <thomas@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