From: "Liu, Yong" <yong.liu@intel.com>
To: "Luo, Michael" <michael.luo@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH] tests/pmdrss_hash: check reta_lines before verifying the result
Date: Sun, 11 Feb 2018 01:38:54 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62F9DA07@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1518087481-53786-1-git-send-email-michael.luo@intel.com>
Thanks, Michael.
I'm fine with the logic refine, but variable "reta_lines" should better be an argument of verify function than a global variable.
Could you please modify your patch?
Regards,
Marvin
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of michael.luo@intel.com
> Sent: Thursday, February 08, 2018 6:58 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH] tests/pmdrss_hash: check reta_lines before
> verifying the result
>
> From: Luo Gaoliang <michael.luo@intel.com>
>
> If reta_lines was empty, DTS shows the test case passed still.
> So add the checking of reta_lines before verifying result.
>
> Signed-off-by: Luo Gaoliang <michael.luo@intel.com>
> ---
> tests/TestSuite_pmdrss_hash.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/TestSuite_pmdrss_hash.py
> b/tests/TestSuite_pmdrss_hash.py
> index 78e4075..7a1f870 100644
> --- a/tests/TestSuite_pmdrss_hash.py
> +++ b/tests/TestSuite_pmdrss_hash.py
> @@ -184,6 +184,7 @@ class TestPmdrssHash(TestCase):
> global reta_lines
> global reta_num
> result = []
> + self.verify(len(reta_lines) > 0, 'No packet received!')
> self.result_table_create(
> ['packet index', 'hash value', 'hash index', 'queue id',
> 'actual queue id', 'pass '])
>
> @@ -370,6 +371,8 @@ class TestPmdrssHash(TestCase):
> item = item.strip()
> if(item.startswith("RSS hash")):
> name, value = item.split("=", 1)
> + else:
> + continue
>
> reta_line[name.strip()] = value.strip()
> reta_lines.append(reta_line)
> @@ -384,6 +387,7 @@ class TestPmdrssHash(TestCase):
> global reta_lines
> global reta_num
> result = []
> + self.verify(len(reta_lines) > 0, 'No packet received!')
> self.result_table_create(
> ['packet index', 'RSS hash', 'hash index', 'queue id',
> 'actual queue id', 'pass '])
>
> --
> 2.7.4
next prev parent reply other threads:[~2018-02-11 1:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 10:58 michael.luo
2018-02-11 1:38 ` Liu, Yong [this message]
2018-02-28 10:15 ` [dts] [PATCH v2] " michael.luo
2018-03-02 10:15 ` Liu, Yong
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=86228AFD5BCD8E4EBFD2B90117B5E81E62F9DA07@SHSMSX103.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
--cc=michael.luo@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).