[CRIU] [RFC PATCH 17/21] zdtm: add the multi-test launcher

Andrew Vagin avagin at virtuozzo.com
Thu Feb 25 13:55:11 PST 2016


On Fri, Feb 19, 2016 at 05:50:40PM +0300, Ivan Shapovalov wrote:
> This program works as a "host" to multiple test binaries, which are
> loaded into the same address space and then executed all at once.
> 
> The launcher tries to avoid using threads (to reduce probability of
> affecting the test results) and we do not alter the tests themselves.
> Instead, we hook various functions in libzdtmtst and use <ucontext.h>
> to redirect execution flow between the launcher and tests.
> 
> That is, first we run each test from start of their main() up to entry
> to test_init(), where each test is interrupted and contexts are saved.
> After all tests have been run to that point, real test_init() is
> performed "once and for all". The same method is used repeatedly for all
> phases of tests' execution.
> 
> The only case when we use threads is when some of tests want to run a
> busy loop during C/R. In this case we spawn a thread (using clone(), not
> pthreads) for each such test. After C/R we join all threads and do
> verification in the usual sequential mode.

In the privious message I forgot to write the main comment;):

Thanks for this work. It's a good start!



More information about the CRIU mailing list