]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.24] os: skip TestOpenFileCreateExclDanglingSymlink when no symlinks
authorDamien Neil <dneil@google.com>
Wed, 21 May 2025 00:02:11 +0000 (17:02 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 22 Sep 2025 15:35:39 +0000 (08:35 -0700)
Skip this test on plan9, and any other platform that doesn't
have symlinks.

For #73729
Fixes #75359

Change-Id: I8052db24ed54c3361530bd4f54c96c9d10c4714c
Reviewed-on: https://go-review.googlesource.com/c/go/+/674697
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Commit-Queue: Alan Donovan <adonovan@google.com>
Reviewed-by: Richard Miller <millerresearch@gmail.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
(cherry picked from commit 0375edd901f2807af29af95f60a06065c489708c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/704336
Reviewed-by: David du Colombier <0intro@gmail.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/os/os_test.go

index 3b348f93d25772c84a73154691d20f73be031dde..d2c92f86cc3102a965e6e964e571c71e1b30181e 100644 (file)
@@ -2224,6 +2224,7 @@ func TestFilePermissions(t *testing.T) {
 }
 
 func TestOpenFileCreateExclDanglingSymlink(t *testing.T) {
+       testenv.MustHaveSymlink(t)
        testMaybeRooted(t, func(t *testing.T, r *Root) {
                const link = "link"
                if err := Symlink("does_not_exist", link); err != nil {