mirror of
https://github.com/reactos/syzkaller.git
synced 2025-03-03 09:07:18 +00:00
pkg/host: add Features.Supported
To reduce diff in future changes. Currently no-op.
This commit is contained in:
parent
a129861adb
commit
587cec15e2
@ -36,6 +36,10 @@ type Feature struct {
|
||||
|
||||
type Features [numFeatures]Feature
|
||||
|
||||
func (features *Features) Supported() *Features {
|
||||
return features
|
||||
}
|
||||
|
||||
var checkFeature [numFeatures]func() string
|
||||
|
||||
func unconditionallyEnabled() string { return "" }
|
||||
|
@ -56,7 +56,7 @@ func TestCheck(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, feat := range features {
|
||||
for _, feat := range features.Supported() {
|
||||
t.Logf("%-24v: %v", feat.Name, feat.Reason)
|
||||
}
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
log.Logf(0, "syscalls: %v", len(r.CheckResult.EnabledCalls[sandbox]))
|
||||
for _, feat := range r.CheckResult.Features {
|
||||
for _, feat := range r.CheckResult.Features.Supported() {
|
||||
log.Logf(0, "%v: %v", feat.Name, feat.Reason)
|
||||
}
|
||||
if r.CheckResult.Features[host.FeatureExtraCoverage].Enabled {
|
||||
|
@ -943,7 +943,7 @@ func (mgr *Manager) machineChecked(a *rpctype.CheckArgs) {
|
||||
log.Logf(0, "machine check:")
|
||||
log.Logf(0, "%-24v: %v/%v", "syscalls",
|
||||
len(a.EnabledCalls[mgr.cfg.Sandbox]), len(mgr.target.Syscalls))
|
||||
for _, feat := range a.Features {
|
||||
for _, feat := range a.Features.Supported() {
|
||||
log.Logf(0, "%-24v: %v", feat.Name, feat.Reason)
|
||||
}
|
||||
mgr.checkResult = a
|
||||
|
@ -69,7 +69,7 @@ func main() {
|
||||
log.Fatalf("%v", err)
|
||||
}
|
||||
if *flagOutput {
|
||||
for _, feat := range features {
|
||||
for _, feat := range features.Supported() {
|
||||
log.Logf(0, "%-24v: %v", feat.Name, feat.Reason)
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ func main() {
|
||||
}
|
||||
enabledCalls[sandbox] = calls
|
||||
}
|
||||
for _, feat := range mgr.checkResult.Features {
|
||||
for _, feat := range mgr.checkResult.Features.Supported() {
|
||||
fmt.Printf("%-24v: %v\n", feat.Name, feat.Reason)
|
||||
}
|
||||
for sandbox, calls := range enabledCalls {
|
||||
|
Loading…
x
Reference in New Issue
Block a user