test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V2] tests/cvl_advanced_iavf_rss:need quit testpmd to restore env
@ 2020-07-02  2:53 Xie wei
  2020-07-02  7:19 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Xie wei @ 2020-07-02  2:53 UTC (permalink / raw)
  To: dts; +Cc: Xie wei

need quit testpmd before rmmoding ice.

Signed-off-by: Xie wei <weix.xie@intel.com>
---
 tests/TestSuite_cvl_advanced_iavf_rss.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_cvl_advanced_iavf_rss.py b/tests/TestSuite_cvl_advanced_iavf_rss.py
index 1e6ac19..eaf55fa 100644
--- a/tests/TestSuite_cvl_advanced_iavf_rss.py
+++ b/tests/TestSuite_cvl_advanced_iavf_rss.py
@@ -1112,10 +1112,15 @@ class AdvancedIavfRSSTest(TestCase):
         self.create_testpmd_command(self.vf0_prop)
         error_rule = ["flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end ",
                       "flow create 0 ingress pattern eth / ipv6 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end ", ]
-        for rule in error_rule:
-            out = self.pmd_output.execute_cmd(rule)
-            self.verify("Failed to create flow" in out, "Rule can be created")
-        self.replace_pkg(self.comms_pkg_name)
+        try:
+            for rule in error_rule:
+                out = self.pmd_output.execute_cmd(rule)
+                self.verify("Failed to create flow" in out, "Rule can be created")
+        except Exception as e:
+            raise Exception(e)
+        finally:
+            self.pmd_output.quit()
+            self.replace_pkg(self.comms_pkg_name)
 
     def replace_pkg(self, pkg):
         self.dut_session.send_expect("cd %s" % self.ddp_fdir, "# ")
-- 
2.17.1


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

* Re: [dts] [PATCH V2] tests/cvl_advanced_iavf_rss:need quit testpmd to restore env
  2020-07-02  2:53 [dts] [PATCH V2] tests/cvl_advanced_iavf_rss:need quit testpmd to restore env Xie wei
@ 2020-07-02  7:19 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-07-02  7:19 UTC (permalink / raw)
  To: Xie, WeiX, dts; +Cc: Xie, WeiX

Applied, thanks

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xie wei
> Sent: 2020^[$BG/^[(B7^[$B7n^[(B2^[$BF|^[(B 10:54
> To: dts@dpdk.org
> Cc: Xie, WeiX <weix.xie@intel.com>
> Subject: [dts] [PATCH V2] tests/cvl_advanced_iavf_rss:need quit testpmd to
> restore env
> 
> need quit testpmd before rmmoding ice.
> 
> Signed-off-by: Xie wei <weix.xie@intel.com>
> ---
>  tests/TestSuite_cvl_advanced_iavf_rss.py | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/TestSuite_cvl_advanced_iavf_rss.py
> b/tests/TestSuite_cvl_advanced_iavf_rss.py
> index 1e6ac19..eaf55fa 100644
> --- a/tests/TestSuite_cvl_advanced_iavf_rss.py
> +++ b/tests/TestSuite_cvl_advanced_iavf_rss.py
> @@ -1112,10 +1112,15 @@ class AdvancedIavfRSSTest(TestCase):
>          self.create_testpmd_command(self.vf0_prop)
>          error_rule = ["flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end
> actions rss types pfcp end key_len 0 queues end / end ",
>                        "flow create 0 ingress pattern eth / ipv6 / udp / pfcp / end actions
> rss types pfcp end key_len 0 queues end / end ", ]
> -        for rule in error_rule:
> -            out = self.pmd_output.execute_cmd(rule)
> -            self.verify("Failed to create flow" in out, "Rule can be created")
> -        self.replace_pkg(self.comms_pkg_name)
> +        try:
> +            for rule in error_rule:
> +                out = self.pmd_output.execute_cmd(rule)
> +                self.verify("Failed to create flow" in out, "Rule can be created")
> +        except Exception as e:
> +            raise Exception(e)
> +        finally:
> +            self.pmd_output.quit()
> +            self.replace_pkg(self.comms_pkg_name)
> 
>      def replace_pkg(self, pkg):
>          self.dut_session.send_expect("cd %s" % self.ddp_fdir, "# ")
> --
> 2.17.1


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02  2:53 [dts] [PATCH V2] tests/cvl_advanced_iavf_rss:need quit testpmd to restore env Xie wei
2020-07-02  7:19 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox