[V1] tests/queue_start_stop: optimize script
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
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
> -----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
@@ -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)