Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzz: Exit and log stderr for parse_test_list errors #29304

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

dergoegge
Copy link
Member

We should log all errors that occur when attempting to print the harness list in the fuzz test runner.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 24, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Jan 24, 2024
@dergoegge
Copy link
Member Author

This is currently a problem in the qa-assets CI, listing the harnesses fails but there is no output: https://cirrus-ci.com/task/5433841842651136?logs=ci#L9235

...
+ test/fuzz/test_runner.py -j6 -l DEBUG /ci_container_base/ci/scratch/qa-assets/fuzz_seed_corpus/ --empty_min_time=60
No fuzz targets found

test/fuzz/test_runner.py Outdated Show resolved Hide resolved
test/fuzz/test_runner.py Outdated Show resolved Hide resolved
@dergoegge dergoegge force-pushed the 2024-01-fuzz-list-errs branch 2 times, most recently from 460ad5a to 66b2300 Compare January 24, 2024 11:35
@dergoegge dergoegge changed the title fuzz: Exit and log stdout for parse_test_list errors fuzz: Exit and log stderr for parse_test_list errors Jan 24, 2024
test/fuzz/test_runner.py Outdated Show resolved Hide resolved
@maflcko
Copy link
Member

maflcko commented Jan 24, 2024

lgtm ACK 9d09c87

simple +1-1 change

text=True,
check=True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, this check is fine to do since fa22966 changed the abort into a successful exit.

@fanquake fanquake merged commit ea4ddd8 into bitcoin:master Jan 24, 2024
16 checks passed
@fanquake
Copy link
Member

Looks like this is working as intended https://cirrus-ci.com/task/5482198250291200?logs=ci#L9646:

+ test/fuzz/test_runner.py -j6 -l DEBUG /ci_container_base/ci/scratch/qa-assets/fuzz_seed_corpus/ --empty_min_time=60
==29805==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x55ef0724925d  (/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x93625d)
    #1 0x55ef09320bb9  (/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x2a0dbb9)
    #2 0x55ef0717e664  (/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x86b664)
    #3 0x7fd0ab3e9eba  (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
Traceback (most recent call last):
  File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/fuzz/test_runner.py", line 382, in <module>
    main()
  File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/fuzz/test_runner.py", line 106, in main
    test_list_all = parse_test_list(fuzz_bin=os.path.join(config["environment"]["BUILDDIR"], 'src', 'test', 'fuzz', 'fuzz'))
  File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/fuzz/test_runner.py", line 369, in parse_test_list
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/fuzz/fuzz' returned non-zero exit status 1.

@fanquake
Copy link
Member

We should also fix the symbolizing in that env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants