From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, lihongx.ma@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version
Date: Mon, 17 Feb 2020 14:34:37 +0800 [thread overview]
Message-ID: <20200217063437.14606-2-yufengx.mo@intel.com> (raw)
In-Reply-To: <20200217063437.14606-1-yufengx.mo@intel.com>
message
display invalid firmware version message.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
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
next prev parent reply other threads:[~2020-02-17 6:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 6:34 [dts] [PATCH V1 0/1] tests/userspace_ethtool: display invalid firmware version message yufengmx
2020-02-17 6:34 ` yufengmx [this message]
2020-02-17 9:46 ` [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200217063437.14606-2-yufengx.mo@intel.com \
--to=yufengx.mo@intel.com \
--cc=dts@dpdk.org \
--cc=lihongx.ma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).