From patchwork Fri Aug 12 06:50:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 114854 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15295A034C; Fri, 12 Aug 2022 08:50:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF3B9406A2; Fri, 12 Aug 2022 08:50:53 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id CED3740697 for ; Fri, 12 Aug 2022 08:50:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660287052; x=1691823052; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=RY7NvNs/TYrWdjmfgafXU1UGTr70WAAmUD4j/8D8hGI=; b=fdogq6Smq5X4EvEOOL60/iwexyNKG2FFS5ab3Q9wMagRu2IWvZ4oHmif 973v63UVHEAl64anrGqKmSWUX/fuq5egC5of2f0JXTimXc0QSKPaLo6PB gkl5tWhlx/jA8XSBxSM/titp3MN4rZOCOGxP9SKeaVlvYspokj67sy4wB mB8VcGzEAdIcEdQpsOIvtfHlklF82LSggYD7dOH0A29XHPbjiMBIOPqbP Sb7HgTp9Apxfr5asOltlVer75/e3MH21KfdzfykB3SvG+I8jlb3IheUSy dGxrx0t6qoqibNr+Q3fQkayLS12KlyMbNj0adr+4AGhuclJBOlYO74QpT w==; X-IronPort-AV: E=McAfee;i="6400,9594,10436"; a="353279253" X-IronPort-AV: E=Sophos;i="5.93,231,1654585200"; d="scan'208";a="353279253" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 23:50:51 -0700 X-IronPort-AV: E=Sophos;i="5.93,231,1654585200"; d="scan'208";a="581982833" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 23:50:49 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1] tests/vf_vlan: add restart testpmd after remove vlan according to testplan Date: Fri, 12 Aug 2022 14:50:55 +0800 Message-Id: <20220812065055.30765-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org According to testplan need to add restart testpmd after remove vlan. Signed-off-by: Weiyuan Li --- tests/TestSuite_vf_vlan.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index e73ad479..842299a1 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -222,16 +222,19 @@ class TestVfVlan(TestCase): # remove vlan self.vm0_testpmd.execute_cmd("stop") - self.vm0_testpmd.execute_cmd("port stop all") + self.vm0_testpmd.quit() self.dut.send_expect("ip link set %s vf 0 vlan 0" % self.host_intf0, "# ") out = self.dut.send_expect("ip link show %s" % self.host_intf0, "# ") self.verify("vlan %d" % random_vlan not in out, "Failed to remove pvid on VF0") - # send packet with vlan - self.vm0_testpmd.execute_cmd("port reset 0", "testpmd> ", 120) - self.vm0_testpmd.execute_cmd("port start all") + # restart testpmd + self.vm0_testpmd = PmdOutput(self.vm_dut_0) + self.vm0_testpmd.start_testpmd(VM_CORES_MASK) + self.vm0_testpmd.execute_cmd("set fwd rxonly") + self.vm0_testpmd.execute_cmd("set verbose 1") self.vm0_testpmd.execute_cmd("start") + # send packet with vlan out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") if self.kdriver == "i40e" and self.driver_version < "2.13.10": self.verify("received" in out, "Failed to received vlan packet!!!")