From 0cdd36fc443630fa8b6c5d7903cb7adc0baac5b5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 27 May 2024 17:29:36 +0200 Subject: sys/targets: add consts for gvisor/starnix Lint started warning about duplicate "gvisor" const in pkg/cover. Add gvisor/starnix consts to sys/targets package to avoid duplication. --- pkg/mgrconfig/load.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/mgrconfig') diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go index db44caa89..2bccdc7df 100644 --- a/pkg/mgrconfig/load.go +++ b/pkg/mgrconfig/load.go @@ -207,7 +207,7 @@ func (cfg *Config) initTimeouts() { // Assuming qemu emulation. // Quick tests of mmap syscall on arm64 show ~9x slowdown. slowdown = 10 - case cfg.Type == "gvisor" && cfg.Cover && strings.Contains(cfg.Name, "-race"): + case cfg.Type == targets.GVisor && cfg.Cover && strings.Contains(cfg.Name, "-race"): // Go coverage+race has insane slowdown of ~350x. We can't afford such large value, // but a smaller value should be enough to finish at least some syscalls. // Note: the name check is a hack. -- cgit mrf-deployment