PSA: mtf::InProcessServer exists

Christopher James Halse Rogers chris at cooperteam.net
Thu Mar 20 23:19:55 UTC 2014


Hey all!

In conversation with Robert just now I discovered he wasn't aware of 
the existence of mtf::InProcessServer.

If you're ever writing tests which need to exercise client<->server 
communication, this should be your go-to fixture. It's got a number of 
advantages: 

1) It doesn't rely on the filesystem at all, so it can't leave 
droppings behind. This *also* means that tests using InProcessServer 
can be run in parallel, and being able to run our testsuite in parallel 
would give us a 4x-8x speedup on most peoples' machines for free.

2) It's much easier to debug tests with gdb (and, to a lesser extent, 
valgrind)

There are some tests for which InProcessServer isn't appropriate - 
tests of the filesystem-socket are an obvious example - but for most 
tests it's an improvement.

Chris




More information about the Mir-devel mailing list