-
Notifications
You must be signed in to change notification settings - Fork 749
let iwasm return non-zero value when running failed #1377
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
let iwasm return non-zero value when running failed #1377
Conversation
…#1377) Let iwasm return non-zero value when running failed so that the caller (e.g. test framework) can check the running status according to the return value.
|
Hello, I was looking into adding some tests (for WASI) and I see that spec tests are always enabled https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/tests/wamr-test-suites/test_wamr.sh#L177. What's the reason behind always returning 0 when spec tests are enabled i.e. In my case I'd like to get a non-zero value when there's a failure so I'll have to turn |
|
Maybe it's not necessary anymore? I ran the GitHub actions after replacing #if WASM_ENABLE_SPEC_TEST != 0
(void)ret;
return 0;
#else
return ret;
#endifwith just |
Yes, seems that it's not necessary, it returned 0 before this PR, and in this PR we let it return 0 when spec test is enabled in case that the spec test script cannot handle the return value correctly when a non-zero is returned, e.g. loading a mal-formed wasm binary file. It seems that the spec test scripts work correctly and we can replace the code to How about we fix it in the main branch, and then merge main branch into dev/wasi_threads? |
…#1377) Let iwasm return non-zero value when running failed so that the caller (e.g. test framework) can check the running status according to the return value.
No description provided.