From 7603649663b1456250649d774037b3d07f98f386 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 16 Jun 2023 12:34:30 -0400 Subject: [PATCH] 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 Reviewed-by: Dmitri Shuralyov Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot Auto-Submit: Bryan Mills --- zip/zip_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zip/zip_test.go b/zip/zip_test.go index bd68d9e..606e7aa 100644 --- a/zip/zip_test.go +++ b/zip/zip_test.go @@ -537,10 +537,11 @@ func TestCreateFromDirSpecial(t *testing.T) { setup: func(t *testing.T, tmpDir string) string { if err := os.Symlink(tmpDir, filepath.Join(tmpDir, "link")); err != nil { switch runtime.GOOS { - case "plan9", "windows": - t.Skipf("could not create symlink: %v", err) - default: + case "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "solaris": + // Symlinks in tmpDir are always expected to work on these platforms. t.Fatal(err) + default: + t.Skipf("could not create symlink: %v", err) } } return tmpDir