Skip to content

Commit

Permalink
zts-report: don't crash on non-UTF-8 chars in the log (#16497)
Browse files Browse the repository at this point in the history
The report generator expects the log to be clean and tidy UTF-8. That
can be a problem if you use some of the verbose/debug test runner
options, which sends all sorts of weird output from arbitrary programs
to the log.

This just makes Python a little more relaxed about such things. It
shouldn't matter in practice, as those lines didn't match the test
result regex anyway, and are discarded immediately.


Sponsored-by: https://despairlabs.com/sponsor/

Signed-off-by: Rob Norris <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
  • Loading branch information
robn committed Sep 10, 2024
1 parent 88433e6 commit 63253db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test-runner/bin/zts-report.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ if os.environ.get('CI') == 'true':

def process_results(pathname):
try:
f = open(pathname)
f = open(pathname, errors='replace')
except IOError as e:
print('Error opening file:', e)
sys.exit(1)
Expand Down

0 comments on commit 63253db

Please sign in to comment.