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

tests: extend mount-ns test to handle mimics #7442

Merged
merged 1 commit into from Sep 13, 2019

Conversation

zyga
Copy link
Collaborator

@zyga zyga commented Sep 10, 2019

The mount namespace test is very useful for exploring the layout of the
mount namespace used by snapd under various circumstances. The test
already covered several key combinations of the mount namespace: Ubuntu
16.04 and 18.04 both as classic and core hosts also as base snaps. The
test explored the vanilla behavior of the mount namespace, as
constructed by snap-confine.

This patch extends that test to cover the properties of writable mimic,
as created by snap-update-ns. This test is meant as a prerequisite for
the upcoming change to propagation in mount namespaces.

NOTE: This patch is also showing the effect of bug https://bugs.launchpad.net/snapd/+bug/1843423 - namely that /usr/share holds the mimic tmpfs, rather than what one might expect, /usr/share/X11.

Signed-off-by: Zygmunt Krynicki me@zygoon.pl

Copy link
Member

@anonymouse64 anonymouse64 left a comment

Choose a reason for hiding this comment

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

I'm not sure why there are so many more mounts showing up with core18

@zyga zyga force-pushed the feature/mimic-namespace-test branch from a5a8bf1 to 99fbe03 Compare September 12, 2019 10:03
@zyga
Copy link
Collaborator Author

zyga commented Sep 12, 2019

I've rebased this now and it's crystal clear that the mimic code is giving drastically different result between core16 and core18.

@zyga
Copy link
Collaborator Author

zyga commented Sep 12, 2019

@anonymouse64 I will investigate the discrepancy and knowing the outcome continue either by proposing to merge this as-is or change the test to "hide" it. It is possible that this is not an actual bug and rather a peculiar arrangement of the core18 filesystem at play.

The mount namespace test is very useful for exploring the layout of the
mount namespace used by snapd under various circumstances. The test
already covered several key combinations of the mount namespace: Ubuntu
16.04 and 18.04 both as classic and core hosts also as base snaps. The
test explored the vanilla behavior of the mount namespace, as
constructed by snap-confine.

This patch extends that test to cover the properties of writable mimic,
as created by snap-update-ns. This test is meant as a prerequisite for
the upcoming change to propagation in mount namespaces.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
@zyga zyga force-pushed the feature/mimic-namespace-test branch from 99fbe03 to 1194565 Compare September 13, 2019 08:10
Copy link
Collaborator

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@anonymouse64 anonymouse64 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the changed dir that made the diffs smaller 👍

@zyga zyga merged commit 223a1ea into snapcore:master Sep 13, 2019
@zyga zyga deleted the feature/mimic-namespace-test branch September 13, 2019 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants