[dts] [PATCH] TestSuite_shutdown_api.py: added new test case test_check_rxtx_desc_status

Tu, Lijuan lijuan.tu at intel.com
Fri Mar 20 09:06:09 CET 2020


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of
> nareddy at marvell.com
> Sent: Monday, March 16, 2020 12:22 PM
> To: dts at dpdk.org
> Cc: pvukkisala at marvell.com; Praneeth Reddy <nareddy at marvell.com>
> Subject: [dts] [PATCH] TestSuite_shutdown_api.py: added new test case
> test_check_rxtx_desc_status
> 
> From: Praneeth Reddy <nareddy at marvell.com>
> 
> Added new test case to verify descriptor status for cavium_a063 and
> cavium_a064
> 
> Signed-off-by: Praneeth Reddy <nareddy at 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



More information about the dts mailing list