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

syscall: TestGroupCleanupUserNamespace test failure on Fedora #46752

Closed
rabajaj0509 opened this issue Jun 15, 2021 · 13 comments
Closed

syscall: TestGroupCleanupUserNamespace test failure on Fedora #46752

rabajaj0509 opened this issue Jun 15, 2021 · 13 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Linux
Milestone

Comments

@rabajaj0509
Copy link
Contributor

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

$ go version
1.15

Does this issue reproduce with the latest release?

I am not sure, but I think so.

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

I am using Fedora 31, x86 architecture: fc31.x86_64

What did you do?

# cd src
# ./all.bash

What did you expect to see?

PASS

What did you see instead?

--- FAIL: TestGroupCleanupUserNamespace (0.07s)
    exec_linux_test.go:327: id command output: "uid=0(root) gid=0(root) groups=0(root),65534(nobody) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023", expected one of ["uid=0(root) gid=0(root) groups=0(root)" "uid=0(root) gid=0(root) groups=0(root),65534(nobody)" "uid=0(root) gid=0(root) groups=0(root),65534(nogroup)" "uid=0(root) gid=0(root) groups=0(root),65534" "uid=0(root) gid=0(root) groups=0(root),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody)" "uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023"]
FAIL
FAIL	syscall	5.514s
@rabajaj0509
Copy link
Contributor Author

To fix this issue, i tried to add "uid=0(root) gid=0(root) groups=0(root),65534(nobody) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023", line to the exec_linux_test.go file

Now I am facing an error:

--- FAIL: TestStdlibLowercase (0.02s)
    deps_test.go:830: package "syscall/rabajaj/Backups" should not use upper-case path
    deps_test.go:830: package "syscall/rabajaj/Backups/2a70a0e80c6dc7f87a6c9c6546358f0a" should not use upper-case path
    deps_test.go:830: package "syscall/rabajaj/Backups/2a70a0e80c6dc7f87a6c9c6546358f0a/file" should not use upper-case path
    deps_test.go:830: package "syscall/rabajaj/Cache" should not use upper-case path
    deps_test.go:830: package "syscall/rabajaj/Cache/index-dir" should not use upper-case path
    deps_test.go:830: package "syscall/rabajaj/CachedData" should not use upper-case path

Can someone help me fix this and contribute?

@tklauser tklauser added NeedsFix The path to resolution is known, but the work has not been done. OS-Linux labels Jun 15, 2021
@tklauser
Copy link
Member

@rabajaj0509 It looks like there are untracked files/directory in your Go source directory. Try cleaning the repo, e.g. using git clean -f -x -d and try to run the tests again.

@rabajaj0509
Copy link
Contributor Author

Awesome! thanks @tklauser. It works like a charm now. Let me raise a PR for this one.

@rabajaj0509
Copy link
Contributor Author

@tklauser is it ok if I close this PR: #46753 and open a new one? because this PR is created against the 1.15 branch instead of the master branch?

@rabajaj0509
Copy link
Contributor Author

@tklauser I have changed the base branch in the PR itself. I need to fetch and rebase the PR with the master branch, I will do that once I can clone the master branch.

@tklauser
Copy link
Member

@rabajaj0509 it's probably easiest to reset your PR branch to the master branch and then cherry-pick your commit on top.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/328109 mentions this issue: syscall: fix TestGroupCleanupUserNamespace test failure on Fedora

@rabajaj0509
Copy link
Contributor Author

@tklauser done. Thank you for your inputs :)

@ianlancetaylor
Copy link
Contributor

@gopherbot Please open backport issues

This test failure happens when running minor releases on some systems. The fix is tiny, so may as well backport to avoid unexpected test failures when people build those releases from source.

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #46768 (for 1.15), #46769 (for 1.16).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@dmitshur dmitshur added this to the Go1.17 milestone Jun 21, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/329831 mentions this issue: [release-branch.go1.16] syscall: fix TestGroupCleanupUserNamespace test failure on Fedora

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/328069 mentions this issue: [release-branch.go1.16] syscall: fix TestGroupCleanupUserNamespace test failure on Fedora

gopherbot pushed a commit that referenced this issue Jun 21, 2021
…st failure on Fedora

For #46752
Fixes #46768

Change-Id: I2eaa9d15fac4e859e18191fcf1372e5be94899df
GitHub-Last-Rev: f533c37
GitHub-Pull-Request: #46753
Reviewed-on: https://go-review.googlesource.com/c/go/+/328069
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
Trust: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
gopherbot pushed a commit that referenced this issue Jun 21, 2021
…st failure on Fedora

For #46752
Fixes #46769

Change-Id: I2eaa9d15fac4e859e18191fcf1372e5be94899df
GitHub-Last-Rev: 8a2672d
GitHub-Pull-Request: #46753
Reviewed-on: https://go-review.googlesource.com/c/go/+/328109
Run-TryBot: Tobias Klauser <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
(cherry picked from commit a752bc0)
Reviewed-on: https://go-review.googlesource.com/c/go/+/329831
Trust: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/397316 mentions this issue: syscall: relax output check in TestGroupCleanupUserNamespace

gopherbot pushed a commit that referenced this issue Mar 31, 2022
“If you have a procedure with ten parameters, you probably missed some.”
― attr. Alan J. Perlis

I argue that the same is true for hard-coded special cases.

In TestGroupCleanupUserNamespace, instead of a curated list of strings
observed in the wild we now check for a prefix, as was done for
TestGroupCleanup in CL 24670.

Updates #16224.
Updates #16303.
Updates #19938.
Updates #34547.
Updates #46752.
Fixes #52088.

Change-Id: I59c5b0c048113e306996c0f8247e09c714d2423a
Reviewed-on: https://go-review.googlesource.com/c/go/+/397316
Trust: Bryan Mills <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
@golang golang locked and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants