test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application
@ 2020-03-10  9:06 hanyingya
  2020-03-11  3:21 ` Han, YingyaX
  2020-03-13  6:37 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: hanyingya @ 2020-03-10  9:06 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: hanyingya

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 tests/TestSuite_vmdq_dcb.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_vmdq_dcb.py b/tests/TestSuite_vmdq_dcb.py
index 8641c7c..44abffc 100644
--- a/tests/TestSuite_vmdq_dcb.py
+++ b/tests/TestSuite_vmdq_dcb.py
@@ -93,9 +93,14 @@ class TestVmdqDcb(TestCase):
         """
         Rebuild dpdk
         """
-        self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=?/"
-                "CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/' ./config/common_base" % nb_queue_per_vm, "#", 20)
-        self.dut.build_install_dpdk(self.target)
+        out = self.dut.send_expect("grep 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM' ./config/common_base", "#", 20)
+        vm_num = re.findall(r'\d+', out)[-1]
+        if str(nb_queue_per_vm) == vm_num:
+            return
+        else:
+            self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/CONFIG_RTE_LIBRTE_I40E_"
+                             "QUEUE_NUM_PER_VM=%s/' ./config/common_base" % (vm_num, nb_queue_per_vm), "#", 20)
+            self.dut.build_install_dpdk(self.target)
 
     def start_application(self, npools, ntcs):
         """
-- 
2.17.2


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

* Re: [dts] [PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application
  2020-03-10  9:06 [dts] [PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application hanyingya
@ 2020-03-11  3:21 ` Han, YingyaX
  2020-03-13  6:37 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Han, YingyaX @ 2020-03-11  3:21 UTC (permalink / raw)
  To: dts, Tu, Lijuan

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]


Tested_by  Han, YingyaX <yingyax.han@intel.com>


Best regards,
Yingya

-----Original Message-----
From: Han, YingyaX 
Sent: Tuesday, March 10, 2020 5:07 PM
To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>
Cc: Han, YingyaX <yingyax.han@intel.com>
Subject: [dts][PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 tests/TestSuite_vmdq_dcb.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_vmdq_dcb.py b/tests/TestSuite_vmdq_dcb.py index 8641c7c..44abffc 100644
--- a/tests/TestSuite_vmdq_dcb.py
+++ b/tests/TestSuite_vmdq_dcb.py
@@ -93,9 +93,14 @@ class TestVmdqDcb(TestCase):
         """
         Rebuild dpdk
         """
-        self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=?/"
-                "CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/' ./config/common_base" % nb_queue_per_vm, "#", 20)
-        self.dut.build_install_dpdk(self.target)
+        out = self.dut.send_expect("grep 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM' ./config/common_base", "#", 20)
+        vm_num = re.findall(r'\d+', out)[-1]
+        if str(nb_queue_per_vm) == vm_num:
+            return
+        else:
+            self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/CONFIG_RTE_LIBRTE_I40E_"
+                             "QUEUE_NUM_PER_VM=%s/' ./config/common_base" % (vm_num, nb_queue_per_vm), "#", 20)
+            self.dut.build_install_dpdk(self.target)
 
     def start_application(self, npools, ntcs):
         """
--
2.17.2


[-- Attachment #2: TestVmdqDcb.log --]
[-- Type: application/octet-stream, Size: 190144 bytes --]

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

* Re: [dts] [PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application
  2020-03-10  9:06 [dts] [PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application hanyingya
  2020-03-11  3:21 ` Han, YingyaX
@ 2020-03-13  6:37 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-03-13  6:37 UTC (permalink / raw)
  To: Han, YingyaX, dts

Applied, thanks

> -----Original Message-----
> From: Han, YingyaX
> Sent: Tuesday, March 10, 2020 5:07 PM
> To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>
> Cc: Han, YingyaX <yingyax.han@intel.com>
> Subject: [dts][PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting
> parameters before compiling the application
> 
> Signed-off-by: hanyingya <yingyax.han@intel.com>
> ---
>  tests/TestSuite_vmdq_dcb.py | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_vmdq_dcb.py b/tests/TestSuite_vmdq_dcb.py
> index 8641c7c..44abffc 100644
> --- a/tests/TestSuite_vmdq_dcb.py
> +++ b/tests/TestSuite_vmdq_dcb.py
> @@ -93,9 +93,14 @@ class TestVmdqDcb(TestCase):
>          """
>          Rebuild dpdk
>          """
> -        self.dut.send_expect("sed -i -e
> 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=?/"
> -
> "CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/' ./config/common_
> base" % nb_queue_per_vm, "#", 20)
> -        self.dut.build_install_dpdk(self.target)
> +        out = self.dut.send_expect("grep
> 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM' ./config/common_base",
> "#", 20)
> +        vm_num = re.findall(r'\d+', out)[-1]
> +        if str(nb_queue_per_vm) == vm_num:
> +            return
> +        else:
> +            self.dut.send_expect("sed -i -e
> 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/CONFIG_RTE_LIBRT
> E_I40E_"
> +                             "QUEUE_NUM_PER_VM=%s/' ./config/common_base" %
> (vm_num, nb_queue_per_vm), "#", 20)
> +            self.dut.build_install_dpdk(self.target)
> 
>      def start_application(self, npools, ntcs):
>          """
> --
> 2.17.2


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10  9:06 [dts] [PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application hanyingya
2020-03-11  3:21 ` Han, YingyaX
2020-03-13  6:37 ` 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