[sheepdog] [PATCH v2] tests: add a DynamoRIO client for testing the jounaling mechanism

Hitoshi Mitake mitake.hitoshi at gmail.com
Mon Jul 1 09:58:48 CEST 2013


At Mon, 1 Jul 2013 15:53:22 +0800,
Liu Yuan wrote:
> 
> On Mon, Jul 01, 2013 at 03:36:03AM +0900, Hitoshi Mitake wrote:
> > From: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> > 
> > 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/fi/journaling/
> 
> what does fi stand for? It is better make it more descriptive.

This fi stands for "Fault Injection". I thought a directory name like
"fault_injection" is too long. How do you think? If you like the
longer one, I'll rename it.


> >
> >    $ 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).
> > 
> 
> Is this patch targeted for master branch? Seems that no modification to the
> sheep code now.

Yes. This patch deletes nothing from the existing code. This is ready
for applying on the master.

Thanks,
Hitoshi



More information about the sheepdog mailing list