You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to run this tooling on the PVF code to check for untested or potentially unsound code. They would only work on the PVF host code (see below for discussion about workers), but it could still be good to find missing tests.
Instructions
Both of these tools choke on wasm, so to run PVF host tests we would have to:
Build the tests and have some code to write the wasm blobs to a file.
Remove the wasm dependencies like rococo-runtime, test-parachain-adder, and test-parachain-halt, or run with SKIP_WASM_BUILD=1.
Include the wasm blobs from the files using include_bytes.
Now run the tests. For coverage I have some instructions here. For miri it's cargo +nightly miri test.
Note: coverage profiling may not work for the process tests since they use rusty-fork, which does some crazy stuff to run tests in separate processes.
Note: miri may not work because FWIU process::Command is not supported. We could stub it but I believe sockets are not supported either. It's probably still worth running it until it crashes. 🤷
Considered but not done: Running on workers
This was considered because all the unsafe code is on the workers, and a strength of miri FWIU is finding undefined behavior in unsafe code.
However, miri chokes on the workers because they make some unsupported syscalls, even with isolation mode disabled.
Meanwhile, coverage for the workers would be tricky to set up and it does not seem very profitable to do so, as the workers do not have a lot of code and it's not very branchy.
The text was updated successfully, but these errors were encountered:
It would be useful to run this tooling on the PVF code to check for untested or potentially unsound code. They would only work on the PVF host code (see below for discussion about workers), but it could still be good to find missing tests.
Instructions
Both of these tools choke on wasm, so to run PVF host tests we would have to:
SKIP_WASM_BUILD=1
.include_bytes
.cargo +nightly miri test
.Note: coverage profiling may not work for the
process
tests since they use rusty-fork, which does some crazy stuff to run tests in separate processes.Note: miri may not work because FWIU
process::Command
is not supported. We could stub it but I believe sockets are not supported either. It's probably still worth running it until it crashes. 🤷Considered but not done: Running on workers
This was considered because all the unsafe code is on the workers, and a strength of miri FWIU is finding undefined behavior in unsafe code.
However, miri chokes on the workers because they make some unsupported syscalls, even with isolation mode disabled.
Meanwhile, coverage for the workers would be tricky to set up and it does not seem very profitable to do so, as the workers do not have a lot of code and it's not very branchy.
The text was updated successfully, but these errors were encountered: