From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AF4909E5 for ; Mon, 6 Jul 2015 09:36:57 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 06 Jul 2015 00:36:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,413,1432623600"; d="scan'208";a="756690208" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 06 Jul 2015 00:36:54 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t667ar8r002547; Mon, 6 Jul 2015 15:36:53 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t667aoa0004068; Mon, 6 Jul 2015 15:36:52 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t667aofN004064; Mon, 6 Jul 2015 15:36:50 +0800 From: "huilongx,xu" To: dts@dpdk.org Date: Mon, 6 Jul 2015 15:36:48 +0800 Message-Id: <1436168208-4027-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH V2]fix queue start stop case failed for fovtille nic 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, 06 Jul 2015 07:37:02 -0000 From: huilong xu Signed-off-by: huilong xu --- tests/TestSuite_queue_start_stop.py | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py index 41777ac..3692aca 100644 --- a/tests/TestSuite_queue_start_stop.py +++ b/tests/TestSuite_queue_start_stop.py @@ -92,23 +92,18 @@ class TestQueueStartStop(TestCase): self.tester.scapy_foreground() - if self.nic in ["fortville_eagle", "fortville_spirit", - "fortville_spirit_single", "bartonhills", - "powerville", "springville", "hartwell"]: - pktlen = pktSize - 22 - else: - pktlen = pktSize - 18 + pktlen = pktSize - 14 padding = pktlen - 20 - self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="\x50"*%s)], iface="%s")' % (mac, padding, txitf)) + self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="P"*%s)], iface="%s")' % (mac, padding, txitf)) self.tester.scapy_execute() time.sleep(3) out = self.tester.scapy_get_result() if received: - self.verify('\x50\x50\x50' in out, "start queue failed") + self.verify('PPP' in out, "start queue failed") else: - self.verify('\x50\x50\x50' not in out, "stop queue failed") + self.verify('PPP' not in out, "stop queue failed") def add_code_to_dpdk(self, file_name, standard_row, add_rows, offset=0): """ @@ -148,14 +143,15 @@ class TestQueueStartStop(TestCase): """ queue start/stop test for fortville nic """ - fwdmac_file = os.getcwd() + r'/dep/dpdk/app/test-pmd/macfwd.c' + self.dut.session.copy_file_from(r'%s/app/test-pmd/macfwd.c' % self.dut.base_dir) + fwdmac_file = 'macfwd.c' printf_lines = ['printf("ports %u queue %u revice %u packages", fs->rx_port, fs->rx_queue, nb_rx);\n', r'printf("\n");',"\n"] sourcelines = self.add_code_to_dpdk(fwdmac_file, r'(unlikely(nb_rx == 0)', printf_lines, 2) self.dut.session.copy_file_to(fwdmac_file) self.dut.send_expect('scp /root/macfwd.c %s/app/test-pmd/macfwd.c' % self.dut.base_dir, "#") self.dut.build_dpdk_apps('./app/test-pmd') - self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i", "testpmd>", 120) + self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i --portmask=0x3", "testpmd>", 120) self.dut.send_expect("set fwd mac", "testpmd>") self.dut.send_expect("start", "testpmd>") self.check_forwarding([0, 1], self.nic) @@ -185,11 +181,14 @@ class TestQueueStartStop(TestCase): self.dut.send_expect("port 1 txq 0 start", "testpmd>") self.dut.send_expect("start", "testpmd>") self.check_forwarding([0, 1], self.nic) + self.dut.send_expect("quit", "testpmd>") # recover testpmd changed file_handel = open(fwdmac_file, "w") file_handel.writelines(sourcelines) file_handel.close() + self.dut.session.copy_file_to(fwdmac_file) + self.dut.send_expect('scp /root/macfwd.c %s/app/test-pmd/macfwd.c' % self.dut.base_dir, "#") def tear_down(self): """ -- 1.7.4.4