test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case
@ 2020-08-11  3:26 Junyu Jiang
  2020-08-11  3:26 ` [dts] [PATCH 2/2] tests/TestSuite_fortville_rss_input.py add flow query Junyu Jiang
  2020-08-11  6:07 ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
  0 siblings, 2 replies; 8+ messages in thread
From: Junyu Jiang @ 2020-08-11  3:26 UTC (permalink / raw)
  To: dts; +Cc: Junyu Jiang

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 test_plans/fortville_rss_input_test_plan.rst | 32 ++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/test_plans/fortville_rss_input_test_plan.rst b/test_plans/fortville_rss_input_test_plan.rst
index 7dbb231..ce077a5 100644
--- a/test_plans/fortville_rss_input_test_plan.rst
+++ b/test_plans/fortville_rss_input_test_plan.rst
@@ -598,3 +598,35 @@ Test Case: test flow validate
          flow validate 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end queues 0 1 end / end
 
    verify the rule validate failed.
+
+Test Case: test query RSS rule
+==============================
+
+create different RSS rules::
+
+    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+    testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end queues end func symmetric_toeplitz / end
+    testpmd> flow create 0 ingress pattern end actions rss types end queues end func simple_xor / end
+    testpmd> flow create 0 ingress pattern end actions rss types end queues 1 2 end / end
+    testpmd> flow list 0
+
+verify the Rules create successfully.
+
+query::
+
+    testpmd> flow query 0 0 rss
+    testpmd> flow query 0 1 rss
+    testpmd> flow query 0 2 rss
+    testpmd> flow query 0 3 rss
+
+verify the function, type and queues infomation correct.
+
+delete all the rss rules::
+
+    testpmd> flow flush 0
+
+query::
+
+    testpmd> flow query 0 0 rss
+
+verify the testpmd report none rss rule exist.
-- 
2.17.1


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

* [dts] [PATCH 2/2] tests/TestSuite_fortville_rss_input.py add flow query
  2020-08-11  3:26 [dts] [PATCH 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
@ 2020-08-11  3:26 ` Junyu Jiang
  2020-08-11  6:07 ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
  1 sibling, 0 replies; 8+ messages in thread
From: Junyu Jiang @ 2020-08-11  3:26 UTC (permalink / raw)
  To: dts; +Cc: Junyu Jiang

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 tests/TestSuite_fortville_rss_input.py | 31 ++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/tests/TestSuite_fortville_rss_input.py b/tests/TestSuite_fortville_rss_input.py
index d1ff39c..8a0c41e 100644
--- a/tests/TestSuite_fortville_rss_input.py
+++ b/tests/TestSuite_fortville_rss_input.py
@@ -3962,6 +3962,37 @@ class TestFortvilleRssGranularityConfig(TestCase):
 
         self.dut.send_expect("quit", "# ", 30)
 
+    def test_flow_query(self):
+        """
+        Test the flow rule query.
+        """
+        self.start_testpmd()
+
+        self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end queues end func symmetric_toeplitz / end", "testpmd> ")
+        self.dut.send_expect("flow create 0 ingress pattern end actions rss types end queues end func simple_xor / end", "testpmd> ")
+        self.dut.send_expect("flow create 0 ingress pattern end actions rss types end queues 1 2 end / end", "testpmd> ")
+
+        rexp = r"flow query 0 (\d) rss\r\r\nRSS:\r\n queues: ([\S\s]+?)\r\n function: (\S+?)\r\n types:\r\n  ([\s\S]+)"
+        out0 = self.dut.send_expect("flow query 0 0 rss", "testpmd> ")
+        m0 = re.match(rexp, out0.strip())
+        self.verify("none" == m0.group(2) and "default" == m0.group(3) and "ipv4-tcp" == m0.group(4) , "Query error")
+        out1 = self.dut.send_expect("flow query 0 1 rss", "testpmd> ")
+        m1 = re.match(rexp, out1.strip())
+        self.verify("none" == m1.group(2) and "symmetric_toeplitz" == m1.group(3) and "ipv4-udp" in m1.group(4) and "l3-src-only" in m1.group(4) , "Query error")
+        out2 = self.dut.send_expect("flow query 0 2 rss", "testpmd> ")
+        m2 = re.match(rexp, out2.strip())
+        self.verify("none" == m2.group(2) and "simple_xor" == m2.group(3) and "none" == m2.group(4) , "Query error")
+        out3 = self.dut.send_expect("flow query 0 3 rss", "testpmd> ")
+        m3 = re.match(rexp, out3.strip())
+        self.verify("1 2" == m3.group(2) and "default" == m3.group(3) and "none" == m3.group(4) , "Query error")
+
+        self.dut.send_expect("flow flush 0", "testpmd> ")
+        out4 = self.dut.send_expect("flow query 0 0 rss", "testpmd> ")
+        self.verify("Flow rule #0 not found" in out4, "Failed to rss query!")
+
+        self.dut.send_expect("quit", "# ", 30)
+
     def tear_down(self):
         """
         Run after each test case.
-- 
2.17.1


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

* [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case
  2020-08-11  3:26 [dts] [PATCH 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
  2020-08-11  3:26 ` [dts] [PATCH 2/2] tests/TestSuite_fortville_rss_input.py add flow query Junyu Jiang
@ 2020-08-11  6:07 ` Junyu Jiang
  2020-08-11  6:07   ` [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py " Junyu Jiang
                     ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: Junyu Jiang @ 2020-08-11  6:07 UTC (permalink / raw)
  To: dts; +Cc: Junyu Jiang

add test case for rss flow query.

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 test_plans/fortville_rss_input_test_plan.rst | 32 ++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/test_plans/fortville_rss_input_test_plan.rst b/test_plans/fortville_rss_input_test_plan.rst
index 7dbb231..925a08d 100644
--- a/test_plans/fortville_rss_input_test_plan.rst
+++ b/test_plans/fortville_rss_input_test_plan.rst
@@ -598,3 +598,35 @@ Test Case: test flow validate
          flow validate 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end queues 0 1 end / end
 
    verify the rule validate failed.
+
+Test Case: test query RSS rule
+==============================
+
+create different RSS rules::
+
+    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+    testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end queues end func symmetric_toeplitz / end
+    testpmd> flow create 0 ingress pattern end actions rss types end queues end func simple_xor / end
+    testpmd> flow create 0 ingress pattern end actions rss types end queues 1 2 end / end
+    testpmd> flow list 0
+
+verify the Rules create successfully.
+
+query::
+
+    testpmd> flow query 0 0 rss
+    testpmd> flow query 0 1 rss
+    testpmd> flow query 0 2 rss
+    testpmd> flow query 0 3 rss
+
+verify the function, type and queues information correct.
+
+delete all the rss rules::
+
+    testpmd> flow flush 0
+
+query::
+
+    testpmd> flow query 0 0 rss
+
+verify the testpmd report none rss rule exist.
-- 
2.17.1


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

* [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py add flow query test case
  2020-08-11  6:07 ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
@ 2020-08-11  6:07   ` Junyu Jiang
  2020-08-12  1:30     ` Fu, Qi
  2020-08-13  3:00     ` Tu, Lijuan
  2020-08-12  1:29   ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: " Fu, Qi
  2020-08-13  2:59   ` Tu, Lijuan
  2 siblings, 2 replies; 8+ messages in thread
From: Junyu Jiang @ 2020-08-11  6:07 UTC (permalink / raw)
  To: dts; +Cc: Junyu Jiang

add test case for rss flow query.

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 tests/TestSuite_fortville_rss_input.py | 31 ++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/tests/TestSuite_fortville_rss_input.py b/tests/TestSuite_fortville_rss_input.py
index d1ff39c..8a0c41e 100644
--- a/tests/TestSuite_fortville_rss_input.py
+++ b/tests/TestSuite_fortville_rss_input.py
@@ -3962,6 +3962,37 @@ class TestFortvilleRssGranularityConfig(TestCase):
 
         self.dut.send_expect("quit", "# ", 30)
 
+    def test_flow_query(self):
+        """
+        Test the flow rule query.
+        """
+        self.start_testpmd()
+
+        self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end queues end func symmetric_toeplitz / end", "testpmd> ")
+        self.dut.send_expect("flow create 0 ingress pattern end actions rss types end queues end func simple_xor / end", "testpmd> ")
+        self.dut.send_expect("flow create 0 ingress pattern end actions rss types end queues 1 2 end / end", "testpmd> ")
+
+        rexp = r"flow query 0 (\d) rss\r\r\nRSS:\r\n queues: ([\S\s]+?)\r\n function: (\S+?)\r\n types:\r\n  ([\s\S]+)"
+        out0 = self.dut.send_expect("flow query 0 0 rss", "testpmd> ")
+        m0 = re.match(rexp, out0.strip())
+        self.verify("none" == m0.group(2) and "default" == m0.group(3) and "ipv4-tcp" == m0.group(4) , "Query error")
+        out1 = self.dut.send_expect("flow query 0 1 rss", "testpmd> ")
+        m1 = re.match(rexp, out1.strip())
+        self.verify("none" == m1.group(2) and "symmetric_toeplitz" == m1.group(3) and "ipv4-udp" in m1.group(4) and "l3-src-only" in m1.group(4) , "Query error")
+        out2 = self.dut.send_expect("flow query 0 2 rss", "testpmd> ")
+        m2 = re.match(rexp, out2.strip())
+        self.verify("none" == m2.group(2) and "simple_xor" == m2.group(3) and "none" == m2.group(4) , "Query error")
+        out3 = self.dut.send_expect("flow query 0 3 rss", "testpmd> ")
+        m3 = re.match(rexp, out3.strip())
+        self.verify("1 2" == m3.group(2) and "default" == m3.group(3) and "none" == m3.group(4) , "Query error")
+
+        self.dut.send_expect("flow flush 0", "testpmd> ")
+        out4 = self.dut.send_expect("flow query 0 0 rss", "testpmd> ")
+        self.verify("Flow rule #0 not found" in out4, "Failed to rss query!")
+
+        self.dut.send_expect("quit", "# ", 30)
+
     def tear_down(self):
         """
         Run after each test case.
-- 
2.17.1


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

* Re: [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case
  2020-08-11  6:07 ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
  2020-08-11  6:07   ` [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py " Junyu Jiang
@ 2020-08-12  1:29   ` Fu, Qi
  2020-08-13  2:59   ` Tu, Lijuan
  2 siblings, 0 replies; 8+ messages in thread
From: Fu, Qi @ 2020-08-12  1:29 UTC (permalink / raw)
  To: Jiang, JunyuX, dts; +Cc: Jiang, JunyuX

Acked-by: Fu, Qi <qi.fu@intel.com>

Best regards,
Fu, Qi

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Junyu Jiang
> Sent: Tuesday, August 11, 2020 2:08 PM
> To: dts@dpdk.org
> Cc: Jiang, JunyuX <junyux.jiang@intel.com>
> Subject: [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add
> flow query test case
> 
> add test case for rss flow query.
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> ---
>  test_plans/fortville_rss_input_test_plan.rst | 32 ++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/test_plans/fortville_rss_input_test_plan.rst
> b/test_plans/fortville_rss_input_test_plan.rst
> index 7dbb231..925a08d 100644
> --- a/test_plans/fortville_rss_input_test_plan.rst
> +++ b/test_plans/fortville_rss_input_test_plan.rst
> @@ -598,3 +598,35 @@ Test Case: test flow validate
>           flow validate 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-
> tcp l3-dst-only end queues 0 1 end / end
> 
>     verify the rule validate failed.
> +
> +Test Case: test query RSS rule
> +==============================
> +
> +create different RSS rules::
> +
> +    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types
> ipv4-tcp end queues end / end
> +    testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss
> types ipv4-udp l3-src-only end queues end func symmetric_toeplitz / end
> +    testpmd> flow create 0 ingress pattern end actions rss types end queues end
> func simple_xor / end
> +    testpmd> flow create 0 ingress pattern end actions rss types end queues 1 2
> end / end
> +    testpmd> flow list 0
> +
> +verify the Rules create successfully.
> +
> +query::
> +
> +    testpmd> flow query 0 0 rss
> +    testpmd> flow query 0 1 rss
> +    testpmd> flow query 0 2 rss
> +    testpmd> flow query 0 3 rss
> +
> +verify the function, type and queues information correct.
> +
> +delete all the rss rules::
> +
> +    testpmd> flow flush 0
> +
> +query::
> +
> +    testpmd> flow query 0 0 rss
> +
> +verify the testpmd report none rss rule exist.
> --
> 2.17.1


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

* Re: [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py add flow query test case
  2020-08-11  6:07   ` [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py " Junyu Jiang
@ 2020-08-12  1:30     ` Fu, Qi
  2020-08-13  3:00     ` Tu, Lijuan
  1 sibling, 0 replies; 8+ messages in thread
From: Fu, Qi @ 2020-08-12  1:30 UTC (permalink / raw)
  To: Jiang, JunyuX, dts; +Cc: Jiang, JunyuX

Acked-by: Fu, Qi <qi.fu@intel.com>

Best regards,
Fu, Qi

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Junyu Jiang
> Sent: Tuesday, August 11, 2020 2:08 PM
> To: dts@dpdk.org
> Cc: Jiang, JunyuX <junyux.jiang@intel.com>
> Subject: [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py add flow
> query test case
> 
> add test case for rss flow query.
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> ---
>  tests/TestSuite_fortville_rss_input.py | 31 ++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/tests/TestSuite_fortville_rss_input.py
> b/tests/TestSuite_fortville_rss_input.py
> index d1ff39c..8a0c41e 100644
> --- a/tests/TestSuite_fortville_rss_input.py
> +++ b/tests/TestSuite_fortville_rss_input.py
> @@ -3962,6 +3962,37 @@ class TestFortvilleRssGranularityConfig(TestCase):
> 
>          self.dut.send_expect("quit", "# ", 30)
> 
> +    def test_flow_query(self):
> +        """
> +        Test the flow rule query.
> +        """
> +        self.start_testpmd()
> +
> +        self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / tcp / end
> actions rss types ipv4-tcp end queues end / end", "testpmd> ")
> +        self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / udp / end
> actions rss types ipv4-udp l3-src-only end queues end func symmetric_toeplitz /
> end", "testpmd> ")
> +        self.dut.send_expect("flow create 0 ingress pattern end actions rss types
> end queues end func simple_xor / end", "testpmd> ")
> +        self.dut.send_expect("flow create 0 ingress pattern end actions rss types
> end queues 1 2 end / end", "testpmd> ")
> +
> +        rexp = r"flow query 0 (\d) rss\r\r\nRSS:\r\n queues: ([\S\s]+?)\r\n function:
> (\S+?)\r\n types:\r\n  ([\s\S]+)"
> +        out0 = self.dut.send_expect("flow query 0 0 rss", "testpmd> ")
> +        m0 = re.match(rexp, out0.strip())
> +        self.verify("none" == m0.group(2) and "default" == m0.group(3) and "ipv4-
> tcp" == m0.group(4) , "Query error")
> +        out1 = self.dut.send_expect("flow query 0 1 rss", "testpmd> ")
> +        m1 = re.match(rexp, out1.strip())
> +        self.verify("none" == m1.group(2) and "symmetric_toeplitz" == m1.group(3)
> and "ipv4-udp" in m1.group(4) and "l3-src-only" in m1.group(4) , "Query error")
> +        out2 = self.dut.send_expect("flow query 0 2 rss", "testpmd> ")
> +        m2 = re.match(rexp, out2.strip())
> +        self.verify("none" == m2.group(2) and "simple_xor" == m2.group(3) and
> "none" == m2.group(4) , "Query error")
> +        out3 = self.dut.send_expect("flow query 0 3 rss", "testpmd> ")
> +        m3 = re.match(rexp, out3.strip())
> +        self.verify("1 2" == m3.group(2) and "default" == m3.group(3) and "none"
> == m3.group(4) , "Query error")
> +
> +        self.dut.send_expect("flow flush 0", "testpmd> ")
> +        out4 = self.dut.send_expect("flow query 0 0 rss", "testpmd> ")
> +        self.verify("Flow rule #0 not found" in out4, "Failed to rss query!")
> +
> +        self.dut.send_expect("quit", "# ", 30)
> +
>      def tear_down(self):
>          """
>          Run after each test case.
> --
> 2.17.1


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

* Re: [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case
  2020-08-11  6:07 ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
  2020-08-11  6:07   ` [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py " Junyu Jiang
  2020-08-12  1:29   ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: " Fu, Qi
@ 2020-08-13  2:59   ` Tu, Lijuan
  2 siblings, 0 replies; 8+ messages in thread
From: Tu, Lijuan @ 2020-08-13  2:59 UTC (permalink / raw)
  To: Jiang, JunyuX, dts; +Cc: Jiang, JunyuX

> Subject: [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add
> flow query test case
> 
> add test case for rss flow query.
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> ---
>  test_plans/fortville_rss_input_test_plan.rst | 32 ++++++++++++++++++++

Applied

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

* Re: [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py add flow query test case
  2020-08-11  6:07   ` [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py " Junyu Jiang
  2020-08-12  1:30     ` Fu, Qi
@ 2020-08-13  3:00     ` Tu, Lijuan
  1 sibling, 0 replies; 8+ messages in thread
From: Tu, Lijuan @ 2020-08-13  3:00 UTC (permalink / raw)
  To: Jiang, JunyuX, dts; +Cc: Jiang, JunyuX

> Subject: [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py add flow
> query test case
> 
> add test case for rss flow query.
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> ---
>  tests/TestSuite_fortville_rss_input.py | 31 ++++++++++++++++++++++++++

Applied

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

end of thread, other threads:[~2020-08-13  3:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11  3:26 [dts] [PATCH 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
2020-08-11  3:26 ` [dts] [PATCH 2/2] tests/TestSuite_fortville_rss_input.py add flow query Junyu Jiang
2020-08-11  6:07 ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: add flow query test case Junyu Jiang
2020-08-11  6:07   ` [dts] [PATCH v2 2/2] tests/TestSuite_fortville_rss_input.py " Junyu Jiang
2020-08-12  1:30     ` Fu, Qi
2020-08-13  3:00     ` Tu, Lijuan
2020-08-12  1:29   ` [dts] [PATCH v2 1/2] test_plans/fortville_rss_input_test_plan.rst: " Fu, Qi
2020-08-13  2:59   ` Tu, Lijuan

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).