diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-08-30 12:02:30 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-09-16 12:31:08 +0000 |
| commit | c673ca06b23cea94091ab496ef62c3513e434585 (patch) | |
| tree | 417c77ae484cb6aa9e77ce45b1d6ead9d6768290 /pkg/validator | |
| parent | 49cf07733c7f8914ab688a3ff1effb82565030dd (diff) | |
dashboard/app: add file coverage page
It directly uses the coverage signals from BigQuery.
There is no need to wait for the coverage_batch cron jobs.
Looks good for debugging.
Limitations:
1. It is slow. I know how to speed up but want to stabilize the UI first.
2. It is expensive because of the direct BQ requests. Limited to admin only because of it.
3. It merges only the commits reachable on github because of the gitweb throttling.
After the UI stabilization I'll save all the required artifacts to spanner and make this page publicly available.
To merge all the commits, not the github reachable only, http git caching instance is needed.
Diffstat (limited to 'pkg/validator')
| -rw-r--r-- | pkg/validator/validator.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/validator/validator.go b/pkg/validator/validator.go index 420830835..723cf2384 100644 --- a/pkg/validator/validator.go +++ b/pkg/validator/validator.go @@ -9,6 +9,7 @@ import ( "regexp" "github.com/google/syzkaller/pkg/auth" + "github.com/google/syzkaller/pkg/coveragedb" ) type Result struct { @@ -50,11 +51,14 @@ var ( EmptyStr = makeStrLenFunc("not empty", 0) AlphaNumeric = makeStrReFunc("not an alphanum", "^[a-zA-Z0-9]*$") CommitHash = makeCombinedStrFunc("not a hash", AlphaNumeric, makeStrLenFunc("len is not 40", 40)) - KernelFilePath = makeStrReFunc("not a kernel file path", "^[./_a-zA-Z0-9]*$") + KernelFilePath = makeStrReFunc("not a kernel file path", "^[./-_a-zA-Z0-9]*$") NamespaceName = makeStrReFunc("not a namespace name", "^[a-zA-Z0-9-_.]{4,32}$") DashClientName = makeStrReFunc("not a dashboard client name", "^[a-zA-Z0-9-_.]{4,100}$") DashClientKey = makeStrReFunc("not a dashboard client key", "^([a-zA-Z0-9]{16,128})|("+regexp.QuoteMeta(auth.OauthMagic)+".*)$") + TimePeriodType = makeStrReFunc(fmt.Sprintf("bad time period, use (%s|%s|%s)", + coveragedb.DayPeriod, coveragedb.MonthPeriod, coveragedb.QuarterPeriod), + fmt.Sprintf("^(%s|%s|%s)$", coveragedb.DayPeriod, coveragedb.MonthPeriod, coveragedb.QuarterPeriod)) ) type strValidationFunc func(string, ...string) Result |
