ejrgilbert / whamm

5 stars 2 forks source link

A better integration testing framework #53

Open ejrgilbert opened 2 weeks ago

ejrgilbert commented 2 weeks ago

We could have much better integration testing for probes. Here's an idea for the design.

Consider the probe specification wasm:bytecode:br_if:before, for a given Wasm program, the number of times this is injected and the location it was injected in bytecode are deterministic. Event the emitted code at that specific location is deterministic!

We could modify the generator/emitter to have a tracing mode that collects this information during instrumentation to enable an integration test to make assertions on the tracing data based on some trusted instrumentation execution!

I'm unsure what this would look like for making assertions on the actual code that is emitted, but since it's technically deterministic, I don't see why it would be impossible.