You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
testing: TestArtifactDirectoryPaths fails in GOPATH mode (no module context) #81263
Root cause
In runTests() (src/testing/testing.go:2700), when tests are invoked without module context, both modulePath and importPath are passed as empty strings:
This affects Ubuntu's autopkgtest infrastructure (dh-golang), which runs stdlib tests in GOPATH mode.
I'm curious why it does that. Is there a specific reason for that? Just to make sure standard library features work in GOPATH mode, or something else? Thanks.
It may be helpful to hear back on the question above, but I'll note that testing standard library packages with GO111MODULE=off is documented as not something that's expected to work - see go help gopath or https://pkg.go.dev/cmd/go#hdr-GOPATH_mode_vendor_directories:
[...] the standard library tests will not run properly with GO111MODULE=off.
(I filed #81364 in case it's viable to make the go command surface this information more readily.)
Activity
gabyhelp commentedon Sep 1, 2026
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
prattmic commentedon Sep 4, 2026
cc @adonovan @neild
cherrymui commentedon Sep 4, 2026
I'm curious why it does that. Is there a specific reason for that? Just to make sure standard library features work in GOPATH mode, or something else? Thanks.
dmitshur commentedon Sep 4, 2026
It may be helpful to hear back on the question above, but I'll note that testing standard library packages with GO111MODULE=off is documented as not something that's expected to work - see
go help gopathor https://pkg.go.dev/cmd/go#hdr-GOPATH_mode_vendor_directories:(I filed #81364 in case it's viable to make the go command surface this information more readily.)
gopherbot commentedon Oct 4, 2026
Timed out in state WaitingForInfo. Closing.
(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)