From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 19F5D11D9 for ; Thu, 12 Jan 2017 06:42:12 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 11 Jan 2017 21:42:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,348,1477983600"; d="scan'208";a="1082032534" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 11 Jan 2017 21:42:12 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Jan 2017 21:42:11 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Jan 2017 21:42:11 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Thu, 12 Jan 2017 13:42:10 +0800 From: "Liu, Yong" To: "Mo, YufengX" , "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite Thread-Index: AQHSalTlRRbpXkNfaU2rFAHeEIaPXaEydgeAgAHg2uA= Date: Thu, 12 Jan 2017 05:42:10 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D44A1B@SHSMSX103.ccr.corp.intel.com> References: <1483951632-34291-1-git-send-email-huilongx.xu@intel.com> <5875F2E9.5070702@intel.com> In-Reply-To: <5875F2E9.5070702@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] fix retrieve_eeprom in userspace_tools test suite 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: , X-List-Received-Date: Thu, 12 Jan 2017 05:42:13 -0000 Hi Yufen, We cannot assume tester and dut are using the same platform. Now what we ca= n grantee is that DTS is running on the tester. So all temporary used file generated on DUT need to be copied to tester and= then analyze the result.=20 Regards, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Liu, Yong > Sent: Wednesday, January 11, 2017 4:55 PM > To: Xu, HuilongX ; dts@dpdk.org > Subject: Re: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test= suite >=20 > Huilong, strip eeprom image is required before compare md5. Please check = with > mo, yufen. >=20 > On 01/09/2017 04:47 PM, xu,huilong wrote: > > change list: > > 1. remove resize_linux_eeprom_file function, because this function used > python file model, the file should in tester machine > > but the eeprom file on dut machine. so this function can't work. > > 2. remove check eeprom file size, because we check the md5 value is sam= e or > not with userspace app dump eeprom and linux ethtool dumo eeprom > > if the size not same, the md5 value not same. > > > > Signed-off-by: xu,huilong > > --- > > tests/TestSuite_userspace_ethtool.py | 17 ----------------- > > 1 file changed, 17 deletions(-) > > > > diff --git a/tests/TestSuite_userspace_ethtool.py > > b/tests/TestSuite_userspace_ethtool.py > > index ced7e96..439ac8a 100644 > > --- a/tests/TestSuite_userspace_ethtool.py > > +++ b/tests/TestSuite_userspace_ethtool.py > > @@ -128,22 +128,6 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > > else: > > return 1518 > > > > - def resize_linux_eeprom_file(self, dpdk_eeprom_file, linux_eeprom_= file): > > - basePath =3D os.sep + "root" + self.dut.base_dir[1:] + os.sep > > - with open( basePath + os.sep + dpdk_eeprom_file, 'rb') as fpDp= dk: > > - dpdk_bytes =3D fpDpdk.read() > > - dpdk_length =3D len(dpdk_bytes) > > - > > - with open( basePath + linux_eeprom_file, 'rb') as fplinux: > > - linux_bytes =3D fplinux.read() > > - linux_length =3D len(linux_bytes) > > - > > - self.verify(dpdk_length <=3D linux_length, > > - "linux ethtool haven't dump out enough data as dpd= k ethtool") > > - > > - with open( basePath + linux_eeprom_file, 'wb') as fplinux: > > - fplinux.write(linux_bytes[:dpdk_length]) > > - > > def strip_md5(self, filename): > > md5_info =3D self.dut.send_expect("md5sum %s" % filename, "# = ") > > md5_pattern =3D r"(\w+) (\w+)" > > @@ -294,7 +278,6 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > > > > for index in range(len(self.ports)): > > md5 =3D self.strip_md5(portsinfo[index]['eeprom_file']) > > - self.resize_linux_eeprom_file( portsinfo[index]['eeprom_fi= le'], > portsinfo[index]['ethtool_eeprom']) > > md5_ref =3D self.strip_md5(portsinfo[index]['ethtool_eepr= om']) > > print utils.GREEN("Reference eeprom md5 %s" % md5) > > print utils.GREEN("Reference eeprom md5_ref %s" % > > md5_ref)