dd: catch OOM

This commit is contained in:
oech3
2026-03-31 22:18:15 +02:00
committed by Sylvestre Ledru
parent 7ec8dc1f29
commit 0beca7cb84
2 changed files with 14 additions and 4 deletions
+8
View File
@@ -115,6 +115,14 @@ fn help() {
new_ucmd!().args(&["--help"]).succeeds();
}
#[test]
fn test_out_of_memory() {
new_ucmd!()
.arg("bs=1PB")
.fails_with_code(1)
.stderr_contains("memory"); //todo: improve error message at all platforms
}
#[test]
fn test_stdin_stdout() {
let input = build_ascii_block(521);