Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

tests: skip userns tests when userns does not work #1947

Merged
merged 1 commit into from Jan 11, 2016

Conversation

alban
Copy link
Member

@alban alban commented Jan 8, 2016

CentOS 7 pretends to support user namespaces but does not. See
https://bugzilla.redhat.com/show_bug.cgi?id=1168776#c5

Skip rkt tests with user namespaces when the host cannot do user
namespaces.

#1927

CentOS 7 pretends to support user namespaces but does not. See
https://bugzilla.redhat.com/show_bug.cgi?id=1168776#c5

Skip rkt tests with user namespaces when the host cannot do user
namespaces.

rkt#1927
@alban alban self-assigned this Jan 8, 2016
@@ -25,6 +25,14 @@ import (

// TestNonRootReadInfo tests that non-root users that can do rkt list, rkt image list.
func TestNonRootReadInfo(t *testing.T) {
if !common.SupportsUserNS() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need user namespaces for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test starts some pods: some with user namespaces and some without. Then it checks that rkt list works without being root.

I think the idea was to check that non-root access to /var/lib/rkt/pods/run/$UUID/stage1/rootfs/rkt/status/ works fine, even when the directory uid/gid is shifted by the user namespace. The test also tries with and without overlayfs because the "rkt/status" directory would be stored in a different location in case of overlay fs.

However, the test only runs rkt list and not rkt status. And I don't think rkt list needs to have access to the "rkt/status" directory...

@iaguis
Copy link
Member

iaguis commented Jan 11, 2016

This is not very nice but it improves the testing situation. LGTM

iaguis added a commit that referenced this pull request Jan 11, 2016
tests: skip userns tests when userns does not work
@iaguis iaguis merged commit 7a4b4ce into rkt:master Jan 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants