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

mountinfo/TestGetMounts: fix for Ubuntu build system #18

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

kolyshkin
Copy link
Collaborator

@kolyshkin kolyshkin commented Jun 24, 2020

Apparently, Ubuntu build system is some sort of a chroot which does not
have / mount in its /proc/self/mountinfo. This leads to test failure
described in #17.

The fix is not to require a specific mount (even / that must exist but
apparently does not in some setups). Instead, let's require at least 2
mounts, doesn't matter which ones.

For reference, his test case was added by
moby/moby#4812

Fixes: #17

Apparently, Ubuntu build system is some sort of a chroot which does not
have / mount in its /proc/self/mountinfo. This leads to test failure
described in moby#17.

The fix is not to require a specific mount (even '/' that must exist but
apparently does not in some setups). Instead, let's require at least 2
mounts, doesn't matter which ones.

For reference, his test case was added by
moby/moby#4812

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Collaborator Author

@thaJeztah @cpuguy83 PTAL

@kolyshkin
Copy link
Collaborator Author

The Linux kernel's show_mountinfo() has a check that the mount is accessible, and it is not shown if not. Looks like this is why the mount for / is not shown in the Ubuntu case -- they have some weird setup.

Copy link
Member

@thaJeztah thaJeztah 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

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83 cpuguy83 merged commit dbb4d68 into moby:master Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to run TestGetMounts in chroot
3 participants