-
Notifications
You must be signed in to change notification settings - Fork 275
goto-instrument --add-cmd-line-arg: Explicitly set argv (and argc) to user-specified values #6462
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
Conversation
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.
I am fine with this but I would like a second opinion from someone who wasn't involved in #5965
@@ -1842,7 +1870,7 @@ void goto_instrument_parse_optionst::help() | |||
HELP_REMOVE_CALLS_NO_BODY | |||
HELP_REMOVE_CONST_FUNCTION_POINTERS | |||
" --add-library add models of C library functions\n" | |||
" --model-argc-argv <n> model up to <n> command line arguments\n" | |||
HELP_ARGC_ARGV |
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.
Don't worry about fixing this for this particular PR but in general we try to make sure that the code compiles after every commit. That way we can use git bisect
more easily.
Codecov Report
@@ Coverage Diff @@
## develop #6462 +/- ##
===========================================
- Coverage 76.62% 75.98% -0.65%
===========================================
Files 1578 1542 -36
Lines 181180 165081 -16099
===========================================
- Hits 138833 125435 -13398
+ Misses 42347 39646 -2701
Continue to review full report at Codecov.
|
a140c66
to
eebce96
Compare
I just discovered a problem. When arg string has prefix "--" or "-" (e.g. |
eebce96
to
4fa54ba
Compare
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.
I'd like to see some more tests about different kinds of inputs/cases/failures as the current tests are very limited.
Also more explanation/documentation of how these can/cannot be combined, since it appears like --model-argc-argv
and --add-cmd-line-arg
are mutually exclusive. Which in turns makes me wonder if someone would want to specify unknown command line arguments for some positions (e.g. I want to test my flag, but with any value rather than specifying the value).
CORE | ||
main.c | ||
--model-argc-argv 2 | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
^warning: ignoring |
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.
This test only tests that the --model-argc-argv 2
is accepted, I don't think it tests the actual value 2
is used anywhere (this file fails without the flag).
src/config.inc
Outdated
@@ -76,7 +76,7 @@ endif | |||
OSX_IDENTITY="Developer ID Application: Daniel Kroening" | |||
|
|||
# Detailed version information | |||
CBMC_VERSION = 5.43.0 | |||
CBMC_VERSION = 5.44.0 |
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.
This should not be in this commit (but it's not important).
b3ed165
to
dedaee7
Compare
There seems to be four commits that should not be part of this PR (commits authored by others, touching unrelated code such as the version number bump...) - I wonder if a rebase has gone wrong at some point? It would be worth a fresh rebase on top of the latest develop, and if those extra commits are still hanging around at that point, explicitly drop them so that this PR contains only your changes for this feature. That would also make it easier to review :-) |
bba217e
to
805e196
Compare
805e196
to
a0fe71a
Compare
--model-argc-argv
indoc/cprover-manual/
so I don't know where to document--add-cmd-line-arg
This PR is related to #5965.