* [PATCH v2] compress: resolve test failure from incomplete output capture
@ 2025-07-16 15:28 Manit Mahajan
2025-07-16 15:43 ` Manit Mahajan
0 siblings, 1 reply; 6+ messages in thread
From: Manit Mahajan @ 2025-07-16 15:28 UTC (permalink / raw)
To: dts; +Cc: probb, david.marchand, Manit Mahajan
The compress unit test uses send_expect() with '>' to determine
when the command completed. A recent patch introduced a
deprecation warning for coremask, which includes a '>' in the
output. This causes send_expect() to exit early,
resulting in missed test output, leading to false failures.
This is fixed by changing the expected termination prompt from
'>' to 'RTE'. This change address issues from the v1 patch,
which incorrectly modified the EAL option from coremask to
corelist.
Signed-off-by: Manit Mahajan <mmahajan@iol.unh.edu>
---
tests/compress_common.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/compress_common.py b/tests/compress_common.py
index aa591270..94c6f9dd 100644
--- a/tests/compress_common.py
+++ b/tests/compress_common.py
@@ -63,6 +63,7 @@ def bind_qat_device(test_case, driver="igb_uio"):
def get_opt_str(test_case, default_opts={}, override_opts={}):
case_cfg = conf.load_case_config(test_case._suite_result.test_case)
+ print("case_cfg ", case_cfg)
opts = default_opts.copy()
for key in list(default_opts.keys()):
if key in case_cfg:
@@ -70,6 +71,8 @@ def get_opt_str(test_case, default_opts={}, override_opts={}):
opts.update(override_opts)
+ print("opts ", opts)
+
opt_str = ""
for key, value in list(opts.items()):
if value is None:
@@ -77,6 +80,7 @@ def get_opt_str(test_case, default_opts={}, override_opts={}):
dash = "-" if len(key) == 1 else "--"
opt_str = opt_str + "{0}{1} {2} ".format(dash, key, value)
+ print('opt_str ', opt_str)
return opt_str
@@ -106,8 +110,8 @@ def run_unit(test_case, eal={}):
cmdline = "./{app_path} {eal}".format(
app_path=test_case.dut.apps_name["test"], eal=eal_str
)
- test_case.dut.send_expect(cmdline, ">", 30)
- out = test_case.dut.send_expect("compressdev_autotest", ">", 30)
+ test_case.dut.send_expect(cmdline, "RTE>", 30)
+ out = test_case.dut.send_expect("compressdev_autotest", "RTE>", 30)
test_case.dut.send_expect("quit", "# ", 30)
print(out)
--
2.41.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] compress: resolve test failure from incomplete output capture
2025-07-16 15:28 [PATCH v2] compress: resolve test failure from incomplete output capture Manit Mahajan
@ 2025-07-16 15:43 ` Manit Mahajan
0 siblings, 0 replies; 6+ messages in thread
From: Manit Mahajan @ 2025-07-16 15:43 UTC (permalink / raw)
To: dts; +Cc: probb, david.marchand
[-- Attachment #1: Type: text/plain, Size: 76 bytes --]
This patch was sent in error and will be superseded by a corrected version.
[-- Attachment #2: Type: text/html, Size: 97 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] compress: resolve test failure from incomplete output capture
2025-07-17 8:40 ` David Marchand
@ 2025-07-17 18:33 ` Patrick Robb
0 siblings, 0 replies; 6+ messages in thread
From: Patrick Robb @ 2025-07-17 18:33 UTC (permalink / raw)
To: David Marchand; +Cc: Manit Mahajan, dts, Thomas Monjalon
[-- Attachment #1: Type: text/plain, Size: 3432 bytes --]
Hi David,
Because Legacy DTS is deprecated, I think you should just push Manit's
patch as is.
In the case of the Zlib test, this is a legacy DTS test which we are still
running at UNH, and we had to patch it locally to keep using the test, so
of course we felt we should push the patch to patchwork for visibility at a
minimum, and to be merged if maintainers want.
Again I don't think it is the best use of Manit's time to have him doing
further fixes in legacy DTS when he could be making other contributions to
DPDK testing efforts elsewhere. But, if you don't agree, we will adjust.
On Thu, Jul 17, 2025 at 4:40 AM David Marchand <david.marchand@redhat.com>
wrote:
> Hello,
>
> On Wed, Jul 16, 2025 at 10:36 PM Patrick Robb <probb@iol.unh.edu> wrote:
> >
> > On Wed, Jul 16, 2025 at 3:24 PM Manit Mahajan <mmahajan@iol.unh.edu>
> wrote:
> >>
> >> The compress unit test uses send_expect() with '>' to determine
> >> when the command completed. A recent patch introduced a
> >> deprecation warning for coremask, which includes a '>' in the
> >> output. This causes send_expect() to exit early,
> >> resulting in missed test output, leading to false failures.
> >>
> >> This is fixed by changing the expected termination prompt from
> >> '>' to 'RTE>'. This change address issues from the v1 patch,
> >> which incorrectly modified the EAL option from coremask to
> >> corelist.
> >>
> >> Signed-off-by: Manit Mahajan <mmahajan@iol.unh.edu>
> >
> > Thanks. So, if we change the expect string to "RTE>", the warning will
> not trigger the expect and unit tests will complete before the execution
> proceeds? Sounds good.
>
> On the principle, that sounds good to me too.
>
> Just a note that other parts of "old" dts may be affected:
> $ git grep 'send_expect.*">"'
> tests/TestSuite_ieee1588.py: self.dut.send_expect("start", ">", 10)
> tests/TestSuite_multiprocess.py:
> self.session_secondary.send_expect("send hello_primary", ">")
> tests/TestSuite_multiprocess.py:
> self.session_secondary.send_expect("send hello_secondary", ">")
> tests/TestSuite_multiprocess.py: self.dut.send_expect("send
> %s" % line, ">")
> tests/TestSuite_multiprocess.py:
> self.session_secondary.send_expect("send hello_primary", ">")
> tests/TestSuite_multiprocess.py:
> self.session_secondary.send_expect("send hello_secondary", ">", 100)
> tests/TestSuite_multiprocess_iavf.py:
> self.session_secondary.send_expect("send hello_primary", ">")
> tests/TestSuite_multiprocess_iavf.py:
> self.session_secondary.send_expect("send hello_secondary", ">")
> tests/TestSuite_multiprocess_iavf.py:
> self.dut.send_expect("send %s" % line, ">")
> tests/TestSuite_multiprocess_iavf.py:
> self.session_secondary.send_expect("send hello_primary", ">")
> tests/TestSuite_multiprocess_iavf.py:
> self.session_secondary.send_expect("send hello_secondary", ">", 100)
> tests/TestSuite_shutdown_api.py: self.dut.send_expect("set
> link-up port %d" % i, ">")
> tests/TestSuite_speed_capabilities.py:
> self.dut.send_expect("set link-up port %d" % i, ">")
> tests/compress_common.py: test_case.dut.send_expect(cmdline, ">", 30)
> tests/compress_common.py: out =
> test_case.dut.send_expect("compressdev_autotest", ">", 30)
>
>
> How do we proceed now?
> Do you want me to push this fix in the dts legacy repo?
>
>
> --
> David Marchand
>
>
[-- Attachment #2: Type: text/html, Size: 4649 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] compress: resolve test failure from incomplete output capture
2025-07-16 20:30 ` Patrick Robb
@ 2025-07-17 8:40 ` David Marchand
2025-07-17 18:33 ` Patrick Robb
0 siblings, 1 reply; 6+ messages in thread
From: David Marchand @ 2025-07-17 8:40 UTC (permalink / raw)
To: Patrick Robb, Manit Mahajan; +Cc: dts, Thomas Monjalon
Hello,
On Wed, Jul 16, 2025 at 10:36 PM Patrick Robb <probb@iol.unh.edu> wrote:
>
> On Wed, Jul 16, 2025 at 3:24 PM Manit Mahajan <mmahajan@iol.unh.edu> wrote:
>>
>> The compress unit test uses send_expect() with '>' to determine
>> when the command completed. A recent patch introduced a
>> deprecation warning for coremask, which includes a '>' in the
>> output. This causes send_expect() to exit early,
>> resulting in missed test output, leading to false failures.
>>
>> This is fixed by changing the expected termination prompt from
>> '>' to 'RTE>'. This change address issues from the v1 patch,
>> which incorrectly modified the EAL option from coremask to
>> corelist.
>>
>> Signed-off-by: Manit Mahajan <mmahajan@iol.unh.edu>
>
> Thanks. So, if we change the expect string to "RTE>", the warning will not trigger the expect and unit tests will complete before the execution proceeds? Sounds good.
On the principle, that sounds good to me too.
Just a note that other parts of "old" dts may be affected:
$ git grep 'send_expect.*">"'
tests/TestSuite_ieee1588.py: self.dut.send_expect("start", ">", 10)
tests/TestSuite_multiprocess.py:
self.session_secondary.send_expect("send hello_primary", ">")
tests/TestSuite_multiprocess.py:
self.session_secondary.send_expect("send hello_secondary", ">")
tests/TestSuite_multiprocess.py: self.dut.send_expect("send
%s" % line, ">")
tests/TestSuite_multiprocess.py:
self.session_secondary.send_expect("send hello_primary", ">")
tests/TestSuite_multiprocess.py:
self.session_secondary.send_expect("send hello_secondary", ">", 100)
tests/TestSuite_multiprocess_iavf.py:
self.session_secondary.send_expect("send hello_primary", ">")
tests/TestSuite_multiprocess_iavf.py:
self.session_secondary.send_expect("send hello_secondary", ">")
tests/TestSuite_multiprocess_iavf.py:
self.dut.send_expect("send %s" % line, ">")
tests/TestSuite_multiprocess_iavf.py:
self.session_secondary.send_expect("send hello_primary", ">")
tests/TestSuite_multiprocess_iavf.py:
self.session_secondary.send_expect("send hello_secondary", ">", 100)
tests/TestSuite_shutdown_api.py: self.dut.send_expect("set
link-up port %d" % i, ">")
tests/TestSuite_speed_capabilities.py:
self.dut.send_expect("set link-up port %d" % i, ">")
tests/compress_common.py: test_case.dut.send_expect(cmdline, ">", 30)
tests/compress_common.py: out =
test_case.dut.send_expect("compressdev_autotest", ">", 30)
How do we proceed now?
Do you want me to push this fix in the dts legacy repo?
--
David Marchand
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] compress: resolve test failure from incomplete output capture
2025-07-16 19:24 ` [PATCH v2] compress: resolve test failure from incomplete output capture Manit Mahajan
@ 2025-07-16 20:30 ` Patrick Robb
2025-07-17 8:40 ` David Marchand
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Robb @ 2025-07-16 20:30 UTC (permalink / raw)
To: Manit Mahajan; +Cc: dts, david.marchand
[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]
Thanks. So, if we change the expect string to "RTE>", the warning will not
trigger the expect and unit tests will complete before the execution
proceeds? Sounds good.
On Wed, Jul 16, 2025 at 3:24 PM Manit Mahajan <mmahajan@iol.unh.edu> wrote:
> The compress unit test uses send_expect() with '>' to determine
> when the command completed. A recent patch introduced a
> deprecation warning for coremask, which includes a '>' in the
> output. This causes send_expect() to exit early,
> resulting in missed test output, leading to false failures.
>
> This is fixed by changing the expected termination prompt from
> '>' to 'RTE>'. This change address issues from the v1 patch,
> which incorrectly modified the EAL option from coremask to
> corelist.
>
> Signed-off-by: Manit Mahajan <mmahajan@iol.unh.edu>
> ---
> tests/compress_common.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/compress_common.py b/tests/compress_common.py
> index aa591270..b4fd1921 100644
> --- a/tests/compress_common.py
> +++ b/tests/compress_common.py
> @@ -106,8 +106,8 @@ def run_unit(test_case, eal={}):
> cmdline = "./{app_path} {eal}".format(
> app_path=test_case.dut.apps_name["test"], eal=eal_str
> )
> - test_case.dut.send_expect(cmdline, ">", 30)
> - out = test_case.dut.send_expect("compressdev_autotest", ">", 30)
> + test_case.dut.send_expect(cmdline, "RTE>", 30)
> + out = test_case.dut.send_expect("compressdev_autotest", "RTE>", 30)
> test_case.dut.send_expect("quit", "# ", 30)
> print(out)
>
> --
> 2.41.0
>
>
[-- Attachment #2: Type: text/html, Size: 2256 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] compress: resolve test failure from incomplete output capture
2025-07-11 20:30 [PATCH] tests/compress_common: replace coremask with corelist in compress_common Manit Mahajan
@ 2025-07-16 19:24 ` Manit Mahajan
2025-07-16 20:30 ` Patrick Robb
0 siblings, 1 reply; 6+ messages in thread
From: Manit Mahajan @ 2025-07-16 19:24 UTC (permalink / raw)
To: probb; +Cc: dts, david.marchand, Manit Mahajan
The compress unit test uses send_expect() with '>' to determine
when the command completed. A recent patch introduced a
deprecation warning for coremask, which includes a '>' in the
output. This causes send_expect() to exit early,
resulting in missed test output, leading to false failures.
This is fixed by changing the expected termination prompt from
'>' to 'RTE>'. This change address issues from the v1 patch,
which incorrectly modified the EAL option from coremask to
corelist.
Signed-off-by: Manit Mahajan <mmahajan@iol.unh.edu>
---
tests/compress_common.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/compress_common.py b/tests/compress_common.py
index aa591270..b4fd1921 100644
--- a/tests/compress_common.py
+++ b/tests/compress_common.py
@@ -106,8 +106,8 @@ def run_unit(test_case, eal={}):
cmdline = "./{app_path} {eal}".format(
app_path=test_case.dut.apps_name["test"], eal=eal_str
)
- test_case.dut.send_expect(cmdline, ">", 30)
- out = test_case.dut.send_expect("compressdev_autotest", ">", 30)
+ test_case.dut.send_expect(cmdline, "RTE>", 30)
+ out = test_case.dut.send_expect("compressdev_autotest", "RTE>", 30)
test_case.dut.send_expect("quit", "# ", 30)
print(out)
--
2.41.0
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-07-17 18:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-16 15:28 [PATCH v2] compress: resolve test failure from incomplete output capture Manit Mahajan
2025-07-16 15:43 ` Manit Mahajan
-- strict thread matches above, loose matches on Subject: below --
2025-07-11 20:30 [PATCH] tests/compress_common: replace coremask with corelist in compress_common Manit Mahajan
2025-07-16 19:24 ` [PATCH v2] compress: resolve test failure from incomplete output capture Manit Mahajan
2025-07-16 20:30 ` Patrick Robb
2025-07-17 8:40 ` David Marchand
2025-07-17 18:33 ` Patrick Robb
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).