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 EF934A0563; Tue, 10 Mar 2020 10:01:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D12D51C00E; Tue, 10 Mar 2020 10:01:24 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0C2841C000 for ; Tue, 10 Mar 2020 10:01:22 +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 fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 02:01:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,518,1574150400"; d="scan'208";a="260712706" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 10 Mar 2020 02:01:20 -0700 From: hanyingya To: dts@dpdk.org, lijuan.tu@intel.com Cc: hanyingya Date: Tue, 10 Mar 2020 17:06:46 +0800 Message-Id: <1583831206-152754-1-git-send-email-yingyax.han@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application 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" Signed-off-by: hanyingya --- tests/TestSuite_vmdq_dcb.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_vmdq_dcb.py b/tests/TestSuite_vmdq_dcb.py index 8641c7c..44abffc 100644 --- a/tests/TestSuite_vmdq_dcb.py +++ b/tests/TestSuite_vmdq_dcb.py @@ -93,9 +93,14 @@ class TestVmdqDcb(TestCase): """ Rebuild dpdk """ - self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=?/" - "CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/' ./config/common_base" % nb_queue_per_vm, "#", 20) - self.dut.build_install_dpdk(self.target) + out = self.dut.send_expect("grep 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM' ./config/common_base", "#", 20) + vm_num = re.findall(r'\d+', out)[-1] + if str(nb_queue_per_vm) == vm_num: + return + else: + self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/CONFIG_RTE_LIBRTE_I40E_" + "QUEUE_NUM_PER_VM=%s/' ./config/common_base" % (vm_num, nb_queue_per_vm), "#", 20) + self.dut.build_install_dpdk(self.target) def start_application(self, npools, ntcs): """ -- 2.17.2