[sheepdog] [PATCH experimental 0/2] tests: add a fault injector based on DynamoRIO

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Mon Apr 15 07:07:42 CEST 2013


CAUTION: This patchset is an experimental thing. Please don't apply to
the master branch.

During doing testing of the journaling mechanism, I feel limitations
with traditional shell script based testings (tests/). Because they
don't care about internal states of sheeps, so the timing of killing
sheeps can't be suitable every time. In this patchset, I implement
a fault injector based on DynamoRIO for testing the recovery mechanism
of the journaling. The basic functionality of the fault injector is
inserting faults before and after system calls based on their
parameters and history of calls. With this fault injector, we can
target and test the recovery paths accurately.

The first patch is a preparation. Because of the limitation comes from
DynamoRIO, we can't use signalfd and timerfd. So this patch removes
using them in sheepdog. This limitation would be solved in DynamoRIO
side in the near future. So the first one is a completely temporal
thing.

The second one adds the fault injector. The detailed usage is written
in the commit log.

This patchset is stored in my own repository:
https://github.com/mitake/sheepdog/tree/fault-injection
I believe this fault injector is quite useful not only for testing the
journaling but also other subsystems of sheepdog if it can be
improved. So I'm posting this patchset to the list. Making a new
dedicated branch and applying this patchset to it would be helpful for
other developers and users.

Hitoshi Mitake (2):
  stop using timerfd and signalfd
  tests: add a DynamoRIO client for testing the jounaling mechanism

 collie/Makefile.am                         |    2 +-
 include/event.h                            |    2 +
 lib/event.c                                |  109 ++++++++-
 sheep/Makefile.am                          |    2 +-
 sheep/cluster/local.c                      |   35 ++-
 sheep/sheep.c                              |   35 ++-
 shepherd/Makefile.am                       |    2 +-
 tests/dr_clients/.gitignore                |    6 +
 tests/dr_clients/journal_fi/01.sh          |   21 ++
 tests/dr_clients/journal_fi/02.sh          |   20 ++
 tests/dr_clients/journal_fi/03.sh          |   20 ++
 tests/dr_clients/journal_fi/CMakeLists.txt |   10 +
 tests/dr_clients/journal_fi/journal_fi.c   |  370 ++++++++++++++++++++++++++++
 13 files changed, 598 insertions(+), 36 deletions(-)
 create mode 100644 tests/dr_clients/.gitignore
 create mode 100755 tests/dr_clients/journal_fi/01.sh
 create mode 100755 tests/dr_clients/journal_fi/02.sh
 create mode 100755 tests/dr_clients/journal_fi/03.sh
 create mode 100644 tests/dr_clients/journal_fi/CMakeLists.txt
 create mode 100644 tests/dr_clients/journal_fi/journal_fi.c

-- 
1.7.2.5




More information about the sheepdog mailing list