goto-instrument --add-cmd-line-arg: Explicitly set argv (and argc) to user-specified values#6462
goto-instrument --add-cmd-line-arg: Explicitly set argv (and argc) to user-specified values#6462vmihalko wants to merge 0 commit intodiffblue:developfrom
Conversation
| 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.
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
TGWDB
left a comment
There was a problem hiding this comment.
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.
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
|
|
||
| # Detailed version information | ||
| CBMC_VERSION = 5.43.0 | ||
| CBMC_VERSION = 5.44.0 |
There was a problem hiding this comment.
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-argvindoc/cprover-manual/so I don't know where to document--add-cmd-line-argThis PR is related to #5965.