profraw
for fuzz tests using steps in PR 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.
profraw
for fuzz tests using steps in PR 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.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32209.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/39897352535
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
27@@ -28,6 +28,9 @@ def get_fuzz_env(*, target, source_dir):
28 'ASAN_SYMBOLIZER_PATH': symbolizer,
29 'MSAN_SYMBOLIZER_PATH': symbolizer,
30 }
31+ # Preserve LLVM_PROFILE_FILE if set
32+ if 'LLVM_PROFILE_FILE' in os.environ:
33+ fuzz_env['LLVM_PROFILE_FILE'] = os.environ['LLVM_PROFILE_FILE']
34 if platform.system() == "Windows":
35 # On Windows, `env` option must include valid `SystemRoot`.
36 fuzz_env = {**fuzz_env, 'SystemRoot': os.environ.get('SystemRoot')}
os.environ
and update it with the options set above, instead of touching this file for every env var that should be passed through.
fuzz_env
. I don’t need to add an if
condition to update fuzz_env everytime with a variable now and think this should reduce the touches.
19@@ -20,6 +20,7 @@
20 def get_fuzz_env(*, target, source_dir):
21 symbolizer = os.environ.get('LLVM_SYMBOLIZER_PATH', "/usr/bin/llvm-symbolizer")
22 fuzz_env = {
23+ **os.environ,
nit: It is the same, but you can probably use |
.
0 fuzz_env = os.environ | {
29@@ -29,8 +30,8 @@ def get_fuzz_env(*, target, source_dir):
30 'MSAN_SYMBOLIZER_PATH': symbolizer,
31 }
32 if platform.system() == "Windows":
33- # On Windows, `env` option must include valid `SystemRoot`.
34- fuzz_env = {**fuzz_env, 'SystemRoot': os.environ.get('SystemRoot')}
35+ # On Windows, ensure SystemRoot is set
36+ fuzz_env['SystemRoot'] = os.environ.get('SystemRoot')
Signed-off-by: Prabhat Verma <prabhatverma329@gmail.com>
🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/39929972727
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.