test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio
@ 2019-07-29  5:22 zhuwenhui
  2019-07-29  5:56 ` Zhu, ShuaiX
  2019-07-29  6:36 ` Ma, LihongX
  0 siblings, 2 replies; 4+ messages in thread
From: zhuwenhui @ 2019-07-29  5:22 UTC (permalink / raw)
  To: dts; +Cc: zhuwenhui

change test cases based on dpdk bbe29a9bd7ab6feab.

Signed-off-by: zhuwenhui <wenhuix.zhu@intel.com>
---
 tests/TestSuite_hotplug_mp.py | 42 ++++++++++++++++++++++++-----------
 1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/tests/TestSuite_hotplug_mp.py b/tests/TestSuite_hotplug_mp.py
index ff89164..62f1982 100644
--- a/tests/TestSuite_hotplug_mp.py
+++ b/tests/TestSuite_hotplug_mp.py
@@ -42,19 +42,35 @@ class TestHotplugMp(TestCase):
         """
         Setup primary process and two secondary processes.
         """
-        out = self.session_pri.send_expect(
-            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-            % self.target, "example>")
-        self.verify("Auto-detected process type: PRIMARY" in out,
-                    "Failed to setup primary process!")
-        for out in [self.session_sec_1.send_expect(
-                        "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-                        % self.target, "example>"),
-                    self.session_sec_2.send_expect(
-                        "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-                        % self.target, "example>")]:
-            self.verify("Auto-detected process type: SECONDARY" in out,
-                        "Failed to setup secondary process!")
+        if self.drivername == "igb_uio":
+            out = self.session_pri.send_expect(
+                "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                % self.target, "example>")
+            self.verify("Auto-detected process type: PRIMARY" in out,
+                        "Failed to setup primary process!")
+            for out in [self.session_sec_1.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                            % self.target, "example>"),
+                        self.session_sec_2.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                            % self.target, "example>")]:
+                self.verify("Auto-detected process type: SECONDARY" in out,
+                            "Failed to setup secondary process!")
+
+        else:
+            out = self.session_pri.send_expect(
+                "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                % self.target, "example>")
+            self.verify("Auto-detected process type: PRIMARY" in out,
+                        "Failed to setup primary process!")
+            for out in [self.session_sec_1.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                            % self.target, "example>"),
+                        self.session_sec_2.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                            % self.target, "example>")]:
+                self.verify("Auto-detected process type: SECONDARY" in out,
+                            "Failed to setup secondary process!")
 
     def multi_process_quit(self):
         """
-- 
2.17.2


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

* Re: [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio
  2019-07-29  5:22 [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio zhuwenhui
@ 2019-07-29  5:56 ` Zhu, ShuaiX
  2019-07-29  6:36 ` Ma, LihongX
  1 sibling, 0 replies; 4+ messages in thread
From: Zhu, ShuaiX @ 2019-07-29  5:56 UTC (permalink / raw)
  To: Zhu, WenhuiX, dts; +Cc: Zhu, WenhuiX, Zhu, ShuaiX

Tested-by: Zhu, ShuaiX <shuaix.zhu@intel.com>

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhuwenhui
> Sent: Monday, July 29, 2019 1:22 PM
> To: dts@dpdk.org
> Cc: Zhu, WenhuiX <wenhuix.zhu@intel.com>
> Subject: [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio
> 
> change test cases based on dpdk bbe29a9bd7ab6feab.
> 
> Signed-off-by: zhuwenhui <wenhuix.zhu@intel.com>
> ---
>  tests/TestSuite_hotplug_mp.py | 42 ++++++++++++++++++++++++-----------
>  1 file changed, 29 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/TestSuite_hotplug_mp.py b/tests/TestSuite_hotplug_mp.py
> index ff89164..62f1982 100644
> --- a/tests/TestSuite_hotplug_mp.py
> +++ b/tests/TestSuite_hotplug_mp.py
> @@ -42,19 +42,35 @@ class TestHotplugMp(TestCase):
>          """
>          Setup primary process and two secondary processes.
>          """
> -        out = self.session_pri.send_expect(
> -            "./examples/multi_process/hotplug_mp/%s/hotplug_mp
> --proc-type=auto"
> -            % self.target, "example>")
> -        self.verify("Auto-detected process type: PRIMARY" in out,
> -                    "Failed to setup primary process!")
> -        for out in [self.session_sec_1.send_expect(
> -
> "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
> -                        % self.target, "example>"),
> -                    self.session_sec_2.send_expect(
> -
> "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
> -                        % self.target, "example>")]:
> -            self.verify("Auto-detected process type: SECONDARY" in out,
> -                        "Failed to setup secondary process!")
> +        if self.drivername == "igb_uio":
> +            out = self.session_pri.send_expect(
> +                "./examples/multi_process/hotplug_mp/%s/hotplug_mp
> --iova-mode=pa --proc-type=auto"
> +                % self.target, "example>")
> +            self.verify("Auto-detected process type: PRIMARY" in out,
> +                        "Failed to setup primary process!")
> +            for out in [self.session_sec_1.send_expect(
> +
> "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa
> --proc-type=auto"
> +                            % self.target, "example>"),
> +                        self.session_sec_2.send_expect(
> +
> "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa
> --proc-type=auto"
> +                            % self.target, "example>")]:
> +                self.verify("Auto-detected process type: SECONDARY" in out,
> +                            "Failed to setup secondary process!")
> +
> +        else:
> +            out = self.session_pri.send_expect(
> +                "./examples/multi_process/hotplug_mp/%s/hotplug_mp
> --proc-type=auto"
> +                % self.target, "example>")
> +            self.verify("Auto-detected process type: PRIMARY" in out,
> +                        "Failed to setup primary process!")
> +            for out in [self.session_sec_1.send_expect(
> +
> "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
> +                            % self.target, "example>"),
> +                        self.session_sec_2.send_expect(
> +
> "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
> +                            % self.target, "example>")]:
> +                self.verify("Auto-detected process type: SECONDARY" in out,
> +                            "Failed to setup secondary process!")
> 
>      def multi_process_quit(self):
>          """
> --
> 2.17.2


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

* Re: [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio
  2019-07-29  5:22 [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio zhuwenhui
  2019-07-29  5:56 ` Zhu, ShuaiX
@ 2019-07-29  6:36 ` Ma, LihongX
  2019-07-29  6:59   ` Zhu, WenhuiX
  1 sibling, 1 reply; 4+ messages in thread
From: Ma, LihongX @ 2019-07-29  6:36 UTC (permalink / raw)
  To: Zhu, WenhuiX, dts; +Cc: Zhu, WenhuiX

Hi, wenhui
From the patch, I think the only different of the command between igb_uio and other driver is the "--iova-mode=pa"
Driver igb_uio has the param of "--iova-mode=pa" and other did not.
So I think maybe you can define a params of it.
Eg : 
	self.iova_param = ""
	if self.drivername in ['igb_uio']:
		self.iova_param = "--iova-mode=pa"

	.........
	out = self.session_pri.send_expect("./examples/multi_process/hotplug_mp/%s/hotplug_mp %s --proc-type=auto"
				% (self.target, self.iova_param), "example>")

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhuwenhui
Sent: Monday, July 29, 2019 1:22 PM
To: dts@dpdk.org
Cc: Zhu, WenhuiX <wenhuix.zhu@intel.com>
Subject: [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio

change test cases based on dpdk bbe29a9bd7ab6feab.

Signed-off-by: zhuwenhui <wenhuix.zhu@intel.com>
---
 tests/TestSuite_hotplug_mp.py | 42 ++++++++++++++++++++++++-----------
 1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/tests/TestSuite_hotplug_mp.py b/tests/TestSuite_hotplug_mp.py index ff89164..62f1982 100644
--- a/tests/TestSuite_hotplug_mp.py
+++ b/tests/TestSuite_hotplug_mp.py
@@ -42,19 +42,35 @@ class TestHotplugMp(TestCase):
         """
         Setup primary process and two secondary processes.
         """
-        out = self.session_pri.send_expect(
-            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-            % self.target, "example>")
-        self.verify("Auto-detected process type: PRIMARY" in out,
-                    "Failed to setup primary process!")
-        for out in [self.session_sec_1.send_expect(
-                        "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-                        % self.target, "example>"),
-                    self.session_sec_2.send_expect(
-                        "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-                        % self.target, "example>")]:
-            self.verify("Auto-detected process type: SECONDARY" in out,
-                        "Failed to setup secondary process!")
+        if self.drivername == "igb_uio":
+            out = self.session_pri.send_expect(
+                "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                % self.target, "example>")
+            self.verify("Auto-detected process type: PRIMARY" in out,
+                        "Failed to setup primary process!")
+            for out in [self.session_sec_1.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                            % self.target, "example>"),
+                        self.session_sec_2.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                            % self.target, "example>")]:
+                self.verify("Auto-detected process type: SECONDARY" in out,
+                            "Failed to setup secondary process!")
+
+        else:
+            out = self.session_pri.send_expect(
+                "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                % self.target, "example>")
+            self.verify("Auto-detected process type: PRIMARY" in out,
+                        "Failed to setup primary process!")
+            for out in [self.session_sec_1.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                            % self.target, "example>"),
+                        self.session_sec_2.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                            % self.target, "example>")]:
+                self.verify("Auto-detected process type: SECONDARY" in out,
+                            "Failed to setup secondary process!")
 
     def multi_process_quit(self):
         """
--
2.17.2


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

* Re: [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio
  2019-07-29  6:36 ` Ma, LihongX
@ 2019-07-29  6:59   ` Zhu, WenhuiX
  0 siblings, 0 replies; 4+ messages in thread
From: Zhu, WenhuiX @ 2019-07-29  6:59 UTC (permalink / raw)
  To: Ma, LihongX, dts


OK, Thanks for your advice.

Thanks,
Wenhui.
-----Original Message-----
From: Ma, LihongX 
Sent: Monday, July 29, 2019 2:36 PM
To: Zhu, WenhuiX <wenhuix.zhu@intel.com>; dts@dpdk.org
Cc: Zhu, WenhuiX <wenhuix.zhu@intel.com>
Subject: RE: [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio

Hi, wenhui
From the patch, I think the only different of the command between igb_uio and other driver is the "--iova-mode=pa"
Driver igb_uio has the param of "--iova-mode=pa" and other did not.
So I think maybe you can define a params of it.
Eg : 
	self.iova_param = ""
	if self.drivername in ['igb_uio']:
		self.iova_param = "--iova-mode=pa"

	.........
	out = self.session_pri.send_expect("./examples/multi_process/hotplug_mp/%s/hotplug_mp %s --proc-type=auto"
				% (self.target, self.iova_param), "example>")

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhuwenhui
Sent: Monday, July 29, 2019 1:22 PM
To: dts@dpdk.org
Cc: Zhu, WenhuiX <wenhuix.zhu@intel.com>
Subject: [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio

change test cases based on dpdk bbe29a9bd7ab6feab.

Signed-off-by: zhuwenhui <wenhuix.zhu@intel.com>
---
 tests/TestSuite_hotplug_mp.py | 42 ++++++++++++++++++++++++-----------
 1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/tests/TestSuite_hotplug_mp.py b/tests/TestSuite_hotplug_mp.py index ff89164..62f1982 100644
--- a/tests/TestSuite_hotplug_mp.py
+++ b/tests/TestSuite_hotplug_mp.py
@@ -42,19 +42,35 @@ class TestHotplugMp(TestCase):
         """
         Setup primary process and two secondary processes.
         """
-        out = self.session_pri.send_expect(
-            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-            % self.target, "example>")
-        self.verify("Auto-detected process type: PRIMARY" in out,
-                    "Failed to setup primary process!")
-        for out in [self.session_sec_1.send_expect(
-                        "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-                        % self.target, "example>"),
-                    self.session_sec_2.send_expect(
-                        "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
-                        % self.target, "example>")]:
-            self.verify("Auto-detected process type: SECONDARY" in out,
-                        "Failed to setup secondary process!")
+        if self.drivername == "igb_uio":
+            out = self.session_pri.send_expect(
+                "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                % self.target, "example>")
+            self.verify("Auto-detected process type: PRIMARY" in out,
+                        "Failed to setup primary process!")
+            for out in [self.session_sec_1.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                            % self.target, "example>"),
+                        self.session_sec_2.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --iova-mode=pa --proc-type=auto"
+                            % self.target, "example>")]:
+                self.verify("Auto-detected process type: SECONDARY" in out,
+                            "Failed to setup secondary process!")
+
+        else:
+            out = self.session_pri.send_expect(
+                "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                % self.target, "example>")
+            self.verify("Auto-detected process type: PRIMARY" in out,
+                        "Failed to setup primary process!")
+            for out in [self.session_sec_1.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                            % self.target, "example>"),
+                        self.session_sec_2.send_expect(
+                            "./examples/multi_process/hotplug_mp/%s/hotplug_mp --proc-type=auto"
+                            % self.target, "example>")]:
+                self.verify("Auto-detected process type: SECONDARY" in out,
+                            "Failed to setup secondary process!")
 
     def multi_process_quit(self):
         """
--
2.17.2


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

end of thread, other threads:[~2019-07-29  6:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29  5:22 [dts] [PATCH V1] tests/hotpiug_mp:add parameters when igb_uio zhuwenhui
2019-07-29  5:56 ` Zhu, ShuaiX
2019-07-29  6:36 ` Ma, LihongX
2019-07-29  6:59   ` Zhu, WenhuiX

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