Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

add clone(CLONE_NEWUSER) test in spread-tests/regression/lp-1618683b #153

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jdstrand
Copy link

There is already a test for 'unshare -U' in spread-tests/regression/lp-1618683, but the fix for LP: #1618683 also fixed clone(CLONE_NEWUSER), so let's add a test for that. This requires merging https://code.launchpad.net/~jdstrand/+git/snapd-hacker-toolbelt/+ref/master.

Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

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

There's an existing test that does this so I'm interested in knowing if we need both. Have a look at https://github.com/snapcore/snap-confine/blob/master/spread-tests/regression/lp-1618683/task.yaml

execute: |
cd /
echo "We can clone(CLONE_NEWUSER) as a regular user and expect it to work"
/snap/bin/snapd-hacker-toolbelt.busybox sh -c 'clone-newuser-test'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you tell me what clone-newuser-test is and where does it come from?

Copy link
Author

Choose a reason for hiding this comment

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

"Can you tell me what clone-newuser-test is and where does it come from?"

I addressed this in the PR: "This requires merging https://code.launchpad.net/~jdstrand/+git/snapd-hacker-toolbelt/+ref/master."

If you are wondering where that came from-- it came from me-- I wrote clone-newuser-test.c.

@jdstrand
Copy link
Author

"There's an existing test that does this so I'm interested in knowing if we need both. Have a look at https://github.com/snapcore/snap-confine/blob/master/spread-tests/regression/lp-1618683/task.yaml"

I thought I described this in the PR...: "There is already a test for 'unshare -U' in spread-tests/regression/lp-1618683, but the fix for LP: #1618683 also fixed clone(CLONE_NEWUSER), so let's add a test for that."

Your unshare test specifies a devmode snap. The test in the PR works in strict mode. Could unshare be replaced by this test? Possibly, but testing in both devmode and strict mode seemed worthwhile.

@zyga
Copy link
Contributor

zyga commented Sep 29, 2016

Thank you for the explanation, it makes sense now.

@zyga
Copy link
Contributor

zyga commented Sep 30, 2016

I'll merge this for the next release. Thank you for writing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants