mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 03:19:51 +00:00
pkg/cover: fix function coverage in html reports
The HTML code assumes that files and functions match one-to-one as they are identified by indices (file_N should match function_N). Since we only add non-empty functions, this relation is broken and a the report shows function coverage for a random file. Moreover, since the order is based on map iteration (random each time), function coverage shown for a file also randomly changes each time. Follow up to #2074
This commit is contained in:
parent
2111afe851
commit
772f70e5bd
@ -355,9 +355,7 @@ func addFunctionCoverage(file *file, data *templateData) {
|
||||
buf.WriteString(fmt.Sprintf("<span class='cover-right'>of %v", strconv.Itoa(len(function.totalPCs))))
|
||||
buf.WriteString("</span></span></span><br>\n")
|
||||
}
|
||||
if buf.Len() > 0 {
|
||||
data.Functions = append(data.Functions, template.HTML(buf.String()))
|
||||
}
|
||||
data.Functions = append(data.Functions, template.HTML(buf.String()))
|
||||
}
|
||||
|
||||
func processDir(dir *templateDir) {
|
||||
|
Loading…
Reference in New Issue
Block a user