diff options
author | vitalyisaev <vitalyisaev@ydb.tech> | 2023-11-28 13:24:42 +0300 |
---|---|---|
committer | vitalyisaev <vitalyisaev@ydb.tech> | 2023-11-28 14:44:58 +0300 |
commit | b973f9bd7ea2ef00bba434f52cd6c2944024fab8 (patch) | |
tree | db25de330f5a67df892a580ad45f3c2388444f76 /library | |
parent | 4064df667d53bae580c8e2826aff350f725eaeb5 (diff) | |
download | ydb-b973f9bd7ea2ef00bba434f52cd6c2944024fab8.tar.gz |
Decode bytes when reading sanitizer's stderr
Diffstat (limited to 'library')
-rw-r--r-- | library/python/testing/yatest_common/yatest/common/process.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/process.py b/library/python/testing/yatest_common/yatest/common/process.py index 2b6ae26c53..044208d4cf 100644 --- a/library/python/testing/yatest_common/yatest/common/process.py +++ b/library/python/testing/yatest_common/yatest/common/process.py @@ -443,12 +443,16 @@ class _Execution(object): if self._std_err and self._check_sanitizer and runtime._get_ya_config().sanitizer_extra_checks: build_path = runtime.build_path() if self.command[0].startswith(build_path): - match = re.search(SANITIZER_ERROR_PATTERN, self._std_err) + std_err, failed = _try_convert_bytes_to_string(self._std_err) + if failed: + raise ValueError("failed to convert std err from bytes to string") + + match = re.search(SANITIZER_ERROR_PATTERN, std_err) if match: yatest_logger.error( "%s sanitizer found errors:\n\tstd_err:%s\n", match.group(1), - truncate(self.std_err, MAX_OUT_LEN), + truncate(std_err, MAX_OUT_LEN), ) raise ExecutionError(self) else: |