-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Conversation
347b607
to
b253a4c
Compare
It seems like each one of these unit tests redundantly tests a laundry list of things in order to look similar to the other "chain" unit tests we have. By this, I mean that each test:
Is there an achievable test rigging that only instantiates minimal parts of the webassembly execution core and validates that the provided actions either throw as expected or complete successfully without the extra framing of the blockchain? I'm going to assume no but, I'd like to accumulate the reasons why that is the case somewhere and start plotting a course to de-coupling the systems that are preventing it. For now, I'm at least aware that there is a tight coupling of
|
That is exactly the reason, we use |
The direction I'm going in my head is to decouple (at compile time hopefully) the available imports to the linking phase of wasm from the controller so that tests can instantiate a wasm context with a mock intrinsic layer (as we do in the native tester in the CDT). I'm sure there are other touch points during the validation and injection phases that would need to be mockable too so that tests have very fine control over what is offered to the backends and what the tests' expectations are. Is this in the realm of feasible or am I talking moon-talk? |
It wouldn't take much effort to drive these tests just from |
For this instance, mocking intrinsics is probably not a goal in itself. Separating from @larryk85 's comment it does sound like we are getting some level of feedback from |
Also note, this is outside of a review on this PR because any effort to de-couple this and make our testing thinner and yet more effective would be an additional effort in the future. |
b253a4c
to
263ebd4
Compare
Closing in favor of #7955 |
Change Description
Adds the WASM spec tests WASM and C++ files.
Consensus Changes
API Changes
Documentation Additions