Skip to content

Commit

Permalink
iotests: Fix -makecheck output
Browse files Browse the repository at this point in the history
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: d74c754
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210201161024.127921-1-kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
kevmw committed Feb 2, 2021
1 parent 3ae5094 commit 0212fa2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/qemu-iotests/testrunner.py
Expand Up @@ -301,8 +301,10 @@ def run_test(self, test: str,
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)

Expand Down

0 comments on commit 0212fa2

Please sign in to comment.