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 50869A0352; Tue, 5 Nov 2019 10:27:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D3CB2C23; Tue, 5 Nov 2019 10:27:42 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 8335A2C08 for ; Tue, 5 Nov 2019 10:27:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2019 01:27:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,270,1569308400"; d="scan'208";a="232404800" Received: from unknown (HELO dpdk-meijianwei-tester.sh.intel.com) ([10.240.179.33]) by fmsmga002.fm.intel.com with ESMTP; 05 Nov 2019 01:27:38 -0800 From: Jianwei Mei To: dts@dpdk.org Cc: Jianwei Mei Date: Tue, 5 Nov 2019 17:27:03 +0800 Message-Id: <1572946023-264438-1-git-send-email-jianweix.mei@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V2] framework/dut.py:correct the code defect. 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" code logic error and modify it. Signed-off-by: Jianwei Mei --- framework/dut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index 54ff28b..4d8874a 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -120,7 +120,7 @@ class Dut(Crb): if config: # deal with cores if config.has_key('cores'): - if config['cores'] == '' or config['cores'] == 'Default': + if config['cores'] == '' or config['cores'].lower() == 'default': core_list = self.get_core_list(default_cores) elif type(config['cores']) == list: core_list = config['cores'] @@ -144,7 +144,7 @@ class Dut(Crb): port_option = config['port_options'][port] w_pci_list.append('-w %s,%s' % (self.ports_info[config['ports'].index(port)]['pci'], port_option)) else: - w_pci_list = ['-w %s' % pci for pci in config['ports']] + w_pci_list.append('-w %s' % self.ports_info[config['ports'].index(port)]['pci']) w_pci_str = ' '.join(w_pci_list) # deal with black ports -- 1.8.3.1