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: rewrite more tests to use a test-table #82

Merged
merged 2 commits into from
Aug 21, 2021

Conversation

thaJeztah
Copy link
Member

See individual commits for details

This allows us to more easily add more/other samples, as well as
combine the TestParseFedoraMountinfo,  TestParseUbuntuMountinfo,
TestParseGentooMountinfo, and TestParseFedoraMountinfoFields tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@kolyshkin
Copy link
Collaborator

To me, the first commit definitely make sense (and is something I wanted to do myself but never got around to), the second one kind of make sense (if we have the data, why not use it for testing)?

The last commit seems useless. It makes sense in runc, as it was added together with a specific fix, to make sure runc parser can parse multiple cgroup v1 mount hierarchies (rather than one which is usual). Here it doesn't make sense since the parser is generic and doesn't care about how many cgroup v1 mount hierarchies are there.

Can we drop the last commit?

@thaJeztah
Copy link
Member Author

The last commit seems useless. It makes sense in runc, as it was added together with a specific fix, to make sure runc parser can parse multiple cgroup v1 mount hierarchies (rather than one which is usual). Here it doesn't make sense since the parser is generic and doesn't care about how many cgroup v1 mount hierarchies are there.

Ah, yes. I initially was looking if it would make sense to have (some of) the cgroups helper in this repository as well (and for that reason, to have test coverage), but currently that's not there, so they don't add much. I'll drop that commit.

@thaJeztah thaJeztah changed the title mountinfo: rewrite more tests to use a test-table, and add some test-samples from runs mountinfo: rewrite more tests to use a test-table Aug 15, 2021
@thaJeztah
Copy link
Member Author

Updated to drop the last commit 👍

Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@kolyshkin kolyshkin merged commit 8d03077 into moby:master Aug 21, 2021
@thaJeztah thaJeztah deleted the more_test_tables branch August 21, 2021 20:16
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.

3 participants