[sheepdog] [PATCH v4 1/2] sheep: move journal_descriptor from journal.c to internal_proto.h

Kai Zhang kyle at zelin.io
Mon Jul 8 09:40:27 CEST 2013


On Jul 8, 2013, at 3:36 PM, MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> wrote:

> At Mon, 08 Jul 2013 15:37:37 +0900,
> Hitoshi Mitake wrote:
>> 
>> At Mon, 8 Jul 2013 14:32:58 +0800,
>> Liu Yuan wrote:
>>> 
>>> On Fri, Jul 05, 2013 at 12:06:47PM +0900, Hitoshi Mitake wrote:
>>>> The definition of struct journal_descriptor has to be shared by
>>>> DynamoRIO based fault injector because the test interprets internal
>>>> data structs and injects faults at critical timings.
>>> 
>>> does this mean if we want to test other modules like object cache, we need to
>>> move headers private to cache out too?
>> 
>> If a fault injector needs to interpret the data structures, yes.
> 
> On the second thought, exposing private structures looks a bad idea.
> There is no clean approach for accessing the private stucture from the
> test codes, and redefining the same structure in tests/dynamorio is
> fine to me.
> 

Can we just include 'journal.c' in the test file?
I agree that we should not expose private structures.

Thanks,
Kyle




More information about the sheepdog mailing list