* [PATCH] iotests: Fix -makecheck output
@ 2021-02-01 16:10 Kevin Wolf
2021-02-01 16:13 ` Vladimir Sementsov-Ogievskiy
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2021-02-01 16:10 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, vsementsov, qemu-devel
For -makecheck, the old 'check' implementation skipped the output when
starting a test. It only had the condensed output at the end of a test.
testrunner.py prints the normal output when starting a test even for
-makecheck. This output contains '\r' at the end so that it can be
overwritten with the result at the end of the test. However, for
-makecheck this is shorter output in a different format, so effectively
we end up with garbled output that mixes both output forms.
Revert to the old behaviour of only printing a message after the test
had completed in -makecheck mode.
Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/testrunner.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index 25754e9a09..1fc61fcaa3 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -301,8 +301,10 @@ class TestRunner(ContextManager['TestRunner']):
last_el = self.last_elapsed.get(test)
start = datetime.datetime.now().strftime('%H:%M:%S')
- self.test_print_one_line(test=test, starttime=start, lasttime=last_el,
- end='\r', test_field_width=test_field_width)
+ if not self.makecheck:
+ self.test_print_one_line(test=test, starttime=start,
+ lasttime=last_el, end='\r',
+ test_field_width=test_field_width)
res = self.do_run_test(test)
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iotests: Fix -makecheck output
2021-02-01 16:10 [PATCH] iotests: Fix -makecheck output Kevin Wolf
@ 2021-02-01 16:13 ` Vladimir Sementsov-Ogievskiy
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-02-01 16:13 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: qemu-devel
01.02.2021 19:10, Kevin Wolf wrote:
> For -makecheck, the old 'check' implementation skipped the output when
> starting a test. It only had the condensed output at the end of a test.
>
> testrunner.py prints the normal output when starting a test even for
> -makecheck. This output contains '\r' at the end so that it can be
> overwritten with the result at the end of the test. However, for
> -makecheck this is shorter output in a different format, so effectively
> we end up with garbled output that mixes both output forms.
>
> Revert to the old behaviour of only printing a message after the test
> had completed in -makecheck mode.
>
> Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> tests/qemu-iotests/testrunner.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
> index 25754e9a09..1fc61fcaa3 100644
> --- a/tests/qemu-iotests/testrunner.py
> +++ b/tests/qemu-iotests/testrunner.py
> @@ -301,8 +301,10 @@ class TestRunner(ContextManager['TestRunner']):
> last_el = self.last_elapsed.get(test)
> start = datetime.datetime.now().strftime('%H:%M:%S')
>
> - self.test_print_one_line(test=test, starttime=start, lasttime=last_el,
> - end='\r', test_field_width=test_field_width)
> + if not self.makecheck:
> + self.test_print_one_line(test=test, starttime=start,
> + lasttime=last_el, end='\r',
> + test_field_width=test_field_width)
>
> res = self.do_run_test(test)
>
>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-01 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 16:10 [PATCH] iotests: Fix -makecheck output Kevin Wolf
2021-02-01 16:13 ` Vladimir Sementsov-Ogievskiy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.