Skip to content

os/exec: The TestImplicitPWD test fails when running under a soft link folder. #52537

@zhangfannie

Description

@zhangfannie

What version of Go are you using (go version)?

$ go version
go version devel go1.19-96c8cc7fea Sun Apr 24 01:22:21 2022 +0000 linux/arm64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="auto"
GOARCH="arm64"
GOBIN=""
GOCACHE="/home/fanzha02/.cache/go-build"
GOENV="/home/fanzha02/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/fanzha02/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/fanzha02/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/fanzha02/sharefolder/golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/fanzha02/sharefolder/golang/pkg/tool/linux_arm64"
GOVCS=""
GOVERSION="devel go1.19-96c8cc7fea Sun Apr 24 01:22:21 2022 +0000"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/fanzha02/sharefolder/golang/src/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1974904193=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Run the TestImplicitPWD test under a soft link folder.

What did you expect to see?

pass

What did you see instead?

~/sharefolder/golang/src/os/exec$ ../../../bin/go test -run=TestImplicitPWD
--- FAIL: TestImplicitPWD (0.00s)
--- FAIL: TestImplicitPWD/empty (0.00s)
exec_posix_test.go:161: in

        `pwd` reported
            /mnt/share/homes/fanzha02/golang/src/os/exec
    exec_posix_test.go:163: want
            /home/fanzha02/sharefolder/golang/src/os/exec
--- FAIL: TestImplicitPWD/PWD (0.00s)
    exec_posix_test.go:161: in
            /home/fanzha02/sharefolder/golang/src/os/exec
        `pwd` reported
            /mnt/share/homes/fanzha02/golang/src/os/exec
    exec_posix_test.go:163: want
            /home/fanzha02/sharefolder/golang/src/os/exec
--- FAIL: TestImplicitPWD/dot (0.02s)
    exec_posix_test.go:161: in
            .
        `pwd` reported
            /mnt/share/homes/fanzha02/golang/src/os/exec
    exec_posix_test.go:163: want
            /home/fanzha02/sharefolder/golang/src/os/exec
--- FAIL: TestImplicitPWD/dotdot (0.02s)
    exec_posix_test.go:161: in
            ..
        `pwd` reported
            /mnt/share/homes/fanzha02/golang/src/os
    exec_posix_test.go:163: want
            /home/fanzha02/sharefolder/golang/src/os
--- FAIL: TestImplicitPWD/PWDdotdot (0.02s)
    exec_posix_test.go:161: in
            /home/fanzha02/sharefolder/golang/src/os/exec/..
        `pwd` reported
            /mnt/share/homes/fanzha02/golang/src/os
    exec_posix_test.go:163: want
            /home/fanzha02/sharefolder/golang/src/os

FAIL
exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.okay-after-beta1Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions