From f9e341e30b4f3faa468a0b885775a4fbf7825016 Mon Sep 17 00:00:00 2001 From: Mara Mihali Date: Thu, 5 Aug 2021 16:56:46 +0000 Subject: 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 --- syz-verifier/stats.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'syz-verifier/stats.go') 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)) -- cgit mrf-deployment