From 30bd3f741301a9ad137b62a686ba1ed2284388c8 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 28 Jun 2024 14:08:29 +0200 Subject: Revert "pkg/vminfo: make it possible to force coverage support" This reverts commit 62e12a69a0ef8fec1cc0648b1314428621f9a697. --- pkg/runtest/run_test.go | 11 +++++------ pkg/vminfo/features.go | 2 +- pkg/vminfo/vminfo.go | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'pkg') 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 } -- cgit mrf-deployment