From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD25442D73; Fri, 30 Jun 2023 09:03:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71C3D40EDB; Fri, 30 Jun 2023 09:03:35 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id E903D4021F for ; Fri, 30 Jun 2023 09:03:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688108613; x=1719644613; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1cmne4ZixiO/B9X7+o7bF9259RN5TSSNYTKpIz6DNTk=; b=D7cY1RFv5UDeBx1hR+ywNPH2a/Jl06UO1BBzhIOlBIOR8xwN7SXdxTfC UuZBiqiKYPVkYA5sJCZNH+b7oH2IUi+S5PO4Gj8ApsdBSxG7ubRpWbQ8T jxeuzfNKNP4cTYZ1OTO3vgZ/gjM1myqv75Analbr3FdhC5U1oJnnfl+Bu s8lb7BVitM96PADqLhT8YCAgJOYm7fjh4uRTEwn3IWz6SzNVbwn2lRYn6 JmP9s54CI+UAyIHwtNhjdrGCcdsoRPKbo+JfXE3L2HLYMA0ekT6xN43jb uVr+MTzwkdN6uus8JLq+seTbw5SgCncB2NmEKx7ZiTm2kX/Ms6UydDWx2 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="448710810" X-IronPort-AV: E=Sophos;i="6.01,170,1684825200"; d="scan'208";a="448710810" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2023 00:03:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="694930278" X-IronPort-AV: E=Sophos;i="6.01,170,1684825200"; d="scan'208";a="694930278" Received: from unknown (HELO dpdk.sh.intel.com) ([10.239.252.241]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2023 00:03:29 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1] tests/vf_pmd_stacked_bonded: optimize scripts Date: Fri, 30 Jun 2023 23:19:43 +0800 Message-Id: <20230630151943.103932-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 when rebinding the network card to the kdriver, the network card link status is down, and the network card should be up first before checking the status. Signed-off-by: Jiale Song --- tests/TestSuite_vf_pmd_stacked_bonded.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_vf_pmd_stacked_bonded.py b/tests/TestSuite_vf_pmd_stacked_bonded.py index 4c3fe634..f330db55 100644 --- a/tests/TestSuite_vf_pmd_stacked_bonded.py +++ b/tests/TestSuite_vf_pmd_stacked_bonded.py @@ -445,11 +445,10 @@ class TestVfPmdStackedBonded(TestCase): Run before each test case. """ self.create_vfs(pf_list=self.dut_ports, vf_num=1) - port0_stats = self.dut.is_interface_up(self.dport_ifaces_port0) - port1_stats = self.dut.is_interface_up(self.dport_ifaces_port1) - if not all([port0_stats, port1_stats]): - self.dut.send_expect(f"ip link set {self.dport_ifaces_port0} up", "# ") - self.dut.send_expect(f"ip link set {self.dport_ifaces_port1} up", "# ") + self.dut.send_expect(f"ip link set {self.dport_ifaces_port0} up", "# ") + self.dut.send_expect(f"ip link set {self.dport_ifaces_port1} up", "# ") + self.dut.is_interface_up(self.dport_ifaces_port0) + self.dut.is_interface_up(self.dport_ifaces_port1) self.eal_param = "" for pci in self.vfs_pci: self.eal_param += " -a %s" % pci -- 2.25.1