aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/fuzzer/job.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-04-09 10:53:37 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-04-09 12:07:22 +0000
commite38e134c4df9e4b637ba5140cff0904ebe5491b1 (patch)
tree81f108aec5b42b66a1451f604977bbc9678131a6 /pkg/fuzzer/job.go
parent2b6d9d2d4f7c9240e676ed043867fa382fbc7146 (diff)
pkg/fuzzer: deflake against new signal
We don't want to reach just any stable signal, we know the specific new signal that we target. The previous approach might have reduced the efficiency of the new deflake() approach.
Diffstat (limited to 'pkg/fuzzer/job.go')
-rw-r--r--pkg/fuzzer/job.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/fuzzer/job.go b/pkg/fuzzer/job.go
index 2086016bf..5f734a945 100644
--- a/pkg/fuzzer/job.go
+++ b/pkg/fuzzer/job.go
@@ -186,11 +186,12 @@ func (job *triageJob) deflake(exec func(job, *Request) *Result, stat *stats.Val,
)
signals := make([]signal.Signal, needRuns)
for i := 0; i < maxRuns; i++ {
- if signals[needRuns-1].Len() > 0 {
- // We've already got signal common to needRuns.
+ if job.newSignal.IntersectsWith(signals[needRuns-1]) {
+ // We already have the right deflaked signal.
break
}
- if left := maxRuns - i; left < needRuns && signals[needRuns-left-1].Len() == 0 {
+ if left := maxRuns - i; left < needRuns &&
+ !job.newSignal.IntersectsWith(signals[needRuns-left-1]) {
// There's no chance to get coverage common to needRuns.
break
}