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: internal testsuite errors when -testwork used with 'go test cmd/go' #55874

Closed
thanm opened this issue Sep 26, 2022 · 1 comment
Closed
Assignees
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@thanm
Copy link
Contributor

thanm commented Sep 26, 2022

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

$ go version
go version devel go1.20-a0441c7ae3 Sun Sep 25 01:18:43 2022 +0000 linux/amd64

Does this issue reproduce with the latest release?

yes

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

linux/amd64

Problem description

When running the cmd/go package test, the "-testwork" flag seems to result in unexpected errors (in addition to preserving the top level temp dir). Example:

// this works fine
$ go test -test.count=1 -test.run=TestMissingCC .
ok  	cmd/go	0.413s
// now adding -testwork
$ $ go test -testwork -test.count=1 -test.run=TestMissingCC .
--- FAIL: TestMissingCC (0.35s)
    go_test.go:2932: running testgo [list -f {{.Stale}}:{{.StaleReason}} net]
    go_test.go:2932: standard output:
    go_test.go:2932: false:
        
    go_test.go:2938: running testgo [list -f {{.Stale}}:{{.StaleReason}} net]
    go_test.go:2938: standard output:
    go_test.go:2938: false:
        
    go_test.go:2942: internal testsuite error: path(".") with no tempdir
FAIL
exit status 1
FAIL	cmd/go	0.445s
$

Note the internal testsuite error: path(".") with no tempdir message. What's happening here is that for the specific testgo instantiation in this test, it never creates a tempdir subdirectory, and this triggers the error here.

@thanm thanm self-assigned this Sep 26, 2022
@thanm thanm added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 26, 2022
@thanm thanm added this to the Backlog milestone Sep 26, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/434455 mentions this issue: cmd/go: avoid internal errors on "go test -testwork"

@golang golang locked and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants