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 9AFDCA04DE; Wed, 27 Nov 2019 03:38:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 76DA71BDAC; Wed, 27 Nov 2019 03:38:51 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 35F6F1BC25 for ; Wed, 27 Nov 2019 03:38:50 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2019 18:38:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,247,1571727600"; d="scan'208";a="260876747" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 26 Nov 2019 18:38:48 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 26 Nov 2019 18:38:48 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 26 Nov 2019 18:38:48 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 26 Nov 2019 18:38:47 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.41]) with mapi id 14.03.0439.000; Wed, 27 Nov 2019 10:38:46 +0800 From: "Ma, LihongX" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1]framework/dut: fix create_eal_parameters method Thread-Index: AQHVo3N48Kao5IKEy0yL5+n8Zh9g+KeeUIQA Date: Wed, 27 Nov 2019 02:38:45 +0000 Message-ID: References: <1574674372-20174-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1574674372-20174-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1]framework/dut: fix create_eal_parameters method 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" Reviewed-by:ma,lihong -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai Sent: Monday, November 25, 2019 5:33 PM To: dts@dpdk.org Cc: Xiao, QimaiX Subject: [dts] [PATCH V1]framework/dut: fix create_eal_parameters method fix create_eal_parameters method Signed-off-by: Xiao Qimai --- framework/dut.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index 4d8874a..f26b081 100= 644 --- a/framework/dut.py +++ b/framework/dut.py @@ -120,12 +120,13 @@ class Dut(Crb): if config: # deal with cores if config.has_key('cores'): - if config['cores'] =3D=3D '' or config['cores'].lower() = =3D=3D 'default': - core_list =3D self.get_core_list(default_cores) - elif type(config['cores']) =3D=3D list: + if type(config['cores']) =3D=3D list: core_list =3D config['cores'] - else: - core_list =3D self.get_core_list(config['cores'], sock= et=3Dsocket) + elif isinstance(config['cores'], str): + if config['cores'] =3D=3D '' or config['cores'].lower(= ) =3D=3D 'default': + core_list =3D self.get_core_list(default_cores) + else: + core_list =3D self.get_core_list(config['cores'],= =20 + socket=3Dsocket) else: core_list =3D self.get_core_list(default_cores) =20 -- 2.17.1