From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id F398E8DB1 for ; Wed, 2 Dec 2015 08:23:30 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 01 Dec 2015 23:23:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,371,1444719600"; d="scan'208";a="862811269" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by orsmga002.jf.intel.com with ESMTP; 01 Dec 2015 23:23:28 -0800 From: "xu,huilong" To: dts@dpdk.org Date: Wed, 2 Dec 2015 15:18:59 +0800 Message-Id: <1449040739-5395-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V2] fix yocto init core list failed issue 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: , X-List-Received-Date: Wed, 02 Dec 2015 07:23:31 -0000 Signed-off-by: xu,huilong --- framework/crb.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/framework/crb.py b/framework/crb.py index 3c158ec..3470ca1 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -464,6 +464,16 @@ class Crb(object): self.send_expect( "grep --color=never \"processor\\|physical id\\|core id\\|^$\" /proc/cpuinfo", "#", alt_session=True) + + if "processor" not in cpuinfo: + # yocto not support --color=never, but ubuntu must need --color=never, + # so check cpuinfo, before parsing cpuinfo, if cpuifo get error, delete --color=never + # and get cpuinfo again + cpuinfo = \ + self.send_expect( + r'grep "processor\|physical id\|core id\|^$" /proc/cpuinfo', + "#", alt_session=True) + cpuinfo = cpuinfo.split('\r\n\r\n') # haswell cpu on cottonwood core id not correct # need addtional coremap for haswell cpu -- 1.9.3