-try to preprocess the file before reducing
-try to remove some command line arguments
-now requires a llvm bin directory since the generated crash script doesn't have an absolute path for clang
Details
Diff Detail
- Repository
- rC Clang
Event Timeline
clang/utils/creduce-clang-crash.py | ||
---|---|---|
106–117 ↗ | (On Diff #191128) | Another way to do this without the complexity of swapping the files around is to construct the interestingness test to take the path to the file as a parameter ($1). CReduce always passes the path to the file being reduced as the first argument. |
Aside from the buglet, I'm happy with this, but I wanted to wait until @george.burgess.iv takes a look.
clang/utils/creduce-clang-crash.py | ||
---|---|---|
44 ↗ | (On Diff #191192) | This modifies cmd in place, so multiple calls to quote_cmd will get "more quoted" with more calls, right? |
clang/utils/creduce-clang-crash.py | ||
---|---|---|
106–117 ↗ | (On Diff #191128) | It seems like creduce isn't actually passing the filename as an argument (creduce had problems when I accidentally used the absolute path of the file as the default value when no arguments are found) |
clang/utils/creduce-clang-crash.py | ||
---|---|---|
45 ↗ | (On Diff #191217) | Useless enumerate here. You could even use a list comprehension here return ' '.join(arg if arg.startswith('$') else pipes.quote(arg) for arg in cmd) |
161 ↗ | (On Diff #191217) | useless parenthesis around test could be a list comprehension result = [arg for arg in args if all(not arg.startswith(a) for a in opts_startswith)] |
Just a few style nits for you, and this LGTM. I assume rnk and serge-sans-paille are content, so I'm happy to check this in for you once these are addressed.
Thanks!
clang/utils/creduce-clang-crash.py | ||
---|---|---|
64 ↗ | (On Diff #191409) | nit: can be simplified to return all(msg not in crash_output for msg in expected_output) |
116 ↗ | (On Diff #191409) | nit: looks like you can use returncode = subprocess.call(testfile, stdout=devnull) here |
124 ↗ | (On Diff #191409) | same subprocess.call nit |
243 ↗ | (On Diff #191409) | nit: please add a space: # FIXME |
@akhuang Thanks for getting this committed. Since it seems like a lot of this is taken from my script, could you please add me as a reviewer for the next patch so that I know which bits still need to be upstreamed?