-
Notifications
You must be signed in to change notification settings - Fork 70
Set SGX execution through WASM_VM env. variable
#587
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
Conversation
… add the WASM VM var to logging
…e to the env. var
27eb534 to
2fb84ac
Compare
| ] | ||
|
|
||
| WAMR_WHITELISTED_FUNCS = [ | ||
| WAMR_ALLOWED_FUNCS = [ |
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.
Kind of unrelated, but following our master->main re-factor, I thought I would also change this whilst I was amending this file (I don't think we use whitelist/blacklist anywhere else other than sgx code which will get re-factored now anyway).
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, yeah let's keep chipping away at this.
| env = copy(environ) | ||
| env.update( | ||
| { | ||
| "WASM_VM": "wamr" if wamr else "wavm", |
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.
We don't update the environment, therefore we inherit whatever we'd set there.
Shillaker
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.
Nice, much cleaner. Just a small comment about checking a test.
| } | ||
| SECTION("SGX codegen") | ||
| { | ||
| conf.wasmVm = "sgx"; |
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.
Can you double check that there's a FaasmConfigTestFixture somewhere in the class hierarchy for this test? We just want to make sure that the config is reset at the end of each test.
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.
There is an S3TestFixture that resets the config 👍
In this PR I change the way we indicate that we want to run a function with SGX. Even though it is not semantically correct, the environment variable indicating what
WASM_VMwe use takes now three possible values:wavm(default),wamr, andsgx.This means that wen using the CLI we don't need to pass any extra parameters, just set the variable beforehand:
This also means that we can get rid of the references to SGX in the faabric message (faasm/faabric#229).