test suite reviews and discussions
 help / color / mirror / 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

end of thread, other threads:[~2020-03-20  8:06 UTC | newest]

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

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