From 63253dbf4f8611a657474fd2e065f960374bbc35 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Tue, 10 Sep 2024 10:49:14 +1000 Subject: [PATCH] zts-report: don't crash on non-UTF-8 chars in the log (#16497) 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 Reviewed-by: Alexander Motin Reviewed-by: Tony Hutter --- tests/test-runner/bin/zts-report.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-runner/bin/zts-report.py.in b/tests/test-runner/bin/zts-report.py.in index 1177e80e1a75..6db10b91de05 100755 --- a/tests/test-runner/bin/zts-report.py.in +++ b/tests/test-runner/bin/zts-report.py.in @@ -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)