[dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite

Mo, YufengX yufengx.mo at intel.com
Thu Jan 12 06:45:36 CET 2017


ok.

> -----Original Message-----
> From: Liu, Yong
> Sent: January 12, 2017 1:42 PM
> To: Mo, YufengX; Xu, HuilongX; dts at dpdk.org
> Subject: RE: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite
> 
> 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 and then analyze the result.
> 
> Regards,
> Marvin
> 
> > -----Original Message-----
> > From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Liu, Yong
> > Sent: Wednesday, January 11, 2017 4:55 PM
> > To: Xu, HuilongX <huilongx.xu at intel.com>; dts at dpdk.org
> > Subject: Re: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite
> >
> > Huilong, strip eeprom image is required before compare md5. Please check 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 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 same 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 <huilongx.xu at intel.com>
> > > ---
> > >   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 = os.sep + "root" + self.dut.base_dir[1:] + os.sep
> > > -        with open( basePath + os.sep + dpdk_eeprom_file, 'rb') as fpDpdk:
> > > -            dpdk_bytes = fpDpdk.read()
> > > -            dpdk_length = len(dpdk_bytes)
> > > -
> > > -        with open( basePath + linux_eeprom_file, 'rb') as fplinux:
> > > -            linux_bytes = fplinux.read()
> > > -            linux_length = len(linux_bytes)
> > > -
> > > -        self.verify(dpdk_length <= linux_length,
> > > -                    "linux ethtool haven't dump out enough data as dpdk ethtool")
> > > -
> > > -        with open( basePath + linux_eeprom_file, 'wb') as fplinux:
> > > -            fplinux.write(linux_bytes[:dpdk_length])
> > > -
> > >       def strip_md5(self, filename):
> > >           md5_info = self.dut.send_expect("md5sum %s" % filename, "# ")
> > >           md5_pattern = r"(\w+)  (\w+)"
> > > @@ -294,7 +278,6 @@ class TestUserspaceEthtool(TestCase,
> > IxiaPacketGenerator):
> > >
> > >           for index in range(len(self.ports)):
> > >               md5 = self.strip_md5(portsinfo[index]['eeprom_file'])
> > > -            self.resize_linux_eeprom_file( portsinfo[index]['eeprom_file'],
> > portsinfo[index]['ethtool_eeprom'])
> > >               md5_ref = self.strip_md5(portsinfo[index]['ethtool_eeprom'])
> > >               print utils.GREEN("Reference eeprom md5 %s" % md5)
> > >               print utils.GREEN("Reference eeprom md5_ref %s" %
> > > md5_ref)



More information about the dts mailing list