-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
dd: should terminate with error if skip argument is too large #7275
base: main
Are you sure you want to change the base?
Conversation
Notes:
|
reference to the check in GNU coreutils: |
GNU testsuite comparison:
|
Can you please add a test to ensure we don't regress in the future? |
yes, do we care that the GnuTests CI step failed? I'm not sure how to tell what test exactly failed from the logs. I ran this gnu test but I'm unsure of how to compare it to see what test actually failed. $ bash util/run-gnu-test.sh ============================================================================
Testsuite summary for GNU coreutils 9.6.8-fbfd88-dirty
============================================================================
# TOTAL: 617
# PASS: 469
# SKIP: 85
# XFAIL: 0
# FAIL: 63
# XPASS: 0
# ERROR: 0
============================================================================
See ./tests/test-suite.log for debugging.
Some test(s) failed. Please report this to [email protected],
together with the test-suite.log file (gzipped) and your system
information. Thanks.
============================================================================
|
It fails because of an intermittent test and you can ignore it. |
GNU testsuite comparison:
|
@cakebaker this should be ready to go now. |
return Err(ParseError::InvalidNumber(format!( | ||
"'{skip}': Value too large for defined data type" | ||
))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a similar error in uucore::parse_size
here:
coreutils/src/uucore/src/lib/parser/parse_size.rs
Lines 481 to 484 in e0a7c31
Self::SizeTooBig(format!( | |
"{}: Value too large for defined data type", | |
s.quote() | |
)) |
skip
and seek
are too large at the time of parsing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfinkels yes, they determine it when its parsed. Honestly I feel like its a "bug" upstream. I can reuse uucore::parse_size if you'd like instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the code check they do
https://github.com/coreutils/coreutils/blob/master/src/dd.c#L1581C23-L1581C39
Fixes #7216