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 C7368424B9; Mon, 30 Jan 2023 04:27:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9747640EDD; Mon, 30 Jan 2023 04:27:03 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id F320640A8A for ; Mon, 30 Jan 2023 04:27:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675049222; x=1706585222; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=e6SBGJFfSK3UeRokOa+QwFYh8iJN2bL7OlFlDLj0jwg=; b=Pudpj3/JmBFxO/7zP1pYvvV+2IH+XLFB9E+ZCXcB2sFMgDib5YaYnDIr 9f4NMtc6ckUyJ0eKYS61/m7N0q0TeoHxQxTWhf5Yp/SzWxIbK/lEEu9jK gEAkVqRUoQtBYqXyiPCc/QeFgnllUtVzOxXUVAYVIj2vl7SHJmSCKS0vK 88gPOajN/eDjdEA+gf+Jr+xWUTMLG0d+lG+Ga3b3z2aHg4Zb7mlKh/OcI UJz/flnZ2MJAiH3k2EBr6lzQ/Ir+GiTYVJM+oBCsjtl1addgjy3Lbl/QP pyEd1hTOEO9a1PVzO+HZoGQH+t80AST9vNJFLlOZgwe0agILawGAUBiiM w==; X-IronPort-AV: E=McAfee;i="6500,9779,10605"; a="325161841" X-IronPort-AV: E=Sophos;i="5.97,257,1669104000"; d="scan'208";a="325161841" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2023 19:27:01 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10605"; a="657290832" X-IronPort-AV: E=Sophos;i="5.97,257,1669104000"; d="scan'208";a="657290832" Received: from unknown (HELO localhost.localdomain) ([10.239.252.20]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2023 19:26:59 -0800 From: Song Jiale To: dts@dpdk.org Cc: Song Jiale Subject: [dts] [PATCH V1] tests/ice_ecpri: optimize script Date: Mon, 30 Jan 2023 11:24:28 +0000 Message-Id: <20230130112428.4011515-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 there may be logs containing "#" in dmesg information, this "#" is not the expected value, which will affect the subsequent tests and cause the case to fail randomly. Signed-off-by: Song Jiale --- tests/TestSuite_ice_ecpri.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_ice_ecpri.py b/tests/TestSuite_ice_ecpri.py index 4b60478b..580641e5 100644 --- a/tests/TestSuite_ice_ecpri.py +++ b/tests/TestSuite_ice_ecpri.py @@ -342,7 +342,7 @@ class TestICEEcpri(TestCase): self.pmd_output.execute_cmd( "port config 0 udp_tunnel_port add ecpri {}".format(self.right_ecpri) ) - self.new_session.send_expect("dmesg -c", "#") + self.new_session.send_expect("dmesg -c", "[~|~\]]# ") self.new_session.send_expect( "ip link add vx0 type vxlan id 100 local 1.1.1.1 remote " "2.2.2.2 dev {} dstport 0x1234".format(self.pf_interface), @@ -350,19 +350,19 @@ class TestICEEcpri(TestCase): ) self.new_session.send_expect("ifconfig vx0 up", "#") self.new_session.send_expect("ifconfig vx0 down", "#") - out = self.new_session.send_expect("dmesg", "#") + out = self.new_session.send_expect("dmesg", "[~|~\]]# ") self.verify( "Cannot config tunnel, the capability is used by DCF" in out, "port can used by another thread!", ) # delete eCPRI port config and test - self.new_session.send_expect("dmesg -c", "#") + self.new_session.send_expect("dmesg -c", "[~|~\]]# ") self.pmd_output.execute_cmd( "port config 0 udp_tunnel_port rm ecpri {}".format(self.right_ecpri) ) self.new_session.send_expect("ifconfig vx0 up", "#") self.new_session.send_expect("ifconfig vx0 down", "# ") - out = self.new_session.send_expect("dmesg", "#") + out = self.new_session.send_expect("dmesg", "[~|~\]]# ") self.verify( "Cannot config tunnel, the capability is used by DCF" not in out, "port can't used by another thread!", -- 2.25.1