From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9FD75A0352; Wed, 6 May 2020 07:48:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8CF461D6C3; Wed, 6 May 2020 07:48:10 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 7A4B21D69F for ; Wed, 6 May 2020 07:48:09 +0200 (CEST) IronPort-SDR: Ed/i9XCmaU6wCHHfSdjW6/dGVzHerfbl5+wTYcA6KPdUtQgj7y5AvdBJHUN/wTLa7uiR1FfAqI DRqydAjybghw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 22:48:08 -0700 IronPort-SDR: W9QDZcBtTusdxfBX6QHWxfQDgJIVTNzjTrsyiQoqSfpZzKRaxctMGphQbH+rzHcjyxMW43/s/S aH6IFv8zWbEg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,358,1583222400"; d="scan'208";a="296071950" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga008.jf.intel.com with ESMTP; 05 May 2020 22:48:08 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 May 2020 22:48:08 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 May 2020 22:48:07 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.225]) by shsmsx102.ccr.corp.intel.com ([169.254.2.38]) with mapi id 14.03.0439.000; Wed, 6 May 2020 13:48:04 +0800 From: "Tu, Lijuan" To: "pvukkisala@marvell.com" , "dts@dpdk.org" CC: "sshankarnara@marvell.com" Thread-Topic: [dts] [PATCH] unit_tests_event_timer: Add test script to event_timer_adapter and test plan Thread-Index: AQHWIKLJhnwpQrgfGEm9e1kbgq1STKiakoWQ Date: Wed, 6 May 2020 05:48:03 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC22168@SHSMSX101.ccr.corp.intel.com> References: <1588438621-27119-1-git-send-email-pvukkisala@marvell.com> In-Reply-To: <1588438621-27119-1-git-send-email-pvukkisala@marvell.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] unit_tests_event_timer: Add test script to event_timer_adapter and test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 > > Subject: [dts] [PATCH] unit_tests_event_timer: Add test script to > event_timer_adapter and test plan >=20 > From: Phanendra Vukkisala >=20 > Signed-off-by: Phanendra Vukkisala > --- > 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 >=20 > 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/s= sow' % > (eventdev_port), '#') > for eventdev_port in eventdev_ports: > if eventdev_port =3D=3D port: > - self.send_expect('echo 0 > /sys/bus/pci/devices/%s/limi= ts/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/limi= ts/npa' % > (eventdev_port), '#') > self.send_expect('echo 10 > /sys/bus/pci/devices/%s/lim= its/sso' % > (eventdev_port), '#') > self.send_expect('echo 32 > /sys/bus/pci/devices/%s/lim= its/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. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Unit Tests: Event Timer > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +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 , > + 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 =3D self.dut.get_core_list("all") > + self.coremask =3D utils.create_mask(cores) > + # Based on h/w type, choose how many ports to use > + self.dut_ports =3D self.dut.get_ports() > + > + if self.nic =3D=3D "cavium_a063" or self.nic =3D=3D "cavium_a064= ": > + self.eventdev_device_bus_id =3D "0002:0e:00.0" > + self.eventdev_device_id =3D "a0f9" > + #### Bind evendev device #### > + > + self.dut.bind_eventdev_port(port_to_bind=3Dself.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 =3D=3D "cavium_a034": > + self.eventdev_timer_device_bus_id =3D "0000:0a:01.0" > + > + self.dut.bind_eventdev_port(port_to_bind=3Dself.eventdev_timer_device_b= u > + 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 =3D=3D "cavium_a063" or self.nic =3D=3D "cavium_a064= ": > + self.dut.send_expect("./%s/app/test -n 1 -c %s - > w %s,single_ws=3D1,tim_stats_ena=3D1" % (self.target, self.coremask, > self.eventdev_device_bus_id), "R.*T.*E.*>.*>", 60) > + elif self.nic =3D=3D "cavium_a034": > + self.dut.send_expect("./%s/app/test -n 1 -c %s -w %s,timvf_s= tats=3D1" % > (self.target, self.coremask, self.eventdev_timer_device_bus_id), > "R.*T.*E.*>.*>", 60) > + out =3D 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 =3D=3D "cavium_a063" or self.nic =3D=3D "cavium_a064= " : > + > self.dut.unbind_eventdev_port(port_to_unbind=3Dself.eventdev_device_bus_i > d) > + elif self.nic =3D=3D "cavium_a034": > + > self.dut.unbind_eventdev_port(port_to_unbind=3Dself.eventdev_timer_device > _bus_id) > + self.dut.kill_all() > -- > 1.7.9.5