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 27B80A0553; Mon, 17 Feb 2020 10:46:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F3E01DB88; Mon, 17 Feb 2020 10:46:09 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 028B71DB1F for ; Mon, 17 Feb 2020 10:46:07 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 01:46:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,452,1574150400"; d="scan'208";a="227987610" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga007.fm.intel.com with ESMTP; 17 Feb 2020 01:46:06 -0800 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 01:46:06 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 01:46:05 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.141]) with mapi id 14.03.0439.000; Mon, 17 Feb 2020 17:46:03 +0800 From: "Tu, Lijuan" To: "Mo, YufengX" , "dts@dpdk.org" , "Ma, LihongX" CC: "Mo, YufengX" Thread-Topic: [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version Thread-Index: AQHV5Vvy9+5y55d6WkOyNRfv7LTudqgfI2YA Date: Mon, 17 Feb 2020 09:46:02 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBC9AFF@SHSMSX101.ccr.corp.intel.com> References: <20200217063437.14606-1-yufengx.mo@intel.com> <20200217063437.14606-2-yufengx.mo@intel.com> In-Reply-To: <20200217063437.14606-2-yufengx.mo@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 V1 1/1] tests/userspace_ethtool: display invalid firmware version 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 yufengmx > Sent: Monday, February 17, 2020 2:35 PM > To: dts@dpdk.org; Ma, LihongX > Cc: Mo, YufengX > Subject: [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid > firmware version >=20 > message >=20 > display invalid firmware version message. >=20 > Signed-off-by: yufengmx > --- > tests/TestSuite_userspace_ethtool.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/tests/TestSuite_userspace_ethtool.py > b/tests/TestSuite_userspace_ethtool.py > index 8f87ac2..57eb4fd 100644 > --- a/tests/TestSuite_userspace_ethtool.py > +++ b/tests/TestSuite_userspace_ethtool.py > @@ -199,7 +199,12 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > out =3D result[0] > if len(out) =3D=3D 2: > if out[0] =3D=3D 'firmware-version': > - sys_nic_info[out[0]] =3D "0x" + re.findall(firmwareP= at, out[1], > re.M)[0] > + result2 =3D re.findall(firmwarePat, out[1], re.M) > + if not result2: > + msg =3D ("{} can not get firmware-version," > + "ignore left check").format(self.nic) > + raise VerifyFailure(msg) > + sys_nic_info[out[0]] =3D "0x" + result2[0] > else: > sys_nic_info[out[0]] =3D out[1] > return sys_nic_info > -- > 2.21.0