Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Arti
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jill
Arti
Commits
0f148470
Commit
0f148470
authored
2 years ago
by
trinity-1686a
Browse files
Options
Downloads
Patches
Plain Diff
update comments in coverage_fuzz_corpora
parent
b380c25e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
maint/coverage_fuzz_corpora
+15
-25
15 additions, 25 deletions
maint/coverage_fuzz_corpora
with
15 additions
and
25 deletions
maint/coverage_fuzz_corpora
+
15
−
25
View file @
0f148470
...
...
@@ -12,32 +12,22 @@ coverage_dir=$(dirname "$LLVM_PROFILE_FILE")
TOPDIR
=
$(
realpath
"
$(
dirname
"
$0
"
)
/.."
)
cd
"
$TOPDIR
"
# for some reason, compiling with coverage is very slow, especially for curve25519-dalek,
# and mixing normal runs and coverage runs trash the cache. Here we set an alternative
# target directory so it's possible to reuse cached artifacts between coverage runs.
# set an alternative target directory so it's possible to reuse cached artifacts between coverage
# runs of coverage and fuzzing.
export
CARGO_TARGET_DIR
=
${
CARGO_TARGET_DIR
:-
target
-coverage
}
# remove comments starting with #@ to run in parallel. This makes output very messy, uses a lot more
# ram and make the load average go crazy, but it's also way faster both to compile (due to
# curve25519-dalek compilation being so slow, and it using a single core), and to run because it's
# essentially monothreaded too.
for
d
in
./crates/
*
/fuzz
;
do
#@{
pushd
"
$(
dirname
"
$d
"
)
"
crate
=
$(
basename
"
$(
dirname
"
$d
"
)
"
)
mkdir
-p
"
$TOPDIR
/target/debug/
$crate
"
mkdir
-p
"
$coverage_dir
/
$crate
"
for
fuzzer
in
$(
cargo fuzz list
)
;
do
cargo fuzz coverage
"
$fuzzer
"
--sanitizer
=
none
# we copy binary and coverage data where with_coverage expect it to be
cp
"target-coverage/x86_64-unknown-linux-gnu/release/
$fuzzer
"
"
$TOPDIR
/target/debug/
$crate
/
$fuzzer
"
mv
"fuzz/coverage/
$fuzzer
/raw"
"
$coverage_dir
/
$crate
/
$fuzzer
"
done
popd
#@}&
pushd
"
$(
dirname
"
$d
"
)
"
crate
=
$(
basename
"
$(
dirname
"
$d
"
)
"
)
mkdir
-p
"
$TOPDIR
/target/debug/
$crate
"
mkdir
-p
"
$coverage_dir
/
$crate
"
for
fuzzer
in
$(
cargo fuzz list
)
;
do
# disable sanitizer to work in stable. Also make curve25519-dalek compilation much faster
cargo fuzz coverage
"
$fuzzer
"
--sanitizer
=
none
# we copy binary and coverage data where with_coverage expect it to be
cp
"target-coverage/x86_64-unknown-linux-gnu/release/
$fuzzer
"
"
$TOPDIR
/target/debug/
$crate
/
$fuzzer
"
mv
"fuzz/coverage/
$fuzzer
/raw"
"
$coverage_dir
/
$crate
/
$fuzzer
"
done
popd
done
#@for d in ./crates/*/fuzz; do
#@ wait
#@done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment