contrib/fs-idmap: Minor cleanups#3954
Merged
kolyshkin merged 5 commits intoopencontainers:mainfrom Aug 3, 2023
Merged
Conversation
97c0711 to
8cfa68b
Compare
rata
commented
Aug 1, 2023
cyphar
reviewed
Aug 2, 2023
cyphar
requested changes
Aug 2, 2023
cyphar
requested changes
Aug 2, 2023
This is what we should do, although in practice this probably won't be a big issue as the parent also exits. While we are there, instead of waiting for the child to finish, kill it if we did everything we wanted to do. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
f5dfe17 to
27b4886
Compare
Member
Author
|
@cyphar @kolyshkin All fixed now, PTAL |
cyphar
approved these changes
Aug 2, 2023
Member
cyphar
left a comment
There was a problem hiding this comment.
LGTM, though I don't think this change needs 8 commits.
We don't really need to check if AT_RECURSIVE is possible here. We just want to check if we can idmap the src, it doesn't matter other nested mounts. While we are there, allow relative paths too. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
If more args are passed, let's just throw an error. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
Let's just rely on the lookup performed to find the sleep binary. This didn't cause any issues as far as I know, I just saw this while doing other cleanups. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
We can't call log.Fatalf() and defer functions, as the former doesn't call any defers. Let's just move the code to a new function and call os.Exit() only in main, when all defer executed. Now that all the code is one function, we only print twice to stderr. It is simpler to just print to stderr instead of logging and having also the timestamp we don't really want. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
Member
Author
|
@cyphar heh, agreed. Squashed some commits now. Other than that, no changes :) |
cyphar
approved these changes
Aug 2, 2023
Contributor
|
In fact, this is more than "minor cleanups" -- this allows the tests to be skipped when they are needed to be skipped. |
This was referenced Aug 3, 2023
Contributor
|
Thank you for the merge! |
Member
Author
|
@kolyshkin really, how so? Do you happen to know? It was skipping tests before this PR just fine on CI. But I'm glad this helps :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are some cleanups to the fs-idmap binary that we use in integration test to detect if a fs supports idmap mounts or not.
These are just minor cleanups, I'm not fixing any real bug we hit nor anything (I'm not aware of any).
cc @eiffel-fl