test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 0/1] tests/userspace_ethtool: display invalid firmware version message
@ 2020-02-17  6:34 yufengmx
  2020-02-17  6:34 ` [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version yufengmx
  0 siblings, 1 reply; 3+ messages in thread
From: yufengmx @ 2020-02-17  6:34 UTC (permalink / raw)
  To: dts, lihongx.ma; +Cc: yufengmx

display invalid firmware version message. 

yufengmx (1):
  tests/userspace_ethtool: display invalid firmware version message

 tests/TestSuite_userspace_ethtool.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version
  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
  2020-02-17  9:46   ` Tu, Lijuan
  0 siblings, 1 reply; 3+ messages in thread
From: yufengmx @ 2020-02-17  6:34 UTC (permalink / raw)
  To: dts, lihongx.ma; +Cc: yufengmx

 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version
  2020-02-17  6:34 ` [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version yufengmx
@ 2020-02-17  9:46   ` Tu, Lijuan
  0 siblings, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-02-17  9:46 UTC (permalink / raw)
  To: Mo, YufengX, dts, Ma,  LihongX; +Cc: Mo, YufengX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx
> Sent: Monday, February 17, 2020 2:35 PM
> To: dts@dpdk.org; Ma, LihongX <lihongx.ma@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid
> firmware version
> 
>  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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-17  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17  6:34 [dts] [PATCH V1 0/1] tests/userspace_ethtool: display invalid firmware version message yufengmx
2020-02-17  6:34 ` [dts] [PATCH V1 1/1] tests/userspace_ethtool: display invalid firmware version yufengmx
2020-02-17  9:46   ` Tu, Lijuan

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).