From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AAC04A04FF; Tue, 22 Mar 2022 07:11:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A742427ED; Tue, 22 Mar 2022 07:11:06 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 263CC410E5; Tue, 22 Mar 2022 07:11:05 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2900B20DE47C; Mon, 21 Mar 2022 23:11:04 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2900B20DE47C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1647929464; bh=MP4hlpv1CSpetIQtAe2BNAQWnPYvkVCZWbelkK5gYIk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZoqO8RdU+l7KWOCg6tixYVwZBP2WCctx+DNmy2vt0SI1pZXgScVYCFsoQkPEFPE9e XQTwxZLbG0aEmHXK1vzv4XwQMACdcBb15cpMms6mOJsPBwrcdRexXPQLiXauajmZvc 5REX5k+uaYkChtZkRbwV3FgnrCdIcvbQ1HyM+jl8= Date: Mon, 21 Mar 2022 23:11:04 -0700 From: Tyler Retzlaff To: "Ananyev, Konstantin" Cc: "dev@dpdk.org" , "stephen@networkplumber.org" , "Burakov, Anatoly" , "stable@dpdk.org" Subject: Re: [PATCH] test/bpf: skip test if libpcap is unavailable Message-ID: <20220322061104.GA21568@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1647868407-4467-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Mar 21, 2022 at 02:42:39PM +0000, Ananyev, Konstantin wrote: > > > > > Signed-off-by: Tyler Retzlaff > > --- > > app/test/test_bpf.c | 14 ++++++++++++-- > > 1 file changed, 12 insertions(+), 2 deletions(-) > > > > diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c > > index 805cce6..de1fa87 100644 > > --- a/app/test/test_bpf.c > > +++ b/app/test/test_bpf.c > > @@ -3264,7 +3264,16 @@ struct bpf_test { > > > > REGISTER_TEST_COMMAND(bpf_autotest, test_bpf); > > > > -#ifdef RTE_HAS_LIBPCAP > > +#ifndef RTE_HAS_LIBPCAP > > + > > +static int > > +test_bpf_convert(void) > > +{ > > + printf("BPF not supported, skipping test\n"); > > One nit: the message above seems a bit misleading... > Probably "LIBPCAP is not supported" or so? > With that fixed: > Acked-by: Konstantin Ananyev yeah, i cut and paste the other skip function. i agree i'll tweak the message to talk about libpcap. > > > > + return TEST_SKIPPED; > > +} > > + > > +#else > > #include > > > > static void > > @@ -3462,5 +3471,6 @@ struct bpf_test { > > return rc; > > } > > > > -REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert); > > #endif /* RTE_HAS_LIBPCAP */ > > + > > +REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert); > > -- > > 1.8.3.1