cut: strip i/o errno - #14060
Conversation
run on linux
|
GNU testsuite comparison: |
|
really interesting why cargo tests cannot reproduce that |
Merging this PR will not alter performance
Comparing Footnotes
|
|
@cakebaker what cargo test returns is different than when the same command it uses is ran manually, what can be the cause? |
|
turns out we had to strip errno for both chars and bytes :D |
| .args(&["-c1", "/proc/self/mem"]) | ||
| .fails_with_code(1); | ||
|
|
||
| let stderr = result.stderr_str(); |
Co-authored-by: oech3 <79379754+oech3@users.noreply.github.com>
Co-authored-by: oech3 <79379754+oech3@users.noreply.github.com>
|
|
||
| if let Err(e) = result { | ||
| return Err(USimpleError::new(1, e.to_string())); | ||
| return Err(USimpleError::new(1, strip_errno(&e))); |
There was a problem hiding this comment.
Can be different PR. But result.map_err(|_| ...)?;
There was a problem hiding this comment.
Yeah, I thought of the same, but let's simplify it later as I've seen it in other places too?
Co-authored-by: oech3 <79379754+oech3@users.noreply.github.com>
closes #14051