test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "pvukkisala@marvell.com" <pvukkisala@marvell.com>,
	"dts@dpdk.org" <dts@dpdk.org>
Cc: "sshankarnara@marvell.com" <sshankarnara@marvell.com>
Subject: Re: [dts] [PATCH] unit_tests_event_timer: Add test script to	event_timer_adapter and test plan
Date: Wed, 6 May 2020 05:48:03 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC22168@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1588438621-27119-1-git-send-email-pvukkisala@marvell.com>

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of
> pvukkisala@marvell.com
> Sent: Sunday, May 3, 2020 12:57 AM
> To: dts@dpdk.org
> Cc: sshankarnara@marvell.com; Phanendra Vukkisala
> <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] unit_tests_event_timer: Add test script to
> event_timer_adapter and test plan
> 
> From: Phanendra Vukkisala <pvukkisala@marvell.com>
> 
> Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
> ---
>  framework/dut.py                                |    2 +-
>  test_plans/unit_tests_event_timer_test_plan.rst |   18 ++++++
>  tests/TestSuite_unit_tests_event_timer.py       |   77
> +++++++++++++++++++++++
>  3 files changed, 96 insertions(+), 1 deletion(-)  create mode 100644
> test_plans/unit_tests_event_timer_test_plan.rst
>  create mode 100644 tests/TestSuite_unit_tests_event_timer.py
> 
> diff --git a/framework/dut.py b/framework/dut.py index c3e7c86..73f965e
> 100644
> --- a/framework/dut.py
> +++ b/framework/dut.py
> @@ -643,7 +643,7 @@ class Dut(Crb):
>              self.send_expect('echo 0 >  /sys/bus/pci/devices/%s/limits/ssow' %
> (eventdev_port), '#')
>          for eventdev_port in eventdev_ports:
>              if eventdev_port == port:
> -                self.send_expect('echo 0 >  /sys/bus/pci/devices/%s/limits/tim' %
> (eventdev_port), '#')
> +                self.send_expect('echo 1 >
> + /sys/bus/pci/devices/%s/limits/tim' % (eventdev_port), '#')
>                  self.send_expect('echo 1 >  /sys/bus/pci/devices/%s/limits/npa' %
> (eventdev_port), '#')
>                  self.send_expect('echo 10 >  /sys/bus/pci/devices/%s/limits/sso' %
> (eventdev_port), '#')
>                  self.send_expect('echo 32 >  /sys/bus/pci/devices/%s/limits/ssow' %
> (eventdev_port), '#') diff --git
> a/test_plans/unit_tests_event_timer_test_plan.rst
> b/test_plans/unit_tests_event_timer_test_plan.rst
> new file mode 100644
> index 0000000..58ac78c
> --- /dev/null
> +++ b/test_plans/unit_tests_event_timer_test_plan.rst
> @@ -0,0 +1,18 @@
> +.. SPDX-License-Identifier: BSD-3-Clause
> +   Copyright (C) 2019 Marvell International Ltd.
> +
> +=======================
> +Unit Tests: Event Timer
> +=======================
> +This is the test plan for Event Timer Adapter auto test.
> +
> +This section explains how to run the unit tests for
> +event_timer_adapter. The test can be launched independently using the
> command line interface.
> +
> +The steps to run the unit test manually are as follow::
> +
> +  # make -C ./app/test/
> +  # ./app/test/test -n 1 -c ffff -w <timerdev-pci-bus-id>,<devargs>
> + RTE>> event_timer_adapter_test
> +
> +The final output of the test has to be "Test OK"
> diff --git a/tests/TestSuite_unit_tests_event_timer.py
> b/tests/TestSuite_unit_tests_event_timer.py
> new file mode 100644
> index 0000000..479220e
> --- /dev/null
> +++ b/tests/TestSuite_unit_tests_event_timer.py
> @@ -0,0 +1,77 @@
> +# BSD LICENSE
> +# SPDX-License-Identifier: BSD-3-Clause # Copyright (C) 2019 Marvell
> +International Ltd.
> +
> +"""
> +DPDK Test suite.
> +Test Event Timer Adapter Unit test
> +"""
> +
> +import utils
> +
> +from test_case import TestCase
> +
> +
> +class TestUnitTestEventTimer(TestCase):
> +
> +    def set_up_all(self):
> +        """
> +        Run at the start of each test suite.
> +
> +        PMD prerequisites.
> +        """
> +
> +        cores = self.dut.get_core_list("all")
> +        self.coremask = utils.create_mask(cores)
> +        # Based on h/w type, choose how many ports to use
> +        self.dut_ports = self.dut.get_ports()
> +
> +        if self.nic == "cavium_a063" or self.nic == "cavium_a064":
> +            self.eventdev_device_bus_id = "0002:0e:00.0"
> +            self.eventdev_device_id = "a0f9"
> +            #### Bind evendev device ####
> +
> + self.dut.bind_eventdev_port(port_to_bind=self.eventdev_device_bus_id)
> +
> +            #### Configuring evendev SS0 & SSOw limits ####
> +            self.dut.set_eventdev_port_limits(self.eventdev_device_id,
> self.eventdev_device_bus_id)
> +        elif self.nic == "cavium_a034":
> +            self.eventdev_timer_device_bus_id = "0000:0a:01.0"
> +
> + self.dut.bind_eventdev_port(port_to_bind=self.eventdev_timer_device_bu
> + s_id)
> +
> +
> +    def set_up(self):
> +        """
> +        Run before each test case.
> +        """
> +        pass
> +
> +    def test_event_timer_adapter(self):
> +        """
> +        Event Timer Adapter Autotest
> +        """
> +
> +        if self.nic == "cavium_a063" or self.nic == "cavium_a064":
> +            self.dut.send_expect("./%s/app/test -n 1 -c %s -
> w %s,single_ws=1,tim_stats_ena=1" % (self.target, self.coremask,
> self.eventdev_device_bus_id), "R.*T.*E.*>.*>", 60)
> +        elif self.nic == "cavium_a034":
> +            self.dut.send_expect("./%s/app/test -n 1 -c %s -w %s,timvf_stats=1" %
> (self.target, self.coremask, self.eventdev_timer_device_bus_id),
> "R.*T.*E.*>.*>", 60)
> +        out = self.dut.send_expect("event_timer_adapter_test", "RTE>>", 300)
> +        self.dut.send_expect("quit", "# ")
> +        self.verify("Test OK" in out, "Test failed")
> +        return 'SUCCESS'
> +
> +
> +    def tear_down(self):
> +        """
> +        Run after each test case.
> +        """
> +        pass
> +
> +    def tear_down_all(self):
> +        """
> +        Run after each test suite.
> +        """
> +        if self.nic == "cavium_a063" or self.nic == "cavium_a064" :
> +
> self.dut.unbind_eventdev_port(port_to_unbind=self.eventdev_device_bus_i
> d)
> +        elif self.nic == "cavium_a034":
> +
> self.dut.unbind_eventdev_port(port_to_unbind=self.eventdev_timer_device
> _bus_id)
> +        self.dut.kill_all()
> --
> 1.7.9.5


      reply	other threads:[~2020-05-06  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 16:57 pvukkisala
2020-05-06  5:48 ` Tu, Lijuan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BC22168@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=pvukkisala@marvell.com \
    --cc=sshankarnara@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).