test suite reviews and discussions
 help / color / mirror / Atom feed
* [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

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).