* [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite
@ 2017-01-09 8:47 xu,huilong
2017-01-11 8:55 ` Liu, Yong
0 siblings, 1 reply; 5+ messages in thread
From: xu,huilong @ 2017-01-09 8:47 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
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@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)
--
1.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite
2017-01-09 8:47 [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite xu,huilong
@ 2017-01-11 8:55 ` Liu, Yong
2017-01-12 5:42 ` Liu, Yong
0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2017-01-11 8:55 UTC (permalink / raw)
To: xu,huilong, dts
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@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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite
2017-01-11 8:55 ` Liu, Yong
@ 2017-01-12 5:42 ` Liu, Yong
2017-01-12 5:45 ` Mo, YufengX
2017-01-12 5:52 ` Mo, YufengX
0 siblings, 2 replies; 5+ messages in thread
From: Liu, Yong @ 2017-01-12 5:42 UTC (permalink / raw)
To: Mo, YufengX, Xu, HuilongX, dts
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@dpdk.org] On Behalf Of Liu, Yong
> Sent: Wednesday, January 11, 2017 4:55 PM
> To: Xu, HuilongX <huilongx.xu@intel.com>; dts@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@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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite
2017-01-12 5:42 ` Liu, Yong
@ 2017-01-12 5:45 ` Mo, YufengX
2017-01-12 5:52 ` Mo, YufengX
1 sibling, 0 replies; 5+ messages in thread
From: Mo, YufengX @ 2017-01-12 5:45 UTC (permalink / raw)
To: Liu, Yong; +Cc: Xu, HuilongX, dts
ok.
> -----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
>
> 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@dpdk.org] On Behalf Of Liu, Yong
> > Sent: Wednesday, January 11, 2017 4:55 PM
> > To: Xu, HuilongX <huilongx.xu@intel.com>; dts@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@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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite
2017-01-12 5:42 ` Liu, Yong
2017-01-12 5:45 ` Mo, YufengX
@ 2017-01-12 5:52 ` Mo, YufengX
1 sibling, 0 replies; 5+ messages in thread
From: Mo, YufengX @ 2017-01-12 5:52 UTC (permalink / raw)
To: Liu, Yong, Xu, HuilongX; +Cc: dts
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
>
> 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@dpdk.org] On Behalf Of Liu, Yong
> > Sent: Wednesday, January 11, 2017 4:55 PM
> > To: Xu, HuilongX <huilongx.xu@intel.com>; dts@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@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)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-12 5:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 8:47 [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite xu,huilong
2017-01-11 8:55 ` Liu, Yong
2017-01-12 5:42 ` Liu, Yong
2017-01-12 5:45 ` Mo, YufengX
2017-01-12 5:52 ` Mo, YufengX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).