-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
dd: should error on count=B but doesn't #5904
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
Labels
Comments
This root-causes to
We could check if this is empty and bailout but there's other utils depending on this behaviou
There's a test that specifically checks for this #[test]
fn test_block_size_with_suffix() {
fn get_header(block_size: &str) -> String {
let output = new_ucmd!()
.args(&["-B", block_size, "--output=size"])
.succeeds()
.stdout_move_str();
output.lines().next().unwrap().trim().to_string()
}
assert_eq!(get_header("K"), "1K-blocks");
assert_eq!(get_header("M"), "1M-blocks");
assert_eq!(get_header("G"), "1G-blocks");
assert_eq!(get_header("1K"), "1K-blocks");
assert_eq!(get_header("1M"), "1M-blocks");
assert_eq!(get_header("1G"), "1G-blocks");
assert_eq!(get_header("1KiB"), "1K-blocks");
assert_eq!(get_header("1MiB"), "1M-blocks");
assert_eq!(get_header("1GiB"), "1G-blocks");
assert_eq!(get_header("1KB"), "1kB-blocks");
assert_eq!(get_header("1MB"), "1MB-blocks");
assert_eq!(get_header("1GB"), "1GB-blocks");
} |
It could be another field on the |
sylvestre
added a commit
that referenced
this issue
Jan 30, 2024
dd: fail on missing number in count, fix #5904
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Coreutils dd:
uutils dd:
This is from the GNU test suite file
tests/dd/bytes.sh
.The text was updated successfully, but these errors were encountered: