-
Notifications
You must be signed in to change notification settings - Fork 15
Added support for purposeful failing test cases #528
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
base: main
Are you sure you want to change the base?
Conversation
End-to-End Test ReportTest PreviewTest Report Deterministic TestsSummary
Test Results by Category
Non Deterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
you need to change the path of signal_resethand so its still skipped now that its moved. We'll have someone else look into whats going on there. |
m-hemmings
left a comment
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.
Most of my comments are cosmetic, looks good except for a few nits
| native_success, native_output, native_retcode, native_error = compile_and_run_native(source_file, timeout_sec) | ||
|
|
||
| # If native compile failed, report and return | ||
| if native_error == "Failure_native_compiling": |
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.
Nice early-abort. One thought: this means a fail-test doesn't expect compile errors. Fine, but maybe worth a note since it’s distinct from “expected failure = runtime failure,” not “compile must fail.”
scripts/wasmtestreport.py
Outdated
| return | ||
|
|
||
| # Compile and run WASM | ||
| wasm_file, compile_err = compile_c_to_wasm(source_file) |
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.
Clean. One tiny improvement: you might want to name the error more explicitly later (e.g., wasm_compile_error) to keep symmetry with native.
| if isinstance(wasm_retcode, str): | ||
| wasm_failed = True # timeout or unknown_error means it failed | ||
| else: | ||
| wasm_failed = wasm_retcode != 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 works, but I’d tighten it up in case later on someone forgets why string return codes mean “failed.”
scripts/wasmtestreport.py
Outdated
| handler.add_success(output_info) | ||
| elif not native_failed and not wasm_failed: | ||
| # Both succeeded when they should have failed | ||
| failure_info = ( |
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.
Only suggestion: the block that builds failure_info is duplicated 3× here . A helper would de-duplicate and avoid future formatting drift.
scripts/wasmtestreport.py
Outdated
| "Output_mismatch": "C Compiler and Wasm Output mismatch", | ||
| "Fail_native_succeeded": "Fail Test: Native Succeeded (Should Fail)", | ||
| "Fail_wasm_succeeded": "Fail Test: Wasm Succeeded (Should Fail)", | ||
| "Fail_both_succeeded": "Fail Test: Both Native and Wasm Succeeded (Should Fail)" |
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.
Nice, explicit, readable. Would be even nicer if you grouped these together with a comment like:
Expected-failure test modes
|
Looks good. As Nick mentioned, just change the path of signal_resethand test in the skip list since it is failing. |
End-to-End Test ReportTest PreviewTest Report Deterministic TestsSummary
Test Results by Category
Non Deterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The test suite now supports purposeful failing tests:
New tests that now pass:
mmap-negative1.c
mmap-negative2.c