Don't assume /run/snapd/ns can be removed #143

Merged
merged 2 commits into from Sep 14, 2016

Conversation

Projects
None yet
2 participants
Collaborator

zyga commented Sep 14, 2016

This patch fixes a test case that is overzealous in the assumption that
/run/snapd/ns can be removed. That directory can contain additional
mount and lock files from any snaps present on the system that have run
earlier.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

Don't assume /run/snapd/ns can be removed
This patch fixes a test case that is overzealous in the assumption that
/run/snapd/ns can be removed. That directory can contain additional
mount and lock files from any snaps present on the system that have run
earlier.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
@@ -18,4 +18,3 @@ restore: |
umount /run/snapd/ns
rm /run/snapd/ns/foo.mnt
rm /run/snapd/ns/foo.lock
- rmdir /run/snapd/ns
@jdstrand

jdstrand Sep 14, 2016

Contributor

What about "rmdir /run/snapd/ns || true" instead (with a comment that it is ok when it can't be removed). This way we get the cleanup if it can be done.

@zyga

zyga Sep 14, 2016

Collaborator

Done

@zyga zyga merged commit 9381781 into master Sep 14, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@zyga zyga deleted the tweak-tests branch Sep 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment