-
Notifications
You must be signed in to change notification settings - Fork 346
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
[WIP] Add test for rootfs propagation with mock mount #347
[WIP] Add test for rootfs propagation with mock mount #347
Conversation
Edit: My knee jerk reaction is to test these functions with fork, new mount namespace, and the actual mount calls. How hard is it to write the actual test with fork? You may have to use serial test in these cases. |
I actually wrote a draft for the test of I just focused on writing unit tests for |
Yes, this is what I had in mind as well. A few minor points:
|
@tommady Are you able to incorporate this change? Since the title of #340 is vague, can I ask what is the scope of the PR? Let us know what you plan to keep from this PR for #340. In general, please keep the PR as small as reasonably possible. This will be much easier for review and coordinate. |
hi @yihuaf the goal of PR #340 is trying to increase the testing coverage of rootfs.rs file only. so the plain is that
is that acceptable to you? thanks |
Looks like @tommady already incorporated this PR into other PRs. Closing this for now. Please reopen if I made a mistake. |
This is a follow-up pull request to add unit tests for functions implemented in #309.
This pull request calls mount system call through
Syscall
trait to mock it in unit tests. Although we can use fork and then execute real mount system call in child process, I feel checking mount arguments is simple and enough in this case.@utam0k @yihuaf
What do you think about the idea of using mock for these tests?