From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A3A74A0487 for ; 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 ; Mon, 29 Jul 2019 14:53:19 +0200 (CEST) Received: by mail-ua1-f66.google.com with SMTP id v18so23882471uad.12 for ; 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> <1605746.aTWFI4qxfl@xps> In-Reply-To: <1605746.aTWFI4qxfl@xps> From: David Marchand Date: Mon, 29 Jul 2019 14:53:07 +0200 Message-ID: To: Thomas Monjalon Cc: dev 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Jul 29, 2019 at 2:16 PM Thomas Monjalon wrote: > > 29/07/2019 12:35, David Marchand: > > On Wed, Jul 17, 2019 at 5:53 PM Thomas Monjalon 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