From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C6BF42A58 for ; Tue, 14 Jul 2015 10:09:49 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 14 Jul 2015 01:09:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,470,1432623600"; d="scan'208";a="762029103" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 14 Jul 2015 01:09:44 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6E89cmR022450; Tue, 14 Jul 2015 16:09:38 +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 t6E89Zff015671; Tue, 14 Jul 2015 16:09:37 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6E89Z2v015667; Tue, 14 Jul 2015 16:09:35 +0800 From: Yong Liu To: dts@dpdk.org Date: Tue, 14 Jul 2015 16:09:34 +0800 Message-Id: <1436861374-15635-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] fix bug that tx_vlan command not work in vlan 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: Tue, 14 Jul 2015 08:09:50 -0000 From: Marvin Liu Signed-off-by: Marvin Liu diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py index fc6f2cb..2f5dfd4 100644 --- a/tests/TestSuite_vlan.py +++ b/tests/TestSuite_vlan.py @@ -92,6 +92,7 @@ class TestVlan(TestCase): def get_tcpdump_package(self): self.tester.send_expect("killall tcpdump","#") return self.tester.send_expect("tcpdump -nn -e -v -r ./vlan_test.cap","#") + def vlan_send_packet(self, vid, num=1): """ Send $num of packet to portid @@ -112,6 +113,7 @@ class TestVlan(TestCase): self.tester.scapy_append('sendp([Ether(src="%s",dst="%s")/Dot1Q(vlan=%s)/IP(len=46)], iface="%s")' % (self.smac, self.dmac, vid, txItf)) self.tester.scapy_execute() + def set_up(self): """ Run before each test case. @@ -197,7 +199,7 @@ class TestVlan(TestCase): intf = self.tester.get_interface(port) self.dut.send_expect("set nbport 2", "testpmd> ") - self.dut.send_expect("tx_vlan set %d %s" % (self.vlan, dutTxPortId), "testpmd> ") + self.dut.send_expect("tx_vlan set %s %d" % (dutTxPortId, self.vlan), "testpmd> ") self.tester.scapy_background() self.tester.scapy_append('p = sniff(iface="%s", count=1, timeout=5)' % intf) -- 1.9.3