mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-26 08:51:55 +02:00
Merge bitcoin/bitcoin#32209: test: Preserve llvm profile path
c5a7ffd1e8ccae12e034face4293bc8d5a6556b7 preserve llvm profile env (Prabhat Verma) Pull request description: While generating `profraw` for fuzz tests using steps in [PR 32206](https://github.com/bitcoin/bitcoin/pull/32206) , the profraw was not being built at the desired location and only one `default.profraw` was being created which was being overwritten for multiple fuzz targets. This PR fixes that. ACKs for top commit: maflcko: lgtm ACK c5a7ffd1e8ccae12e034face4293bc8d5a6556b7 mabu44: ACK c5a7ffd1e8ccae12e034face4293bc8d5a6556b7 Tree-SHA512: 11f74caa8cba6f841aa899a5e294f658aed1b6a3d4cf68992609ea99fadb4a092b2350ffacea5c2d5eb377eb10082de018f27a1d6486a72460cb3905aaa15664
This commit is contained in:
commit
65dcbec756
@ -11,7 +11,6 @@ import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import random
|
||||
import subprocess
|
||||
import sys
|
||||
@ -19,7 +18,7 @@ import sys
|
||||
|
||||
def get_fuzz_env(*, target, source_dir):
|
||||
symbolizer = os.environ.get('LLVM_SYMBOLIZER_PATH', "/usr/bin/llvm-symbolizer")
|
||||
fuzz_env = {
|
||||
fuzz_env = os.environ | {
|
||||
'FUZZ': target,
|
||||
'UBSAN_OPTIONS':
|
||||
f'suppressions={source_dir}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1',
|
||||
@ -28,9 +27,6 @@ def get_fuzz_env(*, target, source_dir):
|
||||
'ASAN_SYMBOLIZER_PATH': symbolizer,
|
||||
'MSAN_SYMBOLIZER_PATH': symbolizer,
|
||||
}
|
||||
if platform.system() == "Windows":
|
||||
# On Windows, `env` option must include valid `SystemRoot`.
|
||||
fuzz_env = {**fuzz_env, 'SystemRoot': os.environ.get('SystemRoot')}
|
||||
return fuzz_env
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user