diff mbox series

[V1] tests/queue_start_stop: optimize script

Message ID 20230118154814.2109168-1-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] tests/queue_start_stop: optimize script | expand

Checks

Context Check Description
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-suite-test success Testing OK

Commit Message

Jiale, SongX Jan. 18, 2023, 3:48 p.m. UTC
there is "#" in the echo after the "patch -p0" command of Linux is executed.
this "#" is not the expected value, which will affect the subsequent tests.

Signed-off-by: Song Jiale <songx.jiale@intel.com>
---
 tests/TestSuite_queue_start_stop.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Lijuan Tu Jan. 29, 2023, 2:13 a.m. UTC | #1
> -----Original Message-----
> From: Song Jiale <songx.jiale@intel.com>
> Sent: Wednesday, January 18, 2023 11:48 PM
> To: dts@dpdk.org
> Cc: Jiale, SongX <songx.jiale@intel.com>
> Subject: [dts] [PATCH V1] tests/queue_start_stop: optimize script
> 
> there is "#" in the echo after the "patch -p0" command of Linux is executed.
> this "#" is not the expected value, which will affect the subsequent tests.
> 
> Signed-off-by: Song Jiale <songx.jiale@intel.com>
> ---
>  tests/TestSuite_queue_start_stop.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_queue_start_stop.py
> b/tests/TestSuite_queue_start_stop.py
> index b6f4ba96..80baf8d6 100644
> --- a/tests/TestSuite_queue_start_stop.py
> +++ b/tests/TestSuite_queue_start_stop.py
> @@ -93,9 +93,9 @@ class TestQueueStartStop(TestCase):
>          """
>          try:
>              if on:
> -                self.dut.send_expect("patch -p0 < %s" % patch_dir, "#")
> +                self.dut.send_expect("patch -p0 < %s" % patch_dir, "[~|~\]]# ")
>              else:
> -                self.dut.send_expect("patch -p0 -R < %s" % patch_dir, "#")
> +                self.dut.send_expect("patch -p0 -R < %s" % patch_dir, "[~|~\]]# ")
>          except Exception as e:
>              raise ValueError("patch_hotfix_dpdk failure: %s" % e)

Applied, but it is not a good idea to apply a patch to change DPDK source code, even it is only a "printf" statement. 
Checking  queue statistics can be an alternative.

thanks
diff mbox series

Patch

diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py
index b6f4ba96..80baf8d6 100644
--- a/tests/TestSuite_queue_start_stop.py
+++ b/tests/TestSuite_queue_start_stop.py
@@ -93,9 +93,9 @@  class TestQueueStartStop(TestCase):
         """
         try:
             if on:
-                self.dut.send_expect("patch -p0 < %s" % patch_dir, "#")
+                self.dut.send_expect("patch -p0 < %s" % patch_dir, "[~|~\]]# ")
             else:
-                self.dut.send_expect("patch -p0 -R < %s" % patch_dir, "#")
+                self.dut.send_expect("patch -p0 -R < %s" % patch_dir, "[~|~\]]# ")
         except Exception as e:
             raise ValueError("patch_hotfix_dpdk failure: %s" % e)