-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
infra: Fix jvm coverage report #12694
infra: Fix jvm coverage report #12694
Conversation
Signed-off-by: Arthur Chan <[email protected]>
Signed-off-by: Arthur Chan <[email protected]>
Signed-off-by: Arthur Chan <[email protected]>
/gcbrun trial_build.py jvm --fuzzing-engines libfuzzer --sanitizers coverage |
classes_dir=$DUMPS_DIR/classes | ||
mkdir $classes_dir | ||
for fuzz_target in $FUZZ_TARGETS; do | ||
# Continue if not a fuzz target. | ||
if [[ $FUZZING_ENGINE != "none" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why delete if [[ $FUZZING_ENGINE != "none" ]]; then
? We don't need this logic still?
/gcbrun trial_build.py jvm --fuzzing-engines libfuzzer --sanitizers coverage |
/gcbrun trial_build.py jvm --fuzzing-engines libfuzzer --sanitizers coverage |
1 similar comment
/gcbrun trial_build.py jvm --fuzzing-engines libfuzzer --sanitizers coverage |
The trial build is failing for some reason, and I can't reproduce:
|
/gcbrun trial_build.py jvm --fuzzing-engines libfuzzer --sanitizers coverage |
I'm not sure why the trial build fails. It fails when building honggfuzz in the base-builder stage, however, I'm able to build the base builder locally without issues:
|
Fix in #12807 |
/gcbrun trial_build.py jvm --fuzzing-engines libfuzzer --sanitizers coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only project failing the trial build is not due to this PR.
The current JVM coverage calculation includes all class files and JAR files in $OUT. If the project has copied necessary dependency JAR files to $OUT for fuzzing purposes, those classes will also be included in the JaCoCo coverage report, adding noise. This PR addresses that issue by only copying class files located in the $OUT/$SRC directory, which are lively compiled from the project source code, ensuring that only project classes are used by jacoco-cli to generate the coverage report. As all JVM languages compile to class files, this approach should work for all JVM languages supported by OSS-Fuzz in general.