test suite reviews and discussions
 help / color / mirror / Atom feed
From: "xu,huilong" <huilongx.xu@intel.com>
To: dts@dpdk.org
Cc: "xu,huilong" <huilongx.xu@intel.com>
Subject: [dts] [patch V1] fix retrieve_eeprom in userspace_tools test suite
Date: Mon,  9 Jan 2017 16:47:12 +0800	[thread overview]
Message-ID: <1483951632-34291-1-git-send-email-huilongx.xu@intel.com> (raw)

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

             reply	other threads:[~2017-01-09  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09  8:47 xu,huilong [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483951632-34291-1-git-send-email-huilongx.xu@intel.com \
    --to=huilongx.xu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).