Add test for load failures due to mismatching imports#542
Open
leonm1 wants to merge 1 commit into
Open
Conversation
Also unifies the error messages across engines. Signed-off-by: Matt Leon <mattleon@google.com>
PiotrSikora
approved these changes
May 20, 2026
Member
PiotrSikora
left a comment
There was a problem hiding this comment.
LGTM, but ideally those 2 nits would be addressed. Thanks1
| ) | ||
|
|
||
| wasm_rust_binary( | ||
| name = "invalid_import_type.wasm", |
Member
There was a problem hiding this comment.
Nit: invalid -> wrong or incorrect (it's technically a valid type).
| EXPECT_TRUE(host->isErrorLogged("Failed to load Wasm module")); | ||
| // TODO: WasmEdge logs the failing import to stderr, but not to the Proxy-Wasm integration logger. | ||
| if (engine_ != "wasmedge") { | ||
| EXPECT_TRUE(host->isErrorLogged("proxy_log")); |
Member
There was a problem hiding this comment.
Nit: it took me a second to realize that this refers to the function name and not logging facility, so perhaps the proxy_log isn't the best hostcall to use here from the readability point of view.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In addition, unifies the error message prefix across engines. I have filed #541 to fix the missing import-specific error in WasmEdge.