From patchwork Tue Feb 2 14:23:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 87611 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D485A052A; Tue, 2 Feb 2021 07:30:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47231240250; Tue, 2 Feb 2021 07:30:28 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id DBDA7240243 for ; Tue, 2 Feb 2021 07:30:26 +0100 (CET) IronPort-SDR: QRnzK+ravDeHgb0iQNh99295Ey8OBOTDeZzKN8HMUPPXY8KgUWMHR6Kmi9K7fomx2BVV3dqQUX XKrQUiuX86zw== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="242322268" X-IronPort-AV: E=Sophos;i="5.79,394,1602572400"; d="scan'208";a="242322268" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 22:30:25 -0800 IronPort-SDR: NOsTn131nRpsGTroBJKNub5I+hprvAUMDMW9+HI+UYkgmoL5v42wZ/L+f1P5ZOGlvA7Wn25Kmx I/bNF1lV3/OA== X-IronPort-AV: E=Sophos;i="5.79,394,1602572400"; d="scan'208";a="391309816" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 22:30:24 -0800 From: Ling Wei To: dts@dpdk.org Cc: Ling Wei Date: Tue, 2 Feb 2021 14:23:40 +0000 Message-Id: <20210202142340.3877630-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V2] framework/pmd_output:start_testpmd interface support expected params 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" v1: In DPDK 9af79db20f4cf,when launch virtio-user testpmd as server mode, virtio-user server side testpmd expected character will be 'wait for client side started...', after client side started, it change to 'testpmd>'. v2: Modify patch comments style issues. Signed-off-by: Ling Wei Tested-by: Wei Ling Acked-by: Wang, Yinan --- framework/pmd_output.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/pmd_output.py b/framework/pmd_output.py index 3daa86b..1ad4ce7 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -103,7 +103,7 @@ class PmdOutput(): def get_pmd_cmd(self): return self.command - def start_testpmd(self, cores='default', param='', eal_param='', socket=0, fixed_prefix=False, **config): + def start_testpmd(self, cores='default', param='', eal_param='', socket=0, fixed_prefix=False, expected='testpmd> ', **config): """ start testpmd with input parameters. :param cores: eg: @@ -148,7 +148,7 @@ class PmdOutput(): command = command.replace(' ', ' ') if self.session != self.dut: self.session.send_expect("cd %s" % self.dut.base_dir, "# ") - out = self.session.send_expect(command, "testpmd> ", 120) + out = self.session.send_expect(command, expected, 120) self.command = command # wait 10s to ensure links getting up before test start. sleep(10)