chroot: quick fix for #2687#2689
Merged
sylvestre merged 5 commits intouutils:masterfrom Oct 10, 2021
Merged
Conversation
Contributor
jhscheer
commented
Sep 19, 2021
- fixes chroot: thread 'main' panicked #2687
- change error message to better mimic GNU
Contributor
|
Could you please add a test to make sure we don't regress? |
* fixes uutils#2687 * change error message to better mimic GNU
f861f52 to
94fbe1e
Compare
Contributor
Author
|
Sorry I don't know how to implement a feasible test for this since root permission is required to trigger the relevant parts. |
Contributor
|
oh, just that passing 0 argument doesn't panic :) |
Contributor
Author
I added a test. It depends on #2692 to be merged first. |
* move the command building logic before the `chroot` syscall so it will be reachable by tests that don't have root permissions.
Contributor
Author
|
I gave this some more thought and moved the the command building logic before the |
sylvestre
reviewed
Sep 22, 2021
1538ac2 to
30c8a43
Compare
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.