func TestNoSectionOverlaps(t *testing.T) {
// Ensure cmd/link outputs sections without overlaps.
switch runtime.GOOS {
- case "aix", "android", "darwin", "ios", "js", "plan9", "windows":
+ case "aix", "android", "darwin", "ios", "js", "plan9", "windows", "wasip1":
t.Skipf("cmd/link doesn't produce ELF binaries on %s", runtime.GOOS)
}
_ = net.ResolveIPAddr // force dynamic linkage
// Only run where builders (build.golang.org) have
// access to compiled packages for import.
//
-//go:build !android && !ios && !js
+//go:build !android && !ios && !js && !wasip1
package types_test
. "io/ioutil"
"os"
"path/filepath"
+ "runtime"
"testing"
)
if os.Getuid() == 0 {
t.Skipf("Root can write to read-only files anyway, so skip the read-only test.")
}
+ if runtime.GOOS == "wasip1" {
+ t.Skip("file permissions are not supported by wasip1")
+ }
// We don't want to use TempFile directly, since that opens a file for us as 0600.
tempDir, err := TempDir("", t.Name())
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !windows && !plan9 && !js
+//go:build !windows && !plan9 && !js && !wasip1
package syslog
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm)
+//go:build unix || (js && wasm) || wasip1
package mime
// Test permission errors. Only possible if we're not root
// and only on some file systems (AFS, FAT). To avoid errors during
// all.bash on those file systems, skip during go test -short.
- if runtime.GOOS == "windows" {
- t.Skip("skipping on Windows")
+ // Chmod is not supported on wasip1.
+ if runtime.GOOS == "windows" || runtime.GOOS == "wasip1" {
+ t.Skip("skipping on " + runtime.GOOS)
}
if os.Getuid() == 0 {
t.Skip("skipping as root")
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm)
+//go:build unix || (js && wasm) || wasip1
package filepath
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
// TODO(@musiol, @odeke-em): re-unify this entire file back into
// example.go when js/wasm gets an os.Pipe implementation
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build js
+//go:build js || wasip1
package testing
}
func main() {
- if runtime.GOOS == "js" || runtime.Compiler != "gc" {
+ if runtime.GOOS == "js" || runtime.GOOS == "wasip1" || runtime.Compiler != "gc" {
return
}
-// +build !nacl,!js,gc
+// +build !nacl,!js,!wasip1,gc
// run
// Copyright 2011 The Go Authors. All rights reserved.
-// +build !nacl,!js,gc
+// +build !nacl,!js,!wasip1,gc
// run
// Copyright 2015 The Go Authors. All rights reserved.
-// +build !nacl,!js,!android,gc
+// +build !nacl,!js,!wasip1,!android,gc
// run
// Copyright 2016 The Go Authors. All rights reserved.
-// +build !nacl,!js,!android,!gccgo
+// +build !nacl,!js,!wasip1,!android,!gccgo
// run
// Copyright 2016 The Go Authors. All rights reserved.
// run
-// +build !js
+// +build !js,!wasip1
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// run
-//go:build !nacl && !js && !gccgo
+//go:build !nacl && !js && !wasip1 && !gccgo
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
-// +build !js,gc
+// +build !js,!wasip1,gc
// run
// Copyright 2017 The Go Authors. All rights reserved.
// run
-// +build !nacl,!js,!gccgo
+// +build !nacl,!js,!wasip1,!gccgo
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
-// +build !js,gc
+// +build !js,!wasip1,gc
// run
// Copyright 2017 The Go Authors. All rights reserved.
-// +build !js,gc
+// +build !js,!wasip1,gc
// run
// Copyright 2018 The Go Authors. All rights reserved.
-// +build !nacl,!js
+// +build !nacl,!js,!wasip1
// run
// Copyright 2018 The Go Authors. All rights reserved.
-// +build !nacl,!js,!gccgo
+// +build !nacl,!js,!wasip1,!gccgo
// run
// Copyright 2019 The Go Authors. All rights reserved.
-// +build !nacl,!js,!gccgo
+// +build !nacl,!js,!wasip1,!gccgo
// run
// Copyright 2019 The Go Authors. All rights reserved.
// run
-// +build !nacl,!js,gc
+// +build !nacl,!js,!wasip1,gc
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// buildrun -t 45
-//go:build !js
-// +build !js
+//go:build !js && !wasip1
+// +build !js,!wasip1
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// run
-//go:build !js
-// +build !js
+//go:build !js && !wasip1
+// +build !js,!wasip1
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
-// +build !js,gc
+// +build !js,!wasip1,gc
// run
// Copyright 2014 The Go Authors. All rights reserved.
-// +build !nacl,!js,gc
+// +build !nacl,!js,!wasip1,gc
// run
// Copyright 2015 The Go Authors. All rights reserved.
-// +build !nacl,!js
+// +build !nacl,!js,!wasip1
// run
// Copyright 2014 The Go Authors. All rights reserved.
-// +build !nacl,!js,gc
+// +build !nacl,!js,gc,!wasip1
// run
// Copyright 2016 The Go Authors. All rights reserved.
-// +build !nacl,!js,gc
+// +build !nacl,!js,!wasip1,gc
// run
// Copyright 2014 The Go Authors. All rights reserved.
// errorcheck -0 -m -live -std
-// +build !windows,!js
+// +build !windows,!js,!wasip1
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
-// +build !nacl,!js,!aix,!gcflags_noopt,gc
+// +build !nacl,!js,!aix,!wasip1,!gcflags_noopt,gc
// run
// Copyright 2014 The Go Authors. All rights reserved.
-// +build !plan9,!windows
+// +build !plan9,!windows,!wasip1
// run
// Copyright 2009 The Go Authors. All rights reserved.