Skip to content

Commit

Permalink
cmd/go: issue33139 is only valid when running with CGO
Browse files Browse the repository at this point in the history
With CGO disabled, the test suite tries to run the following and fail:

CGO_ENABLED=0 go test -run=TestScript/link_syso_issue33139 cmd/go
go test proxy running at GOPROXY=http://127.0.0.1:38829/mod
--- FAIL: TestScript (0.01s)
    --- FAIL: TestScript/link_syso_issue33139 (0.01s)
        script_test.go:215:
            # Test that we can use the external linker with a host syso file that is
            # embedded in a package, that is referenced by a Go assembly function.
            # See issue 33139. (0.000s)
            # External linking is not supported on linux/ppc64.
            # See: #8912 (0.000s)
            # External linking is not supported on linux/riscv64.
            # See: #36739 (0.001s)
            > [linux] [riscv64] skip
            > cc -c -o syso/objTestImpl.syso syso/src/objTestImpl.c
            FAIL: testdata/script/link_syso_issue33139.txt:15:
                unexpected error starting command:
                        fork/exec /dev/null: permission denied

The existing filter [!exec:cc] skip is not sufficient in the case when
CC is deliberately set to a file not meant to be executed while building
the non cgo variant of Go
  • Loading branch information
nehaljwani committed Jan 26, 2021
1 parent 54b251f commit d0af87e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/go/testdata/script/link_syso_issue33139.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# See issue 33139.
[!gc] skip
[!exec:cc] skip
[!cgo] skip

# External linking is not supported on linux/ppc64.
# See: https://github.com/golang/go/issues/8912
Expand Down

0 comments on commit d0af87e

Please sign in to comment.