]> Cypherpunks repositories - gostls13.git/commit
os: don't fail TestGetwdDeepWithPWDSet if TMPDIR has a symlink
authorIan Lance Taylor <iant@golang.org>
Wed, 4 Sep 2024 22:57:51 +0000 (15:57 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 4 Sep 2024 23:26:25 +0000 (23:26 +0000)
commitd102c2ed01b0aaa1278371fb1c1d2f0cd6a71f0d
tree9d13162c0460184ff3667af79ab6c33289550520
parenta2891aef7533f66870fc9fef0c2d7d54167f2d1d
os: don't fail TestGetwdDeepWithPWDSet if TMPDIR has a symlink

When testing with PWD set, it's possible for the stat of PWD to fail
with ENAMETOOLONG, and for syscall.Getwd to fail for the same reason.
If PWD contains symlinks, the fallback code won't know about them.
If Getwd returns the same result as PWD with resolved symlinks,
the test should not fail.

Change-Id: I39587ddb826d4e18339e185aad0cdd60167b1079
Reviewed-on: https://go-review.googlesource.com/c/go/+/610759
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tim King <taking@google.com>
src/os/getwd_unix_test.go