From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A3853152A for ; Mon, 9 Jan 2017 09:46:09 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP; 09 Jan 2017 00:46:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,339,1477983600"; d="scan'208";a="1091630242" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 09 Jan 2017 00:46:06 -0800 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Mon, 9 Jan 2017 16:47:12 +0800 Message-Id: <1483951632-34291-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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: Mon, 09 Jan 2017 08:46:10 -0000 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 --- 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