Skip to content
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

update #6

Merged
merged 83 commits into from
Mar 12, 2024
Merged
Changes from 2 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
9f2e426
ci: use codecov token in CICD/GnuTests workflows
cakebaker Feb 4, 2024
868600c
tee: fail test if string setup fails
BenWiederhake Feb 23, 2024
9fa808f
sort: add skipped test for combined flags
BenWiederhake Feb 23, 2024
bcd2d88
cat: don't flake even on exotic pipe buffer sizes
BenWiederhake Feb 23, 2024
44c59a6
numfmt: don't flake even on exotic pipe buffer sizes
BenWiederhake Feb 23, 2024
b3d8344
split: don't flake even on exotic pipe buffer sizes
BenWiederhake Feb 23, 2024
a4d5def
simulate terminal utility (squash)
cre4ture Feb 7, 2024
263a163
workaround: run builds with retry (a)
cre4ture Feb 17, 2024
d8b3b41
added configurable terminal size
cre4ture Feb 25, 2024
716581e
chore(deps): update rust crate rayon to 1.9
renovate[bot] Feb 28, 2024
bd6fc2b
Merge pull request #6026 from uutils/renovate/rayon-1.x
cakebaker Feb 28, 2024
769c5ca
Merge pull request #6000 from BenWiederhake/dev-pipein-fails-flake
sylvestre Feb 28, 2024
372cd52
Merge pull request #5993 from cre4ture/fix/workaround_for_textfile_bu…
sylvestre Feb 28, 2024
8fcce6e
cargo: fix feature = "cargo-clippy" deprecation
rex4539 Feb 28, 2024
18c9da3
Merge pull request #6027 from rex4539/clippy
cakebaker Feb 28, 2024
5d74a6e
tests/printf: Fix char_as_byte test, add char and string padding tests
RenjiSann Feb 28, 2024
42cde76
printf: Change get_char and write_padded to handle bytes instead of c…
RenjiSann Feb 28, 2024
5d35978
uucore/format: add padlen to spell-checker:ignore
cakebaker Feb 29, 2024
75b2bfb
Merge pull request #6028 from RenjiSann/feature/printf-byte
cakebaker Feb 29, 2024
58ee0ce
tests/printf: Verify the correct error behavior of printf when provid…
RenjiSann Feb 29, 2024
7094ff1
printf: Raise error on '%0c' and '%0s' formats
RenjiSann Feb 29, 2024
41f809d
Merge pull request #6032 from RenjiSann/feature/printf-0c-error
cakebaker Mar 1, 2024
ba1c6b0
cp: fix flaky test test_cp_arg_interactive_update, document adjacent bug
BenWiederhake Feb 25, 2024
09048a3
Merge pull request #6020 from BenWiederhake/dev-cp-flaky-arg_interact…
cakebaker Mar 1, 2024
9003e3f
Merge pull request #5869 from cre4ture/feature/simulate_terminal_utility
sylvestre Mar 1, 2024
118a65a
Merge pull request #5938 from cakebaker/ci_codecov_token
sylvestre Mar 1, 2024
0a84ec2
chore(deps): update rust crate walkdir to 2.5
renovate[bot] Mar 1, 2024
100a48f
cat: permit repeating command-line flags
BenWiederhake Mar 1, 2024
472b56f
cat: fix -b and -n anti-symmetry
BenWiederhake Mar 1, 2024
cd70d7d
cat: ignore -u flag, just like GNU does
BenWiederhake Mar 1, 2024
a8ad627
Merge pull request #6038 from uutils/renovate/walkdir-2.x
cakebaker Mar 2, 2024
d651063
tests/common/util.rs: add cfg(feature = "env")
cakebaker Mar 3, 2024
80bc8a7
Merge pull request #6044 from cakebaker/fix_tests_common_utils
tertsdiepraam Mar 3, 2024
679b9e2
cat: prefix two test fns with "test_"
cakebaker Mar 4, 2024
4d66af2
Merge pull request #6034 from BenWiederhake/dev-cat-flags-everything
cakebaker Mar 4, 2024
837bc94
Bump mio from 0.8.10 to 0.8.11
cakebaker Mar 5, 2024
b3fd711
Merge pull request #6045 from cakebaker/bump_mio
sylvestre Mar 5, 2024
294c9de
extend error message for case when writer instanciation fails second …
cre4ture Mar 2, 2024
a1c14fb
Bump chrono from 0.4.34 to 0.4.35
cakebaker Mar 6, 2024
c45c00e
ls: use chrono::TimeDelta::try_seconds instead of
cakebaker Mar 6, 2024
aad8f7d
touch: replace use of deprecated chrono functions
cakebaker Mar 6, 2024
bf5d7f7
chmod: slightly adjust error message when preserve-root is triggered
BenWiederhake Mar 3, 2024
5c2c38c
chgrp+chown: also trigger preserve-root during dirwalking, fix error …
BenWiederhake Mar 3, 2024
d25d994
uucore: drop unused function resolve_relative_path
BenWiederhake Mar 3, 2024
dab02d0
split: close as much fds as needed for opening new one
cre4ture Mar 3, 2024
db142f9
use std::command::pre_exec() to set limits on child before exec
cre4ture Mar 5, 2024
cd010ad
chore(deps): update softprops/action-gh-release action to v2
renovate[bot] Mar 8, 2024
b34d410
Merge pull request #6049 from uutils/renovate/softprops-action-gh-rel…
cakebaker Mar 9, 2024
1819cde
dd: treat arg as bytes if it contains 'B'
matrixhead Mar 9, 2024
dcfb03a
Fix clippy warnings
sylvestre Mar 9, 2024
991d718
Merge pull request #6043 from cre4ture/fix/flaky_split_round_robin_li…
sylvestre Mar 9, 2024
6c29ed0
Merge pull request #6042 from BenWiederhake/dev-chown-preserve-root
sylvestre Mar 9, 2024
9cbe605
tr: stream output instead of buffering
BenWiederhake Feb 25, 2024
4ee3f68
shuf: fix and test off-by-one errors around ranges
BenWiederhake Feb 24, 2024
b233569
shuf: fix error message text on negative-sized ranges
BenWiederhake Feb 27, 2024
dbfd4d8
chcon: allow overriding between --dereference and --no-dereference
BenWiederhake Mar 2, 2024
8be5f7a
chcon: allow repeated flags and arguments
BenWiederhake Mar 2, 2024
8c79402
Merge pull request #6047 from cakebaker/bump_chrono
sylvestre Mar 10, 2024
d11d595
touch: Respect -h when getting metadata (#5951)
ysthakur Mar 10, 2024
a578fe9
Merge pull request #6050 from matrixhead/main
tertsdiepraam Mar 10, 2024
1eaa87c
Merge pull request #6052 from sylvestre/clippy43
cakebaker Mar 10, 2024
9054a24
pr: fix deprecation warnings & remove comment
cakebaker Mar 10, 2024
0579233
chgrp: fix clippy warning
cakebaker Mar 10, 2024
da9682d
Merge pull request #6054 from cakebaker/pr_chgrp_fix_warnings
sylvestre Mar 10, 2024
156d3f7
cut: allow non utf8 characters for delimiters (#6037)
zhitkoff Mar 10, 2024
2e8f0e5
Merge pull request #6039 from BenWiederhake/dev-chcon-repeat-args
sylvestre Mar 10, 2024
fe0c814
Merge pull request #6012 from BenWiederhake/dev-tr-stream
sylvestre Mar 10, 2024
80702d5
Merge pull request #6014 from BenWiederhake/dev-shuf-range-off-by-one
sylvestre Mar 10, 2024
89b326f
cp: improve the support of --attributes-only (#6051)
sylvestre Mar 11, 2024
df585ed
cp: Split the copy_file function a bit
sylvestre Mar 11, 2024
0da5a78
Merge pull request #6056 from sylvestre/refactor-copy-function
cakebaker Mar 11, 2024
be24742
parser: if closing square bracket not found, stop looking for it again
cj-zoltan-kiss Mar 1, 2024
93b1abf
Merge pull request #6036 from cj-zoltan-kiss/zoltankiss/globfix
sylvestre Mar 11, 2024
7cd754e
Fix install: invalid link at destination
cre4ture Feb 24, 2024
ffb7059
Merge pull request #5851 from cre4ture/fix/install_invalid_link_at_de…
sylvestre Mar 12, 2024
ae7bc7d
Bump nix from 0.27 to 0.28
cakebaker Mar 11, 2024
15cb024
uucore/pipes: adapt to new return type of nix fn
cakebaker Mar 11, 2024
1413054
tty: unistd::ttyname takes AsFd instead of RawFd
cakebaker Mar 11, 2024
6fd37da
stty: remove ofill output flag
cakebaker Mar 11, 2024
14ac1e1
cat: adapt to type change of unistd::write()
cakebaker Mar 12, 2024
9de409d
Merge pull request #6055 from cakebaker/bump_nix
sylvestre Mar 12, 2024
3515cd4
chore(deps): update rust crate blake3 to 1.5.1
renovate[bot] Mar 12, 2024
cc1142c
Merge pull request #6057 from uutils/renovate/blake3-1.x
sylvestre Mar 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/uu/dd/src/parseargs.rs
Original file line number Diff line number Diff line change
@@ -275,7 +275,7 @@ impl Parser {

fn parse_n(val: &str) -> Result<Num, ParseError> {
let n = parse_bytes_with_opt_multiplier(val)?;
Ok(if val.ends_with('B') {
Ok(if val.contains('B') {
Num::Bytes(n)
} else {
Num::Blocks(n)
@@ -631,8 +631,9 @@ fn conversion_mode(
#[cfg(test)]
mod tests {

use crate::parseargs::parse_bytes_with_opt_multiplier;

use crate::parseargs::{parse_bytes_with_opt_multiplier, Parser};
use crate::Num;
use std::matches;
const BIG: &str = "9999999999999999999999999999999999999999999999999999999999999";

#[test]
@@ -659,4 +660,13 @@ mod tests {
2 * 2 * (3 * 2) // (1 * 2) * (2 * 1) * (3 * 2)
);
}
#[test]
fn test_parse_n() {
for arg in ["1x8x4", "1c", "123b", "123w"] {
assert!(matches!(Parser::parse_n(arg), Ok(Num::Blocks(_))));
}
for arg in ["1Bx8x4", "2Bx8", "2Bx8B", "2x8B"] {
assert!(matches!(Parser::parse_n(arg), Ok(Num::Bytes(_))));
}
}
}
30 changes: 30 additions & 0 deletions tests/by-util/test_dd.rs
Original file line number Diff line number Diff line change
@@ -1405,6 +1405,36 @@ fn test_bytes_suffix() {
.stdout_only("\0\0\0abcdef");
}

#[test]
// the recursive nature of the suffix allows any string with a 'B' in it treated as bytes.
fn test_bytes_suffix_recursive() {
new_ucmd!()
.args(&["count=2Bx2", "status=none"])
.pipe_in("abcdef")
.succeeds()
.stdout_only("abcd");
new_ucmd!()
.args(&["skip=2Bx2", "status=none"])
.pipe_in("abcdef")
.succeeds()
.stdout_only("ef");
new_ucmd!()
.args(&["iseek=2Bx2", "status=none"])
.pipe_in("abcdef")
.succeeds()
.stdout_only("ef");
new_ucmd!()
.args(&["seek=2Bx2", "status=none"])
.pipe_in("abcdef")
.succeeds()
.stdout_only("\0\0\0\0abcdef");
new_ucmd!()
.args(&["oseek=2Bx2", "status=none"])
.pipe_in("abcdef")
.succeeds()
.stdout_only("\0\0\0\0abcdef");
}

/// Test for "conv=sync" with a slow reader.
#[cfg(not(windows))]
#[test]