- Create a pass that generates bugs based on trivially defined behavior for the purpose of testing the MLIR Reduce Tool.
- Implement the functionality inside the pass to crash mlir-opt in the presence of an operation with the name "crashOp".
- Register the pass as a test pass in the mlir-opt tool.
Details
- Reviewers
jpienaar tpopp stephenneuendorffer - Commits
- rG16e9ccb2be7a: Create TestReducer pass
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/mlir-reduce/test-reducer-pass.mlir | ||
---|---|---|
3 | +1 Also, don't use XFAIL: it means that the test is failing. |
mlir/test/mlir-reduce/test-reducer-pass.mlir | ||
---|---|---|
3 | The initial exit code of the crash is 134. When I use the 'not' keyword it changes it to 1. Should I change the fatal_error call used to produce the crash to an error that produces an exit code of 1? |
- Modify naming from test reduce to test reducer
- Add mlir-opt test case without test-mlir-reducer pass
mlir/test/lib/Reducer/TestReducer.cpp | ||
---|---|---|
10 | Perhaps instead of bugs, error reproducers? | |
43 | How about just checking for test.crashOp? (e.g., if dialect foo has a crashOp we should ignore it). You should be able to compare the stringref to the constant directly | |
45 | s/Bug// ? | |
52 | generating failures ? (depends on if you intend this to just crash or not, else you can say generating crashes) |
mlir/test/mlir-reduce/test-reducer-pass.mlir | ||
---|---|---|
3 | There is something fishy here... not will turn any non 0 exit code into a 0. |
- Modify error to exit with code 1
- Modify testcase to use the 'not' keyword
- Change 'bug' wording to 'failure'
MLIRTestReducer?