// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux || (freebsd && amd64)
+
package sanitizers_test
import (
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// This test uses the Pdeathsig field of syscall.SysProcAttr, so it only works
+// on platforms that support that.
+
+//go:build linux || (freebsd && amd64)
+
// sanitizers_test checks the use of Go with sanitizers like msan, asan, etc.
// See https://github.com/google/sanitizers.
package sanitizers_test
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux || (freebsd && amd64)
+
package sanitizers_test
import (
--- /dev/null
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// All of the actual test files have limited build constraints. This file
+// ensures there's at least one test file on every platform.
+
+package sanitizers_test
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux || (freebsd && amd64)
+
package sanitizers_test
import (
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux || (freebsd && amd64)
+
package sanitizers_test
import (
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux || (freebsd && amd64)
+
package sanitizers_test
import (
if t.supportedBuildmode("plugin") {
t.registerTest("cgo_testplugin", "", &goTest{pkg: "cmd/cgo/internal/testplugin", timeout: 600 * time.Second})
}
- if goos == "linux" || (goos == "freebsd" && goarch == "amd64") {
- // because Pdeathsig of syscall.SysProcAttr struct used in cmd/cgo/internal/testsanitizers is only
- // supported on Linux and FreeBSD.
- t.registerTest("cgo_testsanitizers", "", &goTest{pkg: "cmd/cgo/internal/testsanitizers", timeout: 5 * time.Minute})
- }
+ t.registerTest("cgo_testsanitizers", "", &goTest{pkg: "cmd/cgo/internal/testsanitizers", timeout: 5 * time.Minute})
if t.hasBash() && goos != "android" && !t.iOS() && gohostos != "windows" {
t.registerTest("cgo_errors", "", &goTest{pkg: "cmd/cgo/internal/testerrors", timeout: 5 * time.Minute})
}