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 76377A0A0A; Thu, 3 Jun 2021 11:53:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 407ED40E78; Thu, 3 Jun 2021 11:53:24 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 5E74A40DF6 for ; Thu, 3 Jun 2021 11:53:22 +0200 (CEST) IronPort-SDR: IRxKkR/4LGTJIoT4T+Lyg7ZRcfHbo/wZEm2Ck1Iu+VTgNhWfoi7NmQHAdDjMcJRJ83dYnLe/AH SWBQwog3+SDA== X-IronPort-AV: E=McAfee;i="6200,9189,10003"; a="204036607" X-IronPort-AV: E=Sophos;i="5.83,244,1616482800"; d="scan'208";a="204036607" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2021 02:53:19 -0700 IronPort-SDR: hzyIbeDC2UU/hTIuF6CsNkYkua9JRGJPe2j7tWpAhV4yXuZGpKQhRONYahlZd4LCJ6QroIaNOW M2cJN7UjaIpw== X-IronPort-AV: E=Sophos;i="5.83,244,1616482800"; d="scan'208";a="480159131" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2021 02:53:17 -0700 From: Yang Leweix To: dts@dpdk.org Cc: leweix.yang@intel.com Date: Thu, 3 Jun 2021 17:57:58 +0800 Message-Id: <20210603095758.2566-1-leweix.yang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V3] tests:fix some suites impacted by Strip prompt in send_expect 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 Sender: "dts" fix following suites impacted by Strip prompt in send_expect: * flow_classify_softnic * test_ipv4_acl_jump * test_ipv4_acl_table * test_ipv6_hash_jump * unit_tests_loopback * test_link_mode * test_loopback_mode * distributor * maximum_workers Signed-off-by: Yang Leweix --- tests/TestSuite_distributor.py | 2 +- tests/TestSuite_flow_classify_softnic.py | 2 +- tests/TestSuite_unit_tests_loopback.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_distributor.py b/tests/TestSuite_distributor.py index 0f61cc71..cd88977d 100644 --- a/tests/TestSuite_distributor.py +++ b/tests/TestSuite_distributor.py @@ -165,7 +165,7 @@ class TestDistributor(TestCase): self.verify(len(self.dut_ports) >= 1, "Not enough ports") cmd_fmt = "%s %s -- -p 0x1" - out = self.dut.send_expect("sed -n '/#define RTE_DISTRIB_MAX_WORKERS/p' lib/distributor/distributor_private.h", "# ") + out = self.dut.send_expect("sed -n '/#define RTE_DISTRIB_MAX_WORKERS/p' lib/distributor/distributor_private.h", "# ", trim_whitespace=False) reg_match = r"#define RTE_DISTRIB_MAX_WORKERS (.*)" m = re.match(reg_match, out) self.verify(m, "Can't find maximum worker number") diff --git a/tests/TestSuite_flow_classify_softnic.py b/tests/TestSuite_flow_classify_softnic.py index db7a81dd..e5937289 100644 --- a/tests/TestSuite_flow_classify_softnic.py +++ b/tests/TestSuite_flow_classify_softnic.py @@ -129,7 +129,7 @@ class TestFlowClassifySoftnic(TestCase): """ param = "" direct_param = r"(\s+)\[ (\S+) in\|out\|inout \]" - out = self.tester.send_expect('tcpdump -h', '# ') + out = self.tester.send_expect('tcpdump -h', '# ', trim_whitespace=False) for line in out.split('\n'): m = re.match(direct_param, line) if m: diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py index 0198a913..a0467378 100644 --- a/tests/TestSuite_unit_tests_loopback.py +++ b/tests/TestSuite_unit_tests_loopback.py @@ -81,7 +81,7 @@ class TestUnitTestsLoopback(TestCase): pass def get_max_traffic_burst(self): - pmd_file = self.dut.send_expect("cat app/test/test_pmd_perf.c", "# ", 30) + pmd_file = self.dut.send_expect("cat app/test/test_pmd_perf.c", "# ", 30, trim_whitespace=False) result_scanner = r"#define MAX_TRAFFIC_BURST\s+([0-9]+)" scanner = re.compile(result_scanner, re.DOTALL) m = scanner.search(pmd_file) -- 2.17.1