aboutsummaryrefslogtreecommitdiff
path: root/src/path
diff options
context:
space:
mode:
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-03-25 17:01:38 -0700
committerGopher Robot <gobot@golang.org>2023-04-11 20:56:32 +0000
commit319b75ed339b9c66d6cc0519a9adc248526c67d7 (patch)
treec5b870570c2d765254ea90ddd9d134a19275aab1 /src/path
parentf7f0d395695933bfe4397e1faf70000454f1193c (diff)
downloadgo-319b75ed339b9c66d6cc0519a9adc248526c67d7.tar.gz
go-319b75ed339b9c66d6cc0519a9adc248526c67d7.zip
all: add wasip1 support
Fixes #58141 Co-authored-by: Richard Musiol <neelance@gmail.com> Co-authored-by: Achille Roussel <achille.roussel@gmail.com> Co-authored-by: Julien Fabre <ju.pryz@gmail.com> Co-authored-by: Evan Phoenix <evan@phx.io> Change-Id: I49b66946acc90fdf09ed9223096bfec9a1e5b923 Reviewed-on: https://go-review.googlesource.com/c/go/+/479627 Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/path')
-rw-r--r--src/path/filepath/path_test.go5
-rw-r--r--src/path/filepath/path_unix.go2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/path/filepath/path_test.go b/src/path/filepath/path_test.go
index 9adf641013..cfc5cad863 100644
--- a/src/path/filepath/path_test.go
+++ b/src/path/filepath/path_test.go
@@ -612,8 +612,9 @@ func testWalk(t *testing.T, walk func(string, fs.WalkDirFunc) error, errVisit in
// 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")
diff --git a/src/path/filepath/path_unix.go b/src/path/filepath/path_unix.go
index ab1d08d356..57e6217434 100644
--- a/src/path/filepath/path_unix.go
+++ b/src/path/filepath/path_unix.go
@@ -2,7 +2,7 @@
// 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