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 97807A0552; Mon, 17 Feb 2020 07:31:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ED97E1BF7D; Mon, 17 Feb 2020 07:31:35 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 77AD71DBD for ; Mon, 17 Feb 2020 07:31:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Feb 2020 22:31:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,451,1574150400"; d="scan'208";a="228316573" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.222]) by orsmga008.jf.intel.com with ESMTP; 16 Feb 2020 22:31:32 -0800 From: yufengmx To: dts@dpdk.org, lihongx.ma@intel.com Cc: yufengmx Date: Mon, 17 Feb 2020 14:34:37 +0800 Message-Id: <20200217063437.14606-2-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200217063437.14606-1-yufengx.mo@intel.com> References: <20200217063437.14606-1-yufengx.mo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version 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" message display invalid firmware version message. Signed-off-by: yufengmx --- tests/TestSuite_userspace_ethtool.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py index 8f87ac2..57eb4fd 100644 --- a/tests/TestSuite_userspace_ethtool.py +++ b/tests/TestSuite_userspace_ethtool.py @@ -199,7 +199,12 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): out = result[0] if len(out) == 2: if out[0] == 'firmware-version': - sys_nic_info[out[0]] = "0x" + re.findall(firmwarePat, out[1], re.M)[0] + result2 = re.findall(firmwarePat, out[1], re.M) + if not result2: + msg = ("{} can not get firmware-version," + "ignore left check").format(self.nic) + raise VerifyFailure(msg) + sys_nic_info[out[0]] = "0x" + result2[0] else: sys_nic_info[out[0]] = out[1] return sys_nic_info -- 2.21.0