diff mbox series

[ovs-dev,v1] Pmd.at: fix dpcls and dpif configuration test cases.

Message ID 20220517173523.588912-1-kumar.amber@intel.com
State Superseded
Headers show
Series [ovs-dev,v1] Pmd.at: fix dpcls and dpif configuration test cases. | expand

Checks

Context Check Description
ovsrobot/intel-ovs-compilation fail test: fail
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Kumar Amber May 17, 2022, 5:35 p.m. UTC
Without running set command first the string matching
fails on get command beacuse DPCLS prio value is different
for different default builds like with --enable-autovalidator
build auto-validator prio is set to 255 and if the build
is a scalar than generic value is default 255.

The same problem is seen with dpif where re-arranging the get
command after set makes it consistent across any builds.

Fixes: cc0a87b11c (pmd.at: Add test-cases for DPCLS and DPIF commands.)
Signed-off-by: Kumar Amber <kumar.amber@intel.com>
---
 tests/pmd.at | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

Comments

Phelan, Michael May 18, 2022, 11:45 a.m. UTC | #1
> -----Original Message-----
> From: Amber, Kumar <kumar.amber@intel.com>
> Sent: Tuesday 17 May 2022 18:35
> To: ovs-dev@openvswitch.org
> Cc: i.maximets@ovn.org; Ferriter, Cian <cian.ferriter@intel.com>; Stokes, Ian
> <ian.stokes@intel.com>; Phelan, Michael <michael.phelan@intel.com>; Van
> Haaren, Harry <harry.van.haaren@intel.com>; Amber, Kumar
> <kumar.amber@intel.com>
> Subject: [PATCH v1] Pmd.at: fix dpcls and dpif configuration test cases.
> 
> Without running set command first the string matching fails on get command
> beacuse DPCLS prio value is different for different default builds like with --
> enable-autovalidator build auto-validator prio is set to 255 and if the build is a
> scalar than generic value is default 255.
> 
> The same problem is seen with dpif where re-arranging the get command
> after set makes it consistent across any builds.
> 
> Fixes: cc0a87b11c (pmd.at: Add test-cases for DPCLS and DPIF commands.)
> Signed-off-by: Kumar Amber <kumar.amber@intel.com>
> ---
>  tests/pmd.at | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/pmd.at b/tests/pmd.at index 0a451f33c..3962dd2bd 100644
> --- a/tests/pmd.at
> +++ b/tests/pmd.at
> @@ -1113,15 +1113,15 @@ AT_SETUP([PMD - dpif configuration])
> OVS_VSWITCHD_START([], [], [], [--dummy-numa 0,0])  AT_CHECK([ovs-vsctl
> add-port br0 p1 -- set Interface p1 type=dummy-pmd])
> 
> +AT_CHECK([ovs-appctl dpif-netdev/dpif-impl-set dpif_scalar], [0], [dnl
> +DPIF implementation set to dpif_scalar.
> +])
> +
>  AT_CHECK([ovs-vsctl show], [], [stdout])  AT_CHECK([ovs-appctl dpif-
> netdev/dpif-impl-get | grep "dpif_scalar"], [], [dnl
>    dpif_scalar (pmds: 0)
>  ])
> 
> -AT_CHECK([ovs-appctl dpif-netdev/dpif-impl-set dpif_scalar], [0], [dnl -DPIF
> implementation set to dpif_scalar.
> -])
> -
>  OVS_VSWITCHD_STOP
>  AT_CLEANUP
> 
> @@ -1130,13 +1130,6 @@ OVS_VSWITCHD_START([], [], [], [--dummy-numa
> 0,0])  AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-
> pmd])
> 
>  AT_CHECK([ovs-vsctl show], [], [stdout]) -AT_CHECK([ovs-appctl dpif-
> netdev/subtable-lookup-prio-get | grep generic], [], [dnl
> -  1 : generic
> -])
> -
> -AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep
> autovalidator], [], [dnl
> -  0 : autovalidator
> -])
> 
>  AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set autovalidator
> 3], [0], [dnl  Lookup priority change affected 0 dpcls ports and 0 subtables.
> --
> 2.25.1

Acked-by: Michael Phelan <michael.phelan@intel.com>
diff mbox series

Patch

diff --git a/tests/pmd.at b/tests/pmd.at
index 0a451f33c..3962dd2bd 100644
--- a/tests/pmd.at
+++ b/tests/pmd.at
@@ -1113,15 +1113,15 @@  AT_SETUP([PMD - dpif configuration])
 OVS_VSWITCHD_START([], [], [], [--dummy-numa 0,0])
 AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd])
 
+AT_CHECK([ovs-appctl dpif-netdev/dpif-impl-set dpif_scalar], [0], [dnl
+DPIF implementation set to dpif_scalar.
+])
+
 AT_CHECK([ovs-vsctl show], [], [stdout])
 AT_CHECK([ovs-appctl dpif-netdev/dpif-impl-get | grep "dpif_scalar"], [], [dnl
   dpif_scalar (pmds: 0)
 ])
 
-AT_CHECK([ovs-appctl dpif-netdev/dpif-impl-set dpif_scalar], [0], [dnl
-DPIF implementation set to dpif_scalar.
-])
-
 OVS_VSWITCHD_STOP
 AT_CLEANUP
 
@@ -1130,13 +1130,6 @@  OVS_VSWITCHD_START([], [], [], [--dummy-numa 0,0])
 AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd])
 
 AT_CHECK([ovs-vsctl show], [], [stdout])
-AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep generic], [], [dnl
-  1 : generic
-])
-
-AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep autovalidator], [], [dnl
-  0 : autovalidator
-])
 
 AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set autovalidator 3], [0], [dnl
 Lookup priority change affected 0 dpcls ports and 0 subtables.