Skip to content

mountinfo: rewrite more tests to use a test-table#82

Merged
kolyshkin merged 2 commits intomoby:masterfrom
thaJeztah:more_test_tables
Aug 21, 2021
Merged

mountinfo: rewrite more tests to use a test-table#82
kolyshkin merged 2 commits intomoby:masterfrom
thaJeztah:more_test_tables

Conversation

@thaJeztah
Copy link
Copy Markdown
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 <[email protected]>
@kolyshkin
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Updated to drop the last commit 👍

Copy link
Copy Markdown
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