From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8AE911C00 for ; Fri, 12 May 2017 11:19:42 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 May 2017 02:19:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,328,1491289200"; d="scan'208";a="86723014" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by orsmga004.jf.intel.com with ESMTP; 12 May 2017 02:19:40 -0700 Message-ID: <59157B43.50101@intel.com> Date: Fri, 12 May 2017 17:07:15 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "xu,huilong" , dts@dpdk.org References: <1494575072-44798-1-git-send-email-huilongx.xu@intel.com> <1494575072-44798-7-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1494575072-44798-7-git-send-email-huilongx.xu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH V2] fix user space ethtool failed case 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: Fri, 12 May 2017 09:19:43 -0000 Huilong, some comments below. On 05/12/2017 03:44 PM, xu,huilong wrote: > 1. update user space ethtool compile error, becauese the example path update in dpdk already > 2. kernel space ethtool dump nic eeprom file size differnet dpdk user space ethtool, so should > cat out dpdk ethtool dump nic eeprom file and the file size same with kernel ethtool. then use > file md5 check the file is same > > Signed-off-by: xu,huilong > --- > tests/TestSuite_userspace_ethtool.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py > index 937a9e5..36ff104 100644 > --- a/tests/TestSuite_userspace_ethtool.py > +++ b/tests/TestSuite_userspace_ethtool.py > @@ -61,7 +61,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): > self.verify("Error" not in out, "compilation error 1") > self.verify("No such file" not in out, "compilation error 2") > > - path = "./examples/ethtool/ethtool-app/ethtool-app/%s/ethtool" % self.target > + path = "./examples/ethtool/ethtool-app/%s/ethtool" % self.target > self.cmd = "%s -c f -n %d" % (path, self.dut.get_memory_channels()) > > # pause frame basic configuration > @@ -370,7 +370,9 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): > self.dut.send_expect("ethtool --eeprom-dump %s raw on > %s" % (intf, ethtool_eeprom), "# ") > # wait for file ready > time.sleep(2) > - portinfo['ethtool_eeprom'] = ethtool_eeprom > + dpdk_eeprom_size = int(self.dut.send_expect('ls -all %s' % portinfo['eeprom_file'], '# ').split(' ')[4].strip()) There's one simple command "stat -c \%s file" to strip file size. > + self.dut.send_expect('dd if=%s of=%s bs=%d count=1' % (ethtool_eeprom, "ethtool_eeprom_%d_cat.bin" % index, dpdk_eeprom_size), "#") > + portinfo['ethtool_eeprom'] = "ethtool_eeprom_%d_cat.bin" % index > # bind to original driver > portinfo['net_dev'].bind_driver(portinfo['ori_driver']) > > @@ -499,8 +501,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): > for index in range(len(self.ports)): > port = self.ports[index] > ori_rx_pkts, _ = self.strip_portstats(index) > + time.sleep(10) > # stop port > self.dut.send_expect("stop %d" % index, "EthApp>") > + time.sleep(10) Sleep 20 seconds seem too long, please explain why need this. > # check packet not forwarded when port is stop > pkt = Packet() > tester_port = self.tester.get_local_port(port)