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: gotoolchain_net script test sensitive to GOEXPERIMENT #62016

Closed
thanm opened this issue Aug 14, 2023 · 1 comment
Closed

cmd/go: gotoolchain_net script test sensitive to GOEXPERIMENT #62016

thanm opened this issue Aug 14, 2023 · 1 comment
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@thanm
Copy link
Contributor

thanm commented Aug 14, 2023

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

$ go version
go version devel go1.22-7fecf2b864 Mon Aug 14 10:18:12 2023 -0400 X:newinliner linux/amd64

Does this issue reproduce with the latest release?

Happens on the 1.21 release branch as well.

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

linux/amd64

What did you do?

Ran this test:

$ GOEXPERIMENT=newinliner go test -v -count=1 -run=Script/gotoolchain_net

What did you expect to see?

Pass

What did you see instead?

Failure with "unknown experiment". Example:

    --- FAIL: TestScript/gotoolchain_net (23.84s)
        script_test.go:132: 2023-08-14T14:25:17Z
        script_test.go:134: $WORK=/tmp/cmd-go-test-4182049692/tmpdir101768339/gotoolchain_net2425465477
        script_test.go:156: 
            # This test only checks that basic network lookups work.
            # The full test of toolchain version selection is in gotoolchain.txt. (0.000s)
            # GOTOOLCHAIN from network, does not exist (0.134s)
            # GOTOOLCHAIN from network (0.167s)
            # GOTOOLCHAIN cached from network (0.030s)
            # GOTOOLCHAIN with GOSUMDB enabled but at a bad URL should operate in cache and not try badurl (0.092s)
            # GOTOOLCHAIN with GOSUMB=off should fail, because it cannot access even the cached sumdb info
            # without the sumdb name. (0.083s)
            # GOTOOLCHAIN with GOSUMDB enabled but at a bad URL should fail if cache is incomplete (0.060s)
            # Test a real GOTOOLCHAIN (22.207s)
            > [short] skip
            [condition not met]
            > [!net:golang.org] skip
            [condition not met]
            > [!net:sum.golang.org] skip
            [condition not met]
            > [!GOOS:darwin] [!GOOS:windows] [!GOOS:linux] skip
            [condition not met]
            > [!GOARCH:amd64] [!GOARCH:arm64] skip
            [condition not met]
            > env GOPROXY=
            > [go-builder] env GOSUMDB=
            [condition not met]
            > [!go-builder] env GOSUMDB=sum.golang.org  # Set explicitly in case GOROOT/go.env is modified.
            > env GOTOOLCHAIN=go1.20.1
            > env PATH=
            > env path=
            > go version
            [stderr]
            go: downloading go1.20.1 (linux/amd64)
            go: unknown GOEXPERIMENT newinliner
        script_test.go:156: FAIL: testdata/script/gotoolchain_net.txt:63: go version: exit status 2
FAIL
FAIL	cmd/go	289.943s

This does not seem to be specific to GOEXPERIMENT=newinliner; also happens with GOEXPERIMENT=cacheprog or GOEXPERIMENT=loopvar (e.g. some experiment that is relatively new).

I will send a CL to skip this test for GOEXPERIMENT=newinliner, but if there is some better way to handle this (other than one-off skips) please let me know. Thanks.

@rsc @bcmills

@thanm thanm added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 14, 2023
@thanm thanm added this to the Backlog milestone Aug 14, 2023
@thanm thanm self-assigned this Aug 14, 2023
@thanm
Copy link
Contributor Author

thanm commented Aug 14, 2023

Submitted https://go.dev/cl/519195 with a fix for this problem, closing this issue out.

@thanm thanm closed this as completed Aug 14, 2023
@dmitshur dmitshur modified the milestones: Backlog, Go1.22 Aug 14, 2023
@dmitshur dmitshur added the Testing An issue that has been verified to require only test changes, not just a test failure. label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

2 participants