3 ms·
Loom is really awesome, though it is focused on exhaustive testing, so not suitable for code that has a lot of possible interleavings (e.g. due to a ton of thre
by gamegoblin 6y ago
Loom is really awesome, though it is focused on exhaustive testing, so not suitable for code that has a lot of possible interleavings (e.g. due to a ton of threads, or a large body of code).
There is a new project out of AWS called Shuttle [1] which is like Loom, but it does random exploration instead of exhaustive exploration, which enables massively distributed testing of really complicated stuff.
[1] https://github.com/awslabs/shuttle https://github.com/awslabs/shuttle
- kibwen 6y agoExcellent, thanks for the tip! I have to ask though, given a tool that does exhaustive testing (like Loom), shouldn't it be trivial to adapt it to do random testing merely by randomizing rather than enumerating the test inputs? Is there something more going on that I'm not seeing?
- wyldfire 6y agoIs there anything like Loom or Shuttle for C/C++? Or are these only implemented in rust and they'd still work with C/C++?
- kibwen 6y agoI vaguely recall that Loom is an implementation of a research paper that purported to implement this for C/C++, but I don't know if that implementation is available/production-ready. In the worst case it should be relatively straightforward to back-port Loom to C++, since Rust also uses the C memory model.
- SloopJon 6y agoThe paper is here (referenced in the Loom docs.): http://demsky.eecs.uci.edu/publications/c11modelcheck.pdf http://demsky.eecs.uci.edu/publications/c11modelcheck.pdf This page describes how to get the code (linked from the paper): http://plrg.ics.uci.edu/software_page/42-2/ http://plrg.ics.uci.edu/software_page/42-2/ I found some data races in an ODBC driver using TSan. Running it through CDSChecker is one of my round tuit projects.