[sheepdog] [PATCH v5] tests: add a DynamoRIO client for testing the jounaling mechanism
Liu Yuan
namei.unix at gmail.com
Tue Jul 9 12:43:12 CEST 2013
On Mon, Jul 08, 2013 at 05:16:55PM +0900, Hitoshi Mitake wrote:
> This patch adds a DynamoRIO (often called DR) client for testing the
> jounaling mechanism. Because of its nature, the recoverying path is
> the most important and hard to test part of the journaling
> mechanism. They need to be tested well.
>
> But testing targetted recovery paths with traditional tests/ stuff is
> hard because:
> 1. killing sheeps with kill commands doesn't take into account the
> internal state
> 2. inserting exit()s into sheep manually is a painful work
>
> So this patch implements a fault injection mechanism with DR. DR
> provides rich functionalities of transparent dynamic
> instrumentation. One of the functionalities makes inserting function
> calls before and after system calls possible. With this mechanism, the
> fault injection mechanism lets sheep exit at suitable timings for
> testing recovery paths of the journaling.
>
> How to use:
> 0. preparation
> $ cd
> $ svn checkout http://dynamorio.googlecode.com/svn/trunk/ dynamorio
> $ cd dynamorio
> $ mkdir build
> $ cd build
> $ cmake ..
> $ make
>
> (This patch assumes the source code of DR is store in $HOME/dynamorio,
> and the build is done in $HOME/dynamorio/build)
>
> 1. build the DR client
> $ cd tests/dynamorio/journaling/
> $ cmake .
> $ make
>
> 2. run tests with preset scenarios
> $ ./01.sh # for testing recovery of object store
> # after this, actual completion of recovery can be
> # checked via sheep.log
>
> The fault injection implemented with this patch is so slack and not
> capable for exhaustive testing. This is only a supoprted care. But I
> believe it is useful.
>
> With this patch, I tested the recovery path for object store and
> checked it work well.
>
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
> v2: DR now supports signalfd(), so we can use the DR client with
> shepherd (timerfd() is not supported yet, but its only user is the
> local cluster driver).
>
> v3: rename fi/ -> dynamorio/
>
> v4: various refactoring.
> e.g. extracting common parts from journaling.c
>
> v5: copy the definition of journal_descriptor naively
Applied, thanks
Yuan
More information about the sheepdog
mailing list