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 B7624A00BE; Tue, 29 Oct 2019 10:26:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A18211BED0; Tue, 29 Oct 2019 10:26:45 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 37BC81BECB for ; Tue, 29 Oct 2019 10:26:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 02:26:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,243,1569308400"; d="scan'208";a="211694007" Received: from unknown (HELO dpdk-wenjielx-KVM190.icx.intel.com) ([10.238.54.190]) by orsmga002.jf.intel.com with ESMTP; 29 Oct 2019 02:26:41 -0700 From: Wenjie Li To: dts@dpdk.org Cc: Wenjie Li Date: Tue, 29 Oct 2019 18:16:41 +0000 Message-Id: <1572373001-15731-1-git-send-email-wenjiex.a.li@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/dynamic_config and tx_preparation:ensure port is up before send pkt 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 port is up before send packets. Signed-off-by: Wenjie Li --- tests/TestSuite_dynamic_config.py | 5 +++++ tests/TestSuite_tx_preparation.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/tests/TestSuite_dynamic_config.py b/tests/TestSuite_dynamic_config.py index 301f5b7..5e55b57 100644 --- a/tests/TestSuite_dynamic_config.py +++ b/tests/TestSuite_dynamic_config.py @@ -40,6 +40,8 @@ import utils import time from test_case import TestCase +from pmd_output import PmdOutput + # # @@ -100,6 +102,9 @@ class TestDynamicConfig(TestCase): """ Send 1 packet to portid """ + self.pmd_output = PmdOutput(self.dut) + res = self.pmd_output.wait_link_status_up("all", 30) + self.verify(res is True, "there have port link is down") itf = self.tester.get_interface(self.tester.get_local_port(portid)) diff --git a/tests/TestSuite_tx_preparation.py b/tests/TestSuite_tx_preparation.py index 366a547..215e961 100644 --- a/tests/TestSuite_tx_preparation.py +++ b/tests/TestSuite_tx_preparation.py @@ -116,6 +116,10 @@ class TestTX_preparation(TestCase): """ Send packet to portid and output """ + self.pmd_output = PmdOutput(self.dut) + res = self.pmd_output.wait_link_status_up("all", 30) + self.verify(res is True, "there have port link is down") + LrgLength = random.randint(Normal_mtu, Max_mtu-100) pkts = {'IPv4/cksum TCP': 'Ether(dst="%s")/IP()/TCP(flags=0x10)\ /Raw(RandString(50))' % self.dmac, -- 2.17.1