Skip to content

Commit 7603649

Browse files
Bryan C. Millsgopherbot
authored andcommitted
zip: fix TestCreateFromDirSpecial/ignore_symlink on wasmtime
The wasmtime runtime does not permit absolute symlinks. More generally: since this is an x-repo, we should not assume anything in particular about the set of supported operating systems. We should explicitly list the GOOS values expected to always support symlinks, rather than the ones that are allowed not to. Fixes golang/go#60795. Change-Id: I1749429ac1178f261b4acfd97c0fcf9ec1c2a871 Reviewed-on: https://go-review.googlesource.com/c/mod/+/504075 Reviewed-by: Johan Brandhorst-Satzkorn <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Bryan Mills <[email protected]>
1 parent 22d21f4 commit 7603649

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

zip/zip_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,11 @@ func TestCreateFromDirSpecial(t *testing.T) {
537537
setup: func(t *testing.T, tmpDir string) string {
538538
if err := os.Symlink(tmpDir, filepath.Join(tmpDir, "link")); err != nil {
539539
switch runtime.GOOS {
540-
case "plan9", "windows":
541-
t.Skipf("could not create symlink: %v", err)
542-
default:
540+
case "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "solaris":
541+
// Symlinks in tmpDir are always expected to work on these platforms.
543542
t.Fatal(err)
543+
default:
544+
t.Skipf("could not create symlink: %v", err)
544545
}
545546
}
546547
return tmpDir

0 commit comments

Comments
 (0)