patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] test/bpf: skip test if libpcap is unavailable
@ 2022-03-21 13:13 Tyler Retzlaff
  2022-03-21 14:42 ` Ananyev, Konstantin
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2022-03-21 13:13 UTC (permalink / raw)
  To: dev; +Cc: stephen, anatoly.burakov, Tyler Retzlaff, stable

test_bpf_convert is being conditionally registered depending on the
presence of RTE_HAS_LIBPCAP except the UT unconditionally lists it as a
test to run.

when the UT runs test_bpf_convert test-dpdk can't find the registration
and assumes the DPDK_TEST environment variable hasn't been defined
resulting in test-dpdk dropping to interactive mode and subsequently
waiting for the remainder of the UT fast-test timeout period before
reporting the test as having timed out.

* unconditionally register test_bpf_convert
* if ! RTE_HAS_LIBPCAP provide a stub test_bpf_convert that reports the
  test is skipped similar to that done with the test_bpf test.

Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
Cc: stephen@networkplumber.org
Cc: anatoly.burakov@intel.com
Cc: stable@dpdk.org

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 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");
+	return TEST_SKIPPED;
+}
+
+#else
 #include <pcap/pcap.h>
 
 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] test/bpf: skip test if libpcap is unavailable
  2022-03-21 13:13 [PATCH] test/bpf: skip test if libpcap is unavailable Tyler Retzlaff
@ 2022-03-21 14:42 ` Ananyev, Konstantin
  2022-03-22  6:11   ` Tyler Retzlaff
  2022-03-21 16:15 ` Stephen Hemminger
  2022-03-22  7:12 ` [PATCH v2] " Tyler Retzlaff
  2 siblings, 1 reply; 9+ messages in thread
From: Ananyev, Konstantin @ 2022-03-21 14:42 UTC (permalink / raw)
  To: Tyler Retzlaff, dev; +Cc: stephen, Burakov, Anatoly, stable


> 
> test_bpf_convert is being conditionally registered depending on the
> presence of RTE_HAS_LIBPCAP except the UT unconditionally lists it as a
> test to run.
> 
> when the UT runs test_bpf_convert test-dpdk can't find the registration
> and assumes the DPDK_TEST environment variable hasn't been defined
> resulting in test-dpdk dropping to interactive mode and subsequently
> waiting for the remainder of the UT fast-test timeout period before
> reporting the test as having timed out.
> 
> * unconditionally register test_bpf_convert
> * if ! RTE_HAS_LIBPCAP provide a stub test_bpf_convert that reports the
>   test is skipped similar to that done with the test_bpf test.
> 
> Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
> Cc: stephen@networkplumber.org
> Cc: anatoly.burakov@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  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 <konstantin.ananyev@intel.com>


> +	return TEST_SKIPPED;
> +}
> +
> +#else
>  #include <pcap/pcap.h>
> 
>  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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] test/bpf: skip test if libpcap is unavailable
  2022-03-21 13:13 [PATCH] test/bpf: skip test if libpcap is unavailable Tyler Retzlaff
  2022-03-21 14:42 ` Ananyev, Konstantin
@ 2022-03-21 16:15 ` Stephen Hemminger
  2022-03-22  7:12 ` [PATCH v2] " Tyler Retzlaff
  2 siblings, 0 replies; 9+ messages in thread
From: Stephen Hemminger @ 2022-03-21 16:15 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dev, anatoly.burakov, stable

On Mon, 21 Mar 2022 06:13:27 -0700
Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:

> test_bpf_convert is being conditionally registered depending on the
> presence of RTE_HAS_LIBPCAP except the UT unconditionally lists it as a
> test to run.
> 
> when the UT runs test_bpf_convert test-dpdk can't find the registration
> and assumes the DPDK_TEST environment variable hasn't been defined
> resulting in test-dpdk dropping to interactive mode and subsequently
> waiting for the remainder of the UT fast-test timeout period before
> reporting the test as having timed out.
> 
> * unconditionally register test_bpf_convert
> * if ! RTE_HAS_LIBPCAP provide a stub test_bpf_convert that reports the
>   test is skipped similar to that done with the test_bpf test.
> 
> Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
> Cc: stephen@networkplumber.org
> Cc: anatoly.burakov@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

LGTM
Acked-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] test/bpf: skip test if libpcap is unavailable
  2022-03-21 14:42 ` Ananyev, Konstantin
@ 2022-03-22  6:11   ` Tyler Retzlaff
  0 siblings, 0 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2022-03-22  6:11 UTC (permalink / raw)
  To: Ananyev, Konstantin; +Cc: dev, stephen, Burakov, Anatoly, stable

On Mon, Mar 21, 2022 at 02:42:39PM +0000, Ananyev, Konstantin wrote:
> 
> > 
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> > ---
> >  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 <konstantin.ananyev@intel.com>

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 <pcap/pcap.h>
> > 
> >  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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] test/bpf: skip test if libpcap is unavailable
  2022-03-21 13:13 [PATCH] test/bpf: skip test if libpcap is unavailable Tyler Retzlaff
  2022-03-21 14:42 ` Ananyev, Konstantin
  2022-03-21 16:15 ` Stephen Hemminger
@ 2022-03-22  7:12 ` Tyler Retzlaff
  2022-03-22 11:50   ` Ananyev, Konstantin
  2022-04-26  7:41   ` David Marchand
  2 siblings, 2 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2022-03-22  7:12 UTC (permalink / raw)
  To: dev; +Cc: Tyler Retzlaff, stephen, anatoly.burakov, stable

test_bpf_convert is being conditionally registered depending on the
presence of RTE_HAS_LIBPCAP except the UT unconditionally lists it as a
test to run.

when the UT runs test_bpf_convert test-dpdk can't find the registration
and assumes the DPDK_TEST environment variable hasn't been defined
resulting in test-dpdk dropping to interactive mode and subsequently
waiting for the remainder of the UT fast-test timeout period before
reporting the test as having timed out.

* unconditionally register test_bpf_convert
* if ! RTE_HAS_LIBPCAP provide a stub test_bpf_convert that reports the
  test is skipped similar to that done with the test_bpf test.

Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
Cc: stephen@networkplumber.org
Cc: anatoly.burakov@intel.com
Cc: stable@dpdk.org

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 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..97f5008 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 convert RTE_HAS_LIBPCAP is undefined, skipping test\n");
+	return TEST_SKIPPED;
+}
+
+#else
 #include <pcap/pcap.h>
 
 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH v2] test/bpf: skip test if libpcap is unavailable
  2022-03-22  7:12 ` [PATCH v2] " Tyler Retzlaff
@ 2022-03-22 11:50   ` Ananyev, Konstantin
  2022-04-26  6:38     ` Tyler Retzlaff
  2022-04-26  7:41   ` David Marchand
  1 sibling, 1 reply; 9+ messages in thread
From: Ananyev, Konstantin @ 2022-03-22 11:50 UTC (permalink / raw)
  To: Tyler Retzlaff, dev; +Cc: stephen, Burakov, Anatoly, stable

> test_bpf_convert is being conditionally registered depending on the
> presence of RTE_HAS_LIBPCAP except the UT unconditionally lists it as a
> test to run.
> 
> when the UT runs test_bpf_convert test-dpdk can't find the registration
> and assumes the DPDK_TEST environment variable hasn't been defined
> resulting in test-dpdk dropping to interactive mode and subsequently
> waiting for the remainder of the UT fast-test timeout period before
> reporting the test as having timed out.
> 
> * unconditionally register test_bpf_convert
> * if ! RTE_HAS_LIBPCAP provide a stub test_bpf_convert that reports the
>   test is skipped similar to that done with the test_bpf test.
> 
> Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
> Cc: stephen@networkplumber.org
> Cc: anatoly.burakov@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  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..97f5008 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 convert RTE_HAS_LIBPCAP is undefined, skipping test\n");
> +	return TEST_SKIPPED;
> +}
> +
> +#else
>  #include <pcap/pcap.h>
> 
>  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);
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 1.8.3.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] test/bpf: skip test if libpcap is unavailable
  2022-03-22 11:50   ` Ananyev, Konstantin
@ 2022-04-26  6:38     ` Tyler Retzlaff
  0 siblings, 0 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2022-04-26  6:38 UTC (permalink / raw)
  To: dev; +Cc: dev, stephen, Burakov, Anatoly, stable, ocardona

On Tue, Mar 22, 2022 at 11:50:33AM +0000, Ananyev, Konstantin wrote:

> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

is there something more being requested here? the patch has been acked
with no further comments for more than a month.

this patch is blocking enablement of the UT for on windows CI runs.

thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] test/bpf: skip test if libpcap is unavailable
  2022-03-22  7:12 ` [PATCH v2] " Tyler Retzlaff
  2022-03-22 11:50   ` Ananyev, Konstantin
@ 2022-04-26  7:41   ` David Marchand
  2022-04-26  7:47     ` Tyler Retzlaff
  1 sibling, 1 reply; 9+ messages in thread
From: David Marchand @ 2022-04-26  7:41 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dev, Stephen Hemminger, Burakov, Anatoly, dpdk stable

On Tue, Mar 22, 2022 at 8:12 AM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> test_bpf_convert is being conditionally registered depending on the
> presence of RTE_HAS_LIBPCAP except the UT unconditionally lists it as a
> test to run.
>
> when the UT runs test_bpf_convert test-dpdk can't find the registration
> and assumes the DPDK_TEST environment variable hasn't been defined
> resulting in test-dpdk dropping to interactive mode and subsequently
> waiting for the remainder of the UT fast-test timeout period before
> reporting the test as having timed out.
>
> * unconditionally register test_bpf_convert
> * if ! RTE_HAS_LIBPCAP provide a stub test_bpf_convert that reports the
>   test is skipped similar to that done with the test_bpf test.
>
> Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
> Cc: stable@dpdk.org
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] test/bpf: skip test if libpcap is unavailable
  2022-04-26  7:41   ` David Marchand
@ 2022-04-26  7:47     ` Tyler Retzlaff
  0 siblings, 0 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2022-04-26  7:47 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Stephen Hemminger, Burakov, Anatoly, dpdk stable

On Tue, Apr 26, 2022 at 09:41:08AM +0200, David Marchand wrote:
> On Tue, Mar 22, 2022 at 8:12 AM Tyler Retzlaff
> <roretzla@linux.microsoft.com> wrote:
> >
> > test_bpf_convert is being conditionally registered depending on the
> > presence of RTE_HAS_LIBPCAP except the UT unconditionally lists it as a
> > test to run.
> >
> > when the UT runs test_bpf_convert test-dpdk can't find the registration
> > and assumes the DPDK_TEST environment variable hasn't been defined
> > resulting in test-dpdk dropping to interactive mode and subsequently
> > waiting for the remainder of the UT fast-test timeout period before
> > reporting the test as having timed out.
> >
> > * unconditionally register test_bpf_convert
> > * if ! RTE_HAS_LIBPCAP provide a stub test_bpf_convert that reports the
> >   test is skipped similar to that done with the test_bpf test.
> >
> > Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 
> Applied, thanks.

thanks mate!

> 
> 
> -- 
> David Marchand

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-26  7:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 13:13 [PATCH] test/bpf: skip test if libpcap is unavailable Tyler Retzlaff
2022-03-21 14:42 ` Ananyev, Konstantin
2022-03-22  6:11   ` Tyler Retzlaff
2022-03-21 16:15 ` Stephen Hemminger
2022-03-22  7:12 ` [PATCH v2] " Tyler Retzlaff
2022-03-22 11:50   ` Ananyev, Konstantin
2022-04-26  6:38     ` Tyler Retzlaff
2022-04-26  7:41   ` David Marchand
2022-04-26  7:47     ` Tyler Retzlaff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).