diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-06-28 14:08:29 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-06-28 12:16:25 +0000 |
| commit | 30bd3f741301a9ad137b62a686ba1ed2284388c8 (patch) | |
| tree | 7971ceea9554d7a4fc7303d7611ca27de7b08f68 /pkg | |
| parent | 62e12a69a0ef8fec1cc0648b1314428621f9a697 (diff) | |
Revert "pkg/vminfo: make it possible to force coverage support"
This reverts commit 62e12a69a0ef8fec1cc0648b1314428621f9a697.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/runtest/run_test.go | 11 | ||||
| -rw-r--r-- | pkg/vminfo/features.go | 2 | ||||
| -rw-r--r-- | pkg/vminfo/vminfo.go | 1 |
3 files changed, 6 insertions, 8 deletions
diff --git a/pkg/runtest/run_test.go b/pkg/runtest/run_test.go index abb801bf5..4de56f4e8 100644 --- a/pkg/runtest/run_test.go +++ b/pkg/runtest/run_test.go @@ -385,12 +385,10 @@ func startRpcserver(t *testing.T, target *prog.Target, executor string, source q cfg := &rpcserver.LocalConfig{ Config: rpcserver.Config{ Config: vminfo.Config{ - Target: target, - Debug: *flagDebug, - Features: flatrpc.AllFeatures, - Sandbox: flatrpc.ExecEnvSandboxNone, - Cover: true, - ForceCover: true, + Target: target, + Debug: *flagDebug, + Features: flatrpc.AllFeatures, + Sandbox: flatrpc.ExecEnvSandboxNone, }, Procs: runtime.GOMAXPROCS(0), Slowdown: 10, // to deflake slower tests @@ -404,6 +402,7 @@ func startRpcserver(t *testing.T, target *prog.Target, executor string, source q if machineChecked != nil { machineChecked(features) } + cfg.Cover = true return source } errc := make(chan error) diff --git a/pkg/vminfo/features.go b/pkg/vminfo/features.go index 6f4108b6a..67969a37f 100644 --- a/pkg/vminfo/features.go +++ b/pkg/vminfo/features.go @@ -113,7 +113,7 @@ func (ctx *checkContext) finishFeatures(featureInfos []*flatrpc.FeatureInfo) (Fe if feat := features[flatrpc.FeatureSandboxNone]; !feat.Enabled { return features, fmt.Errorf("execution of simple program fails: %v", feat.Reason) } - if feat := features[flatrpc.FeatureCoverage]; ctx.cfg.Cover && !ctx.cfg.ForceCover && !feat.Enabled { + if feat := features[flatrpc.FeatureCoverage]; ctx.cfg.Cover && !feat.Enabled { return features, fmt.Errorf("coverage is not supported: %v", feat.Reason) } return features, nil diff --git a/pkg/vminfo/vminfo.go b/pkg/vminfo/vminfo.go index 710b66a9d..b65baaac8 100644 --- a/pkg/vminfo/vminfo.go +++ b/pkg/vminfo/vminfo.go @@ -43,7 +43,6 @@ type Config struct { Syscalls []int Debug bool Cover bool - ForceCover bool // Pretend that the coverage is supported. We need it in pkg/runtest. Sandbox flatrpc.ExecEnv SandboxArg int64 } |
