mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-23 15:05:18 +02:00
contrib: Print deterministic-coverage runs
This commit is contained in:
parent
fa751639fb
commit
fa7a40d952
@ -187,6 +187,7 @@ The coverage was not deterministic between runs.
|
||||
//
|
||||
// Also, This can catch issues where several fuzz inputs are non-deterministic, but the sum of
|
||||
// their overall coverage trace remains the same across runs and thus remains undetected.
|
||||
println!("Check each fuzz input individually ...");
|
||||
for entry in entries {
|
||||
let entry = entry.path();
|
||||
if !entry.is_file() {
|
||||
@ -203,6 +204,7 @@ The coverage was not deterministic between runs.
|
||||
// Finally, check that running over all fuzz inputs in one process is deterministic as well.
|
||||
// This can catch issues where mutable global state is leaked from one fuzz input execution to
|
||||
// the next.
|
||||
println!("Check all fuzz inputs in one go ...");
|
||||
{
|
||||
if !corpus_dir.is_dir() {
|
||||
Err(format!("{} should be a folder", corpus_dir.display()))?;
|
||||
|
@ -72,6 +72,7 @@ fn deterministic_coverage(build_dir: &Path, test_exe: &Path, filter: &str) -> Ap
|
||||
let profraw_file = build_dir.join("test_det_cov.profraw");
|
||||
let profdata_file = build_dir.join("test_det_cov.profdata");
|
||||
let run_single = |run_id: u8| -> Result<PathBuf, AppError> {
|
||||
println!("Run with id {run_id}");
|
||||
let cov_txt_path = build_dir.join(format!("test_det_cov.show.{run_id}.txt"));
|
||||
if !Command::new(test_exe)
|
||||
.env("LLVM_PROFILE_FILE", &profraw_file)
|
||||
|
Loading…
x
Reference in New Issue
Block a user