Skip to content

Commit

Permalink
zts-report: don't crash on non-UTF-8 chars in the log
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.

Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/
  • Loading branch information
robn committed Sep 4, 2024
1 parent d4d7945 commit 3c6376e
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 3c6376e

Please sign in to comment.