[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] A 'mock' driver enabling application unit testing



On Wed, May 31, 2006 at 03:48:03AM -0400, Daniel Veillard wrote:
> On Mon, May 29, 2006 at 06:43:24PM +0100, Daniel P. Berrange wrote:
> > Aside from making it expect a URI style name, the one change I need to make
> > is change the internal storage to dynamically allocate the data structures.
> > Currently it just has a huge statically allocating struct, which wastes 32k
> > of memory even if your not using the test driver.
> 
>   Okay, but that should not require even internal API changes isn't it ?
> Another interesting extension would be to use the test driver to increase
> the existing set of regression tests, this should help the coverage of the
> common code (i.e. driver independant), and since it makes the run more or 
> less standalone, valgrind regression testing should become easier too.

Ok, I've committed this code now, with the two cleanups I mention above.
Example usage looks like:

$ virsh --connect test:///default list
 Id Name                 State
----------------------------------
  0 Domain-0             running 

$ virsh --connect test:///default dominfo 0
Id:             0
Name:           Domain-0
UUID:           00000000-0000-0000-0000-000000000000
OS Type:        linux
State:          running 
CPU(s):         2
CPU time:       1149561216.0s
Max memory:     8388608 kB
Used memory:    2097152 kB


Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]