From: qmuntal Date: Fri, 20 Sep 2024 14:51:50 +0000 (+0200) Subject: os: skip TestReadlink sub-tests requiring symlinks when not enough X-Git-Tag: go1.24rc1~861 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=dfd0f0d8eb7ffe77e8b61e21dc59ba28a5a098df;p=gostls13.git os: skip TestReadlink sub-tests requiring symlinks when not enough permissions are held Some of the TestReadlink sub-tests require os.Symlink to succeed. If the user doesn't have enough permissions to create symlinks, then there is no point in running the test. Change-Id: I06ec7e3ddf0016e804667bba0ee6ebe6baa01872 Reviewed-on: https://go-review.googlesource.com/c/go/+/614655 Reviewed-by: Alex Brainman Auto-Submit: Quim Muntal Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase --- diff --git a/src/os/os_windows_test.go b/src/os/os_windows_test.go index c8a133da81..fb95499c17 100644 --- a/src/os/os_windows_test.go +++ b/src/os/os_windows_test.go @@ -1269,6 +1269,9 @@ func TestReadlink(t *testing.T) { } t.Run(name, func(t *testing.T) { + if !tt.junction { + testenv.MustHaveSymlink(t) + } if !tt.relative { t.Parallel() }