aboutsummaryrefslogtreecommitdiffstats
path: root/syz-verifier/stats.go
diff options
context:
space:
mode:
authorMara Mihali <maramihali@google.com>2021-08-05 16:56:46 +0000
committermaramihali <maramihali@google.com>2021-08-06 12:06:44 +0300
commitf9e341e30b4f3faa468a0b885775a4fbf7825016 (patch)
treec4166bb88581d4fd8106a2a84e302b66776de344 /syz-verifier/stats.go
parent2f5370993e30b561da92f1ca5f0abd19271b7bd0 (diff)
pkg/rpctype, syz-runner, syz-verifier: add reruns to syz-verifier architecture
When a mismatch is found in the results returned for a program, the program will be rerun on all the kernels to ensure the mismatch is not flaky (i.e. it didn't occur because of some background activity or external state and will always be returned when running the program). If the same mismatch occurs in all reruns, syz-verifier creates a report for the program, otherwise it discards the program as being flaky
Diffstat (limited to 'syz-verifier/stats.go')
-rw-r--r--syz-verifier/stats.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/syz-verifier/stats.go b/syz-verifier/stats.go
index 3321de478..804b6ec75 100644
--- a/syz-verifier/stats.go
+++ b/syz-verifier/stats.go
@@ -18,10 +18,12 @@ import (
// of the verification process.
type Stats struct {
// Calls stores statistics for all supported system calls.
- Calls map[string]*CallStats
- TotalMismatches int
- Progs int
- StartTime time.Time
+ Calls map[string]*CallStats
+ TotalMismatches int
+ TotalProgs int
+ FlakyProgs int
+ MismatchingProgs int
+ StartTime time.Time
}
// CallStats stores information used to generate statistics for the
@@ -96,7 +98,11 @@ func (s *Stats) ReportGlobalStats(w io.Writer, deltaTime float64) {
tc := s.totalCallsExecuted()
fmt.Fprintf(w, "total number of mismatches / total number of calls "+
"executed: %d / %d (%0.2f %%)\n\n", s.TotalMismatches, tc, getPercentage(s.TotalMismatches, tc))
- fmt.Fprintf(w, "programs / minute: %0.2f\n\n", float64(s.Progs)/deltaTime)
+ fmt.Fprintf(w, "programs / minute: %0.2f\n\n", float64(s.TotalProgs)/deltaTime)
+ fmt.Fprintf(w, "true mismatching programs: %d / total number of programs: %d (%0.2f %%)\n",
+ s.MismatchingProgs, s.TotalProgs, getPercentage(s.MismatchingProgs, s.TotalProgs))
+ fmt.Fprintf(w, "flaky programs: %d / total number of programs: %d (%0.2f %%)\n\n",
+ s.FlakyProgs, s.TotalProgs, getPercentage(s.FlakyProgs, s.TotalProgs))
cs := s.getOrderedStats()
for _, c := range cs {
fmt.Fprintf(w, "%s\n", s.ReportCallStats(c.Name))