Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: TestScript/build_overlay failing when gccgo is present #42688

Closed
bcmills opened this issue Nov 18, 2020 · 1 comment
Closed

cmd/go: TestScript/build_overlay failing when gccgo is present #42688

bcmills opened this issue Nov 18, 2020 · 1 comment
Labels
FrozenDueToAge GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Nov 18, 2020

TestScript/build_overlay is currently failing when gccgo is present.

The failure does not show up in the dashboard due to the lack of a longtest builder with a gccgo toolchain (#35786).


~/go-review/src$ go test cmd/go -run=TestScript/build_overlay
go test proxy running at GOPROXY=http://127.0.0.1:37709/mod
--- FAIL: TestScript (0.01s)
    --- FAIL: TestScript/build_overlay (6.37s)
        script_test.go:211:
            # Test building in overlays.
            # TODO(#39958): add a test case where the destination file in the replace map
            #   isn't a go file. Either completely exclude that case in fs.IsDirWithGoFiles
            #   if the compiler doesn't allow it, or test that it works all the way.
            # TODO(#39958): add a test that both gc and gccgo assembly files can include .h
            #   files.
            # The main package (m) is contained in an overlay. It imports m/dir2 which has one
            # file in an overlay and one file outside the overlay, which in turn imports m/dir,
            # which only has source files in the overlay. (2.693s)
            # Change the contents of a file in the overlay and ensure that makes the target stale (0.516s)
            # Run same tests but with gccgo. (3.137s)
            > env GO111MODULE=off
            > [!exec:gccgo] stop
            > ! go build -compiler=gccgo .
            [stderr]
            package m: no Go files in $WORK/gopath/src/m
            [exit status 1]
            > go build -compiler=gccgo -overlay overlay.json -o main_gccgo$GOEXE .
            > exec ./main_gccgo$goexe
            [stdout]
            hello
            > stdout '^hello$'
            > go build -compiler=gccgo -overlay overlay.json -o print_abspath_gccgo$GOEXE ./printpath
            > exec ./print_abspath_gccgo$GOEXE
            [stdout]
            $WORK/gopath/src/m/printpath/other.go
            $WORK/gopath/src/m/printpath/main.go
            > stdout $WORK[/\\]gopath[/\\]src[/\\]m[/\\]printpath[/\\]main.go
            > go build -compiler=gccgo -overlay overlay.json -o print_trimpath_gccgo$GOEXE -trimpath ./printpath
            > exec ./print_trimpath_gccgo$GOEXE
            [stdout]
            ./printpath/other.go
            ./printpath/main.go
            > stdout ^\.[/\\]printpath[/\\]main.go
            > go build -compiler=gccgo  -overlay overlay.json -o main_cgo_replace_gccgo$GOEXE ./cgo_hello_replace
            > exec ./main_cgo_replace_gccgo$GOEXE
            [stdout]
            hello cgo

            > stdout '^hello cgo\r?\n'
            > go build -compiler=gccgo  -overlay overlay.json -o main_cgo_quote_gccgo$GOEXE ./cgo_hello_quote
            > exec ./main_cgo_quote_gccgo$GOEXE
            [stdout]
            hello cgo

            > stdout '^hello cgo\r?\n'
            > go build -compiler=gccgo  -overlay overlay.json -o main_cgo_angle_gccgo$GOEXE ./cgo_hello_angle
            > exec ./main_cgo_angle_gccgo$GOEXE
            [stdout]
            hello cgo

            > stdout '^hello cgo\r?\n'
            > go build -compiler=gccgo -overlay overlay.json -o main_call_asm_gccgo$GOEXE ./call_asm
            [stderr]
            # m/call_asm
            $WORK/gopath/src/m/overlay/asm_file.s: Assembler messages:
            $WORK/gopath/src/m/overlay/asm_file.s:1: Error: no such instruction: `text ·foo(SB),0,$0'
            [exit status 2]
            FAIL: testdata/script/build_overlay.txt:94: unexpected command failure

FAIL
FAIL    cmd/go  7.150s
FAIL

~/go-review/src$ go version
go version devel +041a4e4c34 Tue Nov 17 22:57:34 2020 +0000 linux/amd64

~/go-review/src$ gccgo --version
gccgo (Debian 10.2.0-9) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Marking as release-blocker for Go 1.16 because the test is new in Go 1.16.

CC @matloob @jayconrod

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go release-blocker labels Nov 18, 2020
@bcmills bcmills added this to the Go1.16 milestone Nov 18, 2020
@gopherbot
Copy link

Change https://golang.org/cl/270978 mentions this issue: cmd/go: remove invocations that fail with gccgo 10

@dmitshur dmitshur added the okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 label Nov 19, 2020
@golang golang locked and limited conversation to collaborators Nov 19, 2021
@rsc rsc unassigned matloob Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants