Skip to content

infra: Golang coverage fixes - #9812

Merged
jonathanmetzman merged 4 commits into
google:masterfrom
catenacyber:gocov-fix
Feb 28, 2023
Merged

jonathanmetzman merged 4 commits into
google:masterfrom
catenacyber:gocov-fix

Conversation

@catenacyber

Copy link
Copy Markdown
Contributor

@AdamKorcz what do you think of these commits ?

cf #8937 and should fix #9808

cd $OUT
mkdir -p "testdata/fuzz/${target}"
cp -r "${FUZZ_CORPUS_DIR}*" "testdata/fuzz/${target}/"
cp -r "${FUZZ_CORPUS_DIR}" "testdata/fuzz/"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This looks like a true bug looking previously for the file named *

# rewrite libFuzzer corpus to Std Go corpus
$SYSGOPATH/bin/convertcorpus $target "testdata/fuzz/${target}"
# rewrite libFuzzer corpus to Std Go corpus if native fuzzing
grep "TestFuzzCorpus" $target > /dev/null 2>&1 && $SYSGOPATH/bin/convertcorpus $target "testdata/fuzz/${target}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@AdamKorcz could we make convertcorpus less verbose when it has nothing to do like panic: open /out/rawfuzzers/fuzz_ngo_net_smtp: no such file or directory

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, that is fine.

@AdamKorcz AdamKorcz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@catenacyber

Copy link
Copy Markdown
Contributor Author

For reference, tested with

python3 infra/helper.py build_image --no-pull base-runner
python3 infra/helper.py build_image --no-pull base-builder-go
python3 infra/helper.py build_image --no-pull ngolo-fuzzing
python3 infra/helper.py build_fuzzers --sanitizer coverage ngolo-fuzzing
python3 infra/helper.py coverage --no-corpus-download ngolo-fuzzing

@catenacyber

Copy link
Copy Markdown
Contributor Author

@alan32liu could you run gcbrun please ?

@DonggeLiu

Copy link
Copy Markdown
Contributor

/gcbrun trial_build.py all --sanitizer coverage --fuzzing-engine ngolo-fuzzing

@catenacyber

Copy link
Copy Markdown
Contributor Author

Thanks, gcbrun is happy :-)

@jonathanmetzman jonathanmetzman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@jonathanmetzman
jonathanmetzman merged commit abe8687 into google:master Feb 28, 2023
DonggeLiu pushed a commit that referenced this pull request Mar 7, 2023
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this pull request Mar 15, 2023
@AdamKorcz what do you think of these commits ?

cf google#8937 and should fix
google#9808
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this pull request Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing summary.json coverage for ngolo-fuzzing

4 participants