-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
os: UserCacheDir and UserConfigDir have no tests #57638
Labels
FrozenDueToAge
help wanted
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
bcmills
added
Testing
An issue that has been verified to require only test changes, not just a test failure.
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
labels
Jan 5, 2023
Change https://go.dev/cl/460917 mentions this issue: |
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
Jan 6, 2023
On the builders, HOME=/ which causes UserCacheDir to be non-writable. This change attempts to MkdirAll the UserCacheDir and, if that fails, we fail back to TempDir, which is assumed to exist and be writable. Updates golang/go#57638 Change-Id: I6eb81c59b50f90a62c103a2511425fa2f24452fa Reviewed-on: https://go-review.googlesource.com/c/tools/+/460917 Reviewed-by: Bryan Mills <bcmills@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Run-TryBot: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Ja7ad
added a commit
to Ja7ad/go
that referenced
this issue
Jan 17, 2023
Ja7ad
added a commit
to Ja7ad/go
that referenced
this issue
Jan 18, 2023
error UserCacheDir skipped and empty string cache dir got fatal. for test write permission in cache dir add mkdir temp. Fixes golang#57638 golang#57630
Change https://go.dev/cl/462041 mentions this issue: |
It appears that |
bcmills
changed the title
os: UserCacheDir has no tests
os: UserCacheDir and UserConfigDir have no tests
Jun 26, 2023
Change https://go.dev/cl/520262 mentions this issue: |
This was referenced Aug 22, 2023
cellularmitosis
pushed a commit
to cellularmitosis/go
that referenced
this issue
Aug 24, 2023
Adds basic test scenarios for UserCacheDir and UserConfigDir. Fixes golang#57638 Change-Id: Ieb86e95faff44287bfa13daa0cb26e7b5401373b Reviewed-on: https://go-review.googlesource.com/c/go/+/520262 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Bypass: Bryan Mills <bcmills@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
help wanted
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.
os.UserCacheDir
was added in https://go.dev/cl/78835 for #22536.In examining #57630, it seems that this function is not covered by any tests at all. There were none added in https://go.dev/cl/78835, nor in https://go.dev/cl/120757.
It seems like we should at least have some test that verifies that
UserCacheDir
reports either an error or a directory in which the user is allowed to create files. 😅(CC @rsc @robpike @ianlancetaylor @bradfitz @griesemer for
os
)The text was updated successfully, but these errors were encountered: