From patchwork Thu Jan 12 07:50:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 121877 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 9C1BC423B4; Thu, 12 Jan 2023 08:59:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 996CD40A7D; Thu, 12 Jan 2023 08:59:35 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 21AAA400EF for ; Thu, 12 Jan 2023 08:59:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673510374; x=1705046374; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eblD3dJeC6rHjWO49HrMWjFcqMhxSNwFxM7hBKQVL4U=; b=C6yM5l8n76UGphkfy7cbs7dGMY73m1E6BEF914kkChwCKwWAROFjvPTH nVvq43aVTEGc2OqNqQj1QNjqFG7bcxbfkIGSl+8BXH8s5PXXGm5zgJsw6 XyPm8ALUIh1pBDil18voSzA4Wdn9R7LjuU9uMiMVXKrbMXIciwFroQNIT 8dAm5xjjthM0eOTYqyzsvHOS4OR69ptMeAOXjzztD4JLzbdCMEZJ7IY7o +xXbbH/IxD0MJGOXIib7LDWkIijalG8uLuDXZ0P0ZrGmwqb2EohgikD9q C1dJAhBdEu0Rh7DdukGZ6AiSb2ucUEVhU9D9S5zSldvdLhlA6DKCXwohc w==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="325664167" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="325664167" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2023 23:59:25 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="607703659" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="607703659" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2023 23:59:24 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1] tests/metrics: fix start wrong dpdk-proc-info path issue Date: Thu, 12 Jan 2023 15:50:04 +0800 Message-Id: <20230112075004.1325372-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 When using self.dut.alt_session.send_expect() API to create new seesion, the current directory is /root, not the DPDK base directory, so add swith to the DPDK base directory step before exectue the dpdk-proc-info command to start the dpdk-proc-info APP. Signed-off-by: Wei Ling --- tests/TestSuite_metrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/TestSuite_metrics.py b/tests/TestSuite_metrics.py index f3111ec6..d7262011 100644 --- a/tests/TestSuite_metrics.py +++ b/tests/TestSuite_metrics.py @@ -42,6 +42,7 @@ class TestMetrics(TestCase): def d_a_con(self, cmd): _cmd = [cmd, "# ", 10] if isinstance(cmd, str) else cmd + self.dut.alt_session.send_expect("cd %s" % self.dut.base_dir, "# ", 10) output = self.dut.alt_session.send_expect(*_cmd) output2 = self.dut.alt_session.session.get_session_before(2) return output + os.linesep + output2