mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove panic in ConsumeCoverageData() when no coverage is observed.
A call to ConsumeCoverageData() can observe zero incremental coverage immediately after a concurrent call to ConsumeCoverageData() unlocks coverageMu if sync.Mutex.Lock/Unlock are excluded from coverage instrumentation. PiperOrigin-RevId: 549119637
This commit is contained in:
@@ -183,11 +183,6 @@ func ConsumeCoverageData(w io.Writer) int {
|
||||
}
|
||||
}
|
||||
|
||||
if total == 0 {
|
||||
// An empty profile indicates that coverage is not enabled, in which case
|
||||
// there shouldn't be any task work registered.
|
||||
panic("kcov task work is registered, but no coverage data was found")
|
||||
}
|
||||
return total
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user