From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 66898F927 for ; Thu, 12 Jan 2017 06:52:14 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 11 Jan 2017 21:52:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,348,1477983600"; d="scan'208";a="52059075" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 11 Jan 2017 21:52:13 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Jan 2017 21:52:12 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Jan 2017 21:52:12 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Thu, 12 Jan 2017 13:52:10 +0800 From: "Mo, YufengX" To: "Liu, Yong" , "Xu, HuilongX" CC: "dts@dpdk.org" Thread-Topic: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite Thread-Index: AQHSalTlpdrYbU3zC0+tQNsF4+e/raEydgeAgAFcbwCAAIgPsA== Importance: low X-Priority: 5 Date: Thu, 12 Jan 2017 05:52:10 +0000 Message-ID: References: <1483951632-34291-1-git-send-email-huilongx.xu@intel.com> <5875F2E9.5070702@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D44A1B@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62D44A1B@SHSMSX103.ccr.corp.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:52:15 -0000 And those patch won't effect what you said. Get files from dut should be done before the following process. Please make sure what you said is two different issues. I hope those codebe applied before new patch upload. > -----Original Message----- > From: Liu, Yong > Sent: January 12, 2017 1:42 PM > To: Mo, YufengX; Xu, HuilongX; dts@dpdk.org > Subject: RE: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test= suite >=20 > Hi Yufen, > We cannot assume tester and dut are using the same platform. Now what we = can grantee is that DTS is running on the tester. > So all temporary used file generated on DUT need to be copied to tester a= nd then analyze the result. >=20 > Regards, > Marvin >=20 > > -----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 te= st suite > > > > Huilong, strip eeprom image is required before compare md5. Please chec= k with > > mo, yufen. > > > > On 01/09/2017 04:47 PM, xu,huilong wrote: > > > change list: > > > 1. remove resize_linux_eeprom_file function, because this function us= ed > > 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 s= ame 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_eepro= m_file): > > > - basePath =3D os.sep + "root" + self.dut.base_dir[1:] + os.se= p > > > - with open( basePath + os.sep + dpdk_eeprom_file, 'rb') as fp= Dpdk: > > > - 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 d= pdk 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_= file'], > > portsinfo[index]['ethtool_eeprom']) > > > md5_ref =3D self.strip_md5(portsinfo[index]['ethtool_ee= prom']) > > > print utils.GREEN("Reference eeprom md5 %s" % md5) > > > print utils.GREEN("Reference eeprom md5_ref %s" % > > > md5_ref)