Skip to content
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

Add symbol to do general host interface tests #115

Merged
merged 4 commits into from
May 26, 2023
Merged

Conversation

csegarragonz
Copy link
Contributor

@csegarragonz csegarragonz commented May 25, 2023

The aim of this PR is to introduce a new API call in the host interface for testing purposes: __faasm_host_interface_test(int testNum).

We need such an API to test specific behaviours of the implementation of the host interface. For example, testing that we can catch an exception from the Faasm runtime thrown from a host-interface function. For more reference on this particular example see faasm/faasm#756.

Annoyingly, the test number enum needs to be shared both by WASM code (that calls the tests by name), and the host interface function's implementation (e.g. in WAVM or in WAMR). Thus, the header needs to be duplicated in the faasm repo.

@csegarragonz csegarragonz marked this pull request as ready for review May 25, 2023 17:22
@csegarragonz csegarragonz merged commit 6a509fc into main May 26, 2023
@csegarragonz csegarragonz deleted the host-iface-test branch May 26, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant