From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31A75A318B for ; Fri, 18 Oct 2019 10:09:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B5EB1C0CE; Fri, 18 Oct 2019 10:09:13 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 4320E1C0C1 for ; Fri, 18 Oct 2019 10:09:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2019 01:09:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,310,1566889200"; d="scan'208";a="208549237" Received: from unknown (HELO dpdk-wenjielx-KVM190.icx.intel.com) ([10.238.54.190]) by orsmga002.jf.intel.com with ESMTP; 18 Oct 2019 01:09:09 -0700 From: Wenjie Li To: dts@dpdk.org Cc: Wenjie Li Date: Fri, 18 Oct 2019 17:00:47 +0000 Message-Id: <1571418047-13283-1-git-send-email-wenjiex.a.li@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/fdir: ensure port is up before send packets 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" ensure the port is up before send packets; if the port is down, wait for at most 15s, then return failure with 'link is down'. Signed-off-by: Wenjie Li --- tests/TestSuite_fdir.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py index 9f5a812..d74a06e 100644 --- a/tests/TestSuite_fdir.py +++ b/tests/TestSuite_fdir.py @@ -87,6 +87,11 @@ class TestFdir(TestCase, IxiaPacketGenerator): """ self.scapyCmds.append(packet) self.dut.send_expect("start", "testpmd>") + + self.pmd_output = PmdOutput(self.dut) + res = self.pmd_output.wait_link_status_up('all', timeout=15) + self.verify(res is True, 'there have port link is down') + self.scapy_execute() time.sleep(.5) out = self.dut.get_session_output() -- 2.17.1