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

x/build: os.TestUserConfigDir and os.TestUserCacheDir failing on plan9-arm with permission denied #62216

Closed
bcmills opened this issue Aug 22, 2023 · 2 comments
Labels
Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Plan9
Milestone

Comments

@bcmills
Copy link
Member

bcmills commented Aug 22, 2023

#!watchflakes
post <- builder == "plan9-arm" && pkg == "os" && test ~ `TestUser.*Dir` && date <= "2023-08-22"

For #57638, https://go.dev/cl/520262 added tests for a couple of previously-untested functions in the os package.
Those tests are currently failing on the plan9-arm builder with permission denied errors:
https://build.golang.org/log/6f395a2be0b4d0c7708c88cce47a863680a4eff1

The discussion on #29960 stated in no uncertain terms that os.UserConfigDir on Plan 9 should be $home/lib.

The tests verify that if the config directory can be located at all, the test can create a subdirectory within it. This is analogous to how a real program might store and read its own configuration data in a subdirectory of the config directory.

It seems likely to me that the builder is misconfigured in some way. I can think of three possible ways to resolve it:

  • Perhaps $home should be set to a different directory (owned by the buildlet).
  • Perhaps the permissions for the existing directory (/usr/glenda) and or buildlet shoud be adjusted so that the test has permission to write there.
  • Perhaps the $home variable should be cleared entirely in the buildlet's environment, so that the test will know not to even try to write there.

(attn @millerresearch; CC @golang/plan9)

@bcmills bcmills added OS-Plan9 Builders x/build issues (builders, bots, dashboards) labels Aug 22, 2023
@bcmills bcmills added this to the Backlog milestone Aug 22, 2023
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 22, 2023
@millerresearch
Copy link
Contributor

millerresearch commented Aug 22, 2023

Yes, plan9-arm builders were configured in an overly-secure way which prevented the test user (glenda) writing to its own home directory. I'm surprised no test has revealed this before. As a workaround I've made writable lib and lib/cache directories under $workdir and bound these onto $home/lib and $home/lib/cache. That seems to make tests pass.

@bcmills
Copy link
Member Author

bcmills commented Aug 22, 2023

Great, thank you!

@bcmills bcmills closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Plan9
Projects
Status: Done
Development

No branches or pull requests

2 participants