aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKir Kolyshkin <kolyshkin@gmail.com>2024-09-03 20:00:56 -0700
committerGopher Robot <gobot@golang.org>2024-09-04 20:44:48 +0000
commita2891aef7533f66870fc9fef0c2d7d54167f2d1d (patch)
tree5148bfe339ba389ee5fcb75de5e9b6af9bcb0fc7 /src
parent9ba8ac253ef366c708b06c66c8e20cbb1572de2f (diff)
downloadgo-a2891aef7533f66870fc9fef0c2d7d54167f2d1d.tar.xz
cmd/link/internal/ld: rm os.Getwd from elf_test
When specifying the package to build, a relative path is sufficient. Change-Id: I1ae08065b5cd77ec25be42dc1e664720a07baa62 Reviewed-on: https://go-review.googlesource.com/c/go/+/610039 Auto-Submit: Ian Lance Taylor <iant@golang.org> Commit-Queue: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/link/internal/ld/elf_test.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cmd/link/internal/ld/elf_test.go b/src/cmd/link/internal/ld/elf_test.go
index c2a0885985..c42a1173b6 100644
--- a/src/cmd/link/internal/ld/elf_test.go
+++ b/src/cmd/link/internal/ld/elf_test.go
@@ -94,14 +94,8 @@ func TestNoDuplicateNeededEntries(t *testing.T) {
t.Parallel()
dir := t.TempDir()
-
- wd, err := os.Getwd()
- if err != nil {
- t.Fatalf("Failed to get working directory: %v", err)
- }
-
path := filepath.Join(dir, "x")
- argv := []string{"build", "-o", path, filepath.Join(wd, "testdata", "issue39256")}
+ argv := []string{"build", "-o", path, "./testdata/issue39256"}
out, err := testenv.Command(t, testenv.GoToolPath(t), argv...).CombinedOutput()
if err != nil {
t.Fatalf("Build failure: %s\n%s\n", err, string(out))