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 97D75A04A2; Thu, 24 Feb 2022 08:29:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FD1841176; Thu, 24 Feb 2022 08:29:23 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 8138641176 for ; Thu, 24 Feb 2022 08:29:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645687762; x=1677223762; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JlSWHq3SXsDvbNXj3Go7VSvVb2A0Nf6tln4/ntfGh70=; b=UV1+evtKEoB4YkgeQF+R46KDPz9udixzBYVpAXRt5oAF+2PeMbY7QBg/ qng96VfSue/3Z/eBfyAJxuf4xPpij0E+pD6YxRvz9yoUsBkV4/gb0cq6z VYcMwufBslXrhDXTYNrchYwe4jurwBRLKsWzdgNToopDEsGjp7kRNTHyj 9i5t22dzaHkX6r7nzpmFKRMp1oQGgXnsHUzkH6rKJFCPwuOmTkMR87bR9 4gn7rL8u+wumjPSZD6vFt0gAHNcmRVwmuw7qCEv+ucaHB+PZGf3TqGWTJ Qa4tdf95j101aQfRt4+7P4T1zz5h36NI9ezJmdv6NQDEraZYsbwu0lrMl A==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="252364563" X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="252364563" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 23:29:22 -0800 X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="491506793" Received: from unknown (HELO localhost.localdomain) ([10.239.251.226]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 23:29:20 -0800 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1 2/2] tests/interrupt_pmd: wait for interface up Date: Thu, 24 Feb 2022 15:28:51 +0000 Message-Id: <20220224152851.1511890-3-yux.jiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220224152851.1511890-1-yux.jiang@intel.com> References: <20220224152851.1511890-1-yux.jiang@intel.com> 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 optimize script: interrupt_pmd, use new method: is_interface_up to to ensure iface's link status before send_packets Signed-off-by: Yu Jiang --- tests/TestSuite_interrupt_pmd.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_interrupt_pmd.py b/tests/TestSuite_interrupt_pmd.py index db8efe44..dd413aca 100644 --- a/tests/TestSuite_interrupt_pmd.py +++ b/tests/TestSuite_interrupt_pmd.py @@ -129,10 +129,11 @@ class TestInterruptPmd(TestCase): Send a packet to port """ for i in range(len(self.dut_ports[:portnum])): + txport = self.tester.get_local_port(self.dut_ports[i]) + mac = self.dut.get_mac_address(self.dut_ports[i]) + txItf = self.tester.get_interface(txport) + self.verify(self.tester.is_interface_up(intf=txItf), "Tester's %s should be up".format(txItf)) for j in range(num): - txport = self.tester.get_local_port(self.dut_ports[i]) - mac = self.dut.get_mac_address(self.dut_ports[i]) - txItf = self.tester.get_interface(txport) self.tester.scapy_append( 'sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf)) self.tester.scapy_execute() -- 2.25.1