test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH] TestSuite_shutdown_api.py: added new test case test_check_rxtx_desc_status
@ 2020-03-16  4:21 nareddy
  2020-03-20  8:06 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: nareddy @ 2020-03-16  4:21 UTC (permalink / raw)
  To: dts; +Cc: pvukkisala, Praneeth Reddy

From: Praneeth Reddy <nareddy@marvell.com>

Added new test case to verify descriptor status for cavium_a063 and cavium_a064

Signed-off-by: Praneeth Reddy <nareddy@marvell.com>
---
 conf/test_case_supportlist.json | 16 ++++++++++++++++
 tests/TestSuite_shutdown_api.py | 22 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/conf/test_case_supportlist.json b/conf/test_case_supportlist.json
index 8d30513..eba0840 100644
--- a/conf/test_case_supportlist.json
+++ b/conf/test_case_supportlist.json
@@ -1766,5 +1766,21 @@
             "Bug ID": "",
             "Comments": "this case only support on fortville"
         }
+    ],
+    "check_rxtx_desc_status": [
+        {
+            "OS": [
+                "ALL"
+            ],
+            "NIC": [
+                "cavium_a064",
+                "cavium_a063"
+            ],
+            "Target": [
+                "ALL"
+            ],
+            "Bug ID": "",
+            "Comments": "This case currently support for cavium_a063 and cavium_a064 "
+        }
     ]
 }
diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
index 11d451b..6393b1d 100644
--- a/tests/TestSuite_shutdown_api.py
+++ b/tests/TestSuite_shutdown_api.py
@@ -40,12 +40,14 @@ import utils
 import time
 import re
 import os
+import random
 from test_case import TestCase
 from pmd_output import PmdOutput
 from settings import HEADER_SIZE, PROTOCOL_PACKET_SIZE
 from exception import VerifyFailure
 from qemu_kvm import QEMUKvm
 from settings import get_nic_name
+from random import randint
 
 #
 #
@@ -744,6 +746,26 @@ class TestShutdownApi(TestCase):
         self.check_ports(status=True)
         self.check_forwarding()
 
+    def test_check_rxtx_desc_status(self):
+        """
+        Check tx and rx descriptors status.
+        """
+        self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop" % utils.create_mask(self.ports), socket=self.ports_socket)
+
+        for i in range(3):
+            self.desc = randint(0, 4095)
+            out = self.dut.send_expect("show port %s rxq 0 desc %s status" % (self.ports[0], self.desc), "testpmd> ")
+            self.verify(
+               "Desc status = AVAILABLE" in out, "RX descriptor status is improper")
+            self.verify(
+               "Bad arguments" not in out, "RX descriptor status is not supported")
+            self.desc = randint(0, 511)
+            out = self.dut.send_expect("show port %s txq 0 desc %s status" % (self.ports[0], self.desc), "testpmd> ")
+            self.verify(
+               "Desc status = FULL" in out, "TX descriptor status is improper")
+            self.verify(
+               "Bad arguments" not in out, "TX descriptor status is not supported")
+
     def tear_down(self):
         """
         Run after each test case.
-- 
1.8.3.1


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

* Re: [dts] [PATCH] TestSuite_shutdown_api.py: added new test case test_check_rxtx_desc_status
  2020-03-16  4:21 [dts] [PATCH] TestSuite_shutdown_api.py: added new test case test_check_rxtx_desc_status nareddy
@ 2020-03-20  8:06 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-03-20  8:06 UTC (permalink / raw)
  To: nareddy, dts; +Cc: pvukkisala

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of
> nareddy@marvell.com
> Sent: Monday, March 16, 2020 12:22 PM
> To: dts@dpdk.org
> Cc: pvukkisala@marvell.com; Praneeth Reddy <nareddy@marvell.com>
> Subject: [dts] [PATCH] TestSuite_shutdown_api.py: added new test case
> test_check_rxtx_desc_status
> 
> From: Praneeth Reddy <nareddy@marvell.com>
> 
> Added new test case to verify descriptor status for cavium_a063 and
> cavium_a064
> 
> Signed-off-by: Praneeth Reddy <nareddy@marvell.com>
> ---
>  conf/test_case_supportlist.json | 16 ++++++++++++++++
> tests/TestSuite_shutdown_api.py | 22 ++++++++++++++++++++++
>  2 files changed, 38 insertions(+)
> 
> diff --git a/conf/test_case_supportlist.json b/conf/test_case_supportlist.json
> index 8d30513..eba0840 100644
> --- a/conf/test_case_supportlist.json
> +++ b/conf/test_case_supportlist.json
> @@ -1766,5 +1766,21 @@
>              "Bug ID": "",
>              "Comments": "this case only support on fortville"
>          }
> +    ],
> +    "check_rxtx_desc_status": [
> +        {
> +            "OS": [
> +                "ALL"
> +            ],
> +            "NIC": [
> +                "cavium_a064",
> +                "cavium_a063"
> +            ],
> +            "Target": [
> +                "ALL"
> +            ],
> +            "Bug ID": "",
> +            "Comments": "This case currently support for cavium_a063 and
> cavium_a064 "
> +        }
>      ]
>  }
> diff --git a/tests/TestSuite_shutdown_api.py
> b/tests/TestSuite_shutdown_api.py index 11d451b..6393b1d 100644
> --- a/tests/TestSuite_shutdown_api.py
> +++ b/tests/TestSuite_shutdown_api.py
> @@ -40,12 +40,14 @@ import utils
>  import time
>  import re
>  import os
> +import random
>  from test_case import TestCase
>  from pmd_output import PmdOutput
>  from settings import HEADER_SIZE, PROTOCOL_PACKET_SIZE  from
> exception import VerifyFailure  from qemu_kvm import QEMUKvm  from
> settings import get_nic_name
> +from random import randint
> 
>  #
>  #
> @@ -744,6 +746,26 @@ class TestShutdownApi(TestCase):
>          self.check_ports(status=True)
>          self.check_forwarding()
> 
> +    def test_check_rxtx_desc_status(self):
> +        """
> +        Check tx and rx descriptors status.
> +        """
> +        self.pmdout.start_testpmd("Default", "--portmask=%s
> + --port-topology=loop" % utils.create_mask(self.ports),
> + socket=self.ports_socket)
> +
> +        for i in range(3):
> +            self.desc = randint(0, 4095)
> +            out = self.dut.send_expect("show port %s rxq 0 desc %s status" %
> (self.ports[0], self.desc), "testpmd> ")
> +            self.verify(
> +               "Desc status = AVAILABLE" in out, "RX descriptor status is improper")
> +            self.verify(
> +               "Bad arguments" not in out, "RX descriptor status is not supported")
> +            self.desc = randint(0, 511)
> +            out = self.dut.send_expect("show port %s txq 0 desc %s status" %
> (self.ports[0], self.desc), "testpmd> ")
> +            self.verify(
> +               "Desc status = FULL" in out, "TX descriptor status is improper")
> +            self.verify(
> +               "Bad arguments" not in out, "TX descriptor status is not
> + supported")
> +
>      def tear_down(self):
>          """
>          Run after each test case.
> --
> 1.8.3.1


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16  4:21 [dts] [PATCH] TestSuite_shutdown_api.py: added new test case test_check_rxtx_desc_status nareddy
2020-03-20  8:06 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox