Skip to content

go/src: all.bash not picking up changes in go/src/cmd/go/testdata/script directory #47667

@zpavlinovic

Description

@zpavlinovic

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

$ go version
go version devel +b7a85e0003 linux/amd64

Does this issue reproduce with the latest release?

Yes. I pulled the most recent version of Go master branch.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/zpavlinovic/.cache/go-build"
GOENV="/usr/local/google/home/zpavlinovic/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/google/home/zpavlinovic/go/pkg/mod"
GONOPROXY="*.git.corp.google.com"
GONOSUMDB="*.git.corp.google.com"
GOOS="linux"
GOPATH="/usr/local/google/home/zpavlinovic/go"
GOPRIVATE="*.git.corp.google.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/google/home/zpavlinovic/golang-dev/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/google/home/zpavlinovic/golang-dev/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel +b7a85e0003"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/usr/local/google/home/zpavlinovic/golang-dev/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2036562605=/tmp/go-build -gno-record-gcc-switches"

What did you do?

  1. Built Go using go/src$ ./all.bash
  2. Introduced a ^WRONGPREFIX change in go/src/cmd/go/testdata/script/test_vet.txt
[short] skip
  
# Test file
! go test p1_test.go
stderr 'Logf format %d'
go test -vet=off
stdout '^ok'

# Non-test file
! go test p1.go
stderr 'Printf format %d'
go test -x -vet=shift p1.go
stderr '[\\/]vet.*-shift'
stdout '\[no test files\]'
go test -vet=off p1.go
! stderr '[\\/]vet.*-shift'
stdout '\[no test files\]'

# Test issue #22890
go test m/vetcycle
stdout 'm/vetcycle.*\[no test files\]'

# Test with ...
! go test ./vetfail/...
stderr 'Printf format %d'
stdout '^WRONGPREFIXok\s+m/vetfail/p2'

...
  1. Build and test again go/src$ ./all.bash

What did you expect to see?

Based on instructions in Contribution Guide, failure along the lines of

go test proxy running at GOPROXY=http://127.0.0.1:46381/mod
--- FAIL: TestScript (0.01s)
    --- FAIL: TestScript/test_vet (4.10s)
        script_test.go:252: 
            # Test file (1.304s)
            # Non-test file (1.315s)
            # Test issue #22890 (0.487s)
            # Test with ... (0.866s)
            > ! go test ./vetfail/...
            [stdout]
            ok          m/vetfail/p2    0.023s
            [stderr]
            # m/vetfail/p1
            vetfail/p1/p1.go:1:1: invalid non-alphanumeric build constraint: !foo-bar
            vetfail/p1/p1.go:8:2: Printf format %d has arg "hello" of wrong type string
            [exit status 2]
            > stderr 'Printf format %d'
            > stdout '^WRONGPREFIXok\s+m/vetfail/p2'
            FAIL: testdata/script/test_vet.txt:26: no match for `(?m)^WRONGPREFIXok\s+m/vetfail/p2` found in stdout
            
FAIL
exit status 1
FAIL    cmd/go  61.526s

This failure can be reproduced by running go test -run TestScript in go/src/cmd/go (after setting the GOROOT properly; see output of go env above).

What did you see instead?

Success.

...
ALL TESTS PASSED

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions