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 AFCB5A00C5; Sun, 26 Apr 2020 04:45:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6FAF41C07E; Sun, 26 Apr 2020 04:45:53 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DBD7B1C026 for ; Sun, 26 Apr 2020 04:45:51 +0200 (CEST) IronPort-SDR: AHhSHmGqJiNmTDLcnUrQp+4k+XSW+dCehVfg0dv6HQqOkZGcJL1VEND/eDRUkKPNSI3+IIym3D p54hrJJGUazg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2020 19:45:50 -0700 IronPort-SDR: NRjWF/QG1MxABdPK6HOpC9ZttkYG6dMYB9rp0RvTp4cikZRAVehEQ3txwRE1TsWnGrWVYk/USA uJrpQKvx1oLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,318,1583222400"; d="scan'208";a="260287207" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 25 Apr 2020 19:45:50 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 25 Apr 2020 19:45:49 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by shsmsx102.ccr.corp.intel.com ([169.254.2.138]) with mapi id 14.03.0439.000; Sun, 26 Apr 2020 10:45:46 +0800 From: "Chen, Zhaoyan" To: "Chen, BoX C" , "dts@dpdk.org" CC: "Chen, BoX C" , "Chen, Zhaoyan" Thread-Topic: [dts] [PATCH V2] tests/ABI_stable: add negative test Thread-Index: AQHWG3CpkM+viIjLaU+YKZmAUFI2nqiKsoZg Date: Sun, 26 Apr 2020 02:45:45 +0000 Message-ID: <9DEEADBC57E43F4DA73B571777FECECA41F329AE@SHSMSX104.ccr.corp.intel.com> References: <20200426021534.20510-1-box.c.chen@intel.com> In-Reply-To: <20200426021534.20510-1-box.c.chen@intel.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 V2] tests/ABI_stable: add negative test 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" Acked-by: Chen, Zhaoyan Regards, Zhaoyan Chen > -----Original Message----- > From: dts On Behalf Of ChenBo > Sent: Sunday, April 26, 2020 10:16 AM > To: dts@dpdk.org > Cc: Chen, BoX C > Subject: [dts] [PATCH V2] tests/ABI_stable: add negative test >=20 > Add ABI stable test case: negative >=20 > Signed-off-by: ChenBo > --- > tests/TestSuite_ABI_stable.py | 118 > ++++++++++++++++++++++++++++++++++ > 1 file changed, 118 insertions(+) > create mode 100644 tests/TestSuite_ABI_stable.py >=20 > diff --git a/tests/TestSuite_ABI_stable.py b/tests/TestSuite_ABI_stable.p= y > new file mode 100644 index 0000000..522296a > --- /dev/null > +++ b/tests/TestSuite_ABI_stable.py > @@ -0,0 +1,118 @@ > +# BSD LICENSE > +# > +# Copyright (c) <2019-2020>, Intel Corporation # All rights reserved. > + > +# Redistribution and use in source and binary forms, with or without # > +modification, are permitted provided that the following conditions # > +are met: > +# > +# * Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# > +# * Redistributions in binary form must reproduce the above copyright > +# notice, this list of conditions and the following disclaimer in > +# the documentation and/or other materials provided with the > +# distribution. > +# > +# * Neither the name of Intel Corporation nor the names of its > +# contributors may be used to endorse or promote products derived > +# from this software without specific prior written permission. > +# > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS # > +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT # > +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS # FOR > +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # > COPYRIGHT > +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # > INCIDENTAL, > +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT > NOT > +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS > OF USE, > +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED > AND ON ANY > +THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR > TORT > +(INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF > THE USE > +OF THIS SOFTWARE, EVEN IF ADVISED # OF THE POSSIBILITY OF SUCH > DAMAGE. > +# > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +# DPDK ABI Stable Tests > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +# > +# Description > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +# > +# This test suite includes both functional and performance test cases > +to # ensure that DPDK point releases (xx.02, xx.05, xx.08) are not only > +binary # compatible, but are also functionally and reasonably > +performance # compatibly with the previous vxx.11 release. > + > + > +""" > +DPDK Test suite. > + > +Test support of ABI . > + > +""" > +import utils > +import time > + > +from test_case import TestCase > +from pmd_output import PmdOutput > +from settings import load_global_setting, HOST_SHARED_LIB_SETTING, > +HOST_SHARED_LIB_PATH > + > + > +class TestABIStable(TestCase): > + > + def set_up_all(self): > + """ > + Run at the start of each test suite. > + """ > + self.pmdout =3D PmdOutput(self.dut) > + self.dut_ports =3D self.dut.get_ports(self.nic) > + self.port_mask =3D utils.create_mask([self.dut_ports[0]]) > + use_shared_lib =3D load_global_setting(HOST_SHARED_LIB_SETTING) > + self.verify(use_shared_lib !=3D 'ture', "The case only support > + ABI mode") > + > + def set_up(self): > + """ > + Run before each test case. > + """ > + pass > + > + def test_negative(self): > + net_device =3D self.dut.ports_info[0]['port'] > + nic_drive =3D net_device.get_nic_driver() > + shared_lib_path =3D load_global_setting(HOST_SHARED_LIB_PATH) > + self.verify(nic_drive !=3D "ixgbe", "The case only support ixgbe > + drive") > + > + cmd =3D 'rm -rf {}'.format(shared_lib_path) > + self.dut.send_expect(cmd, "#") > + cmd =3D 'cp -a /root/shared_lib_negative {}'.format(shared_lib_p= ath) > + self.dut.send_expect(cmd, "#") > + self.pmdout.start_testpmd("Default", "--portmask=3D{} > ".format(self.port_mask)) > + time.sleep(1) > + self.dut.send_expect("set fwd txonly", "testpmd>") > + self.dut.send_expect("start", "testpmd>") > + time.sleep(1) > + try: > + self.dut.send_expect("quit", "#") > + except Exception as e: > + if 'TIMEOUT' in str(e): > + self.logger.info(str(e)) > + else: > + self.verify(False, "No timeout") > + self.dut.kill_all() > + return > + > + self.verify(False, "negative test failed") > + self.dut.kill_all() > + > + def tear_down(self): > + """ > + Run after each test case. > + """ > + pass > + > + def tear_down_all(self): > + """ > + Run after each test suite. > + """ > + self.dut.kill_all() > -- > 2.17.1