[libvirt] [RFC PATCH 0/3] Implement mockup capabilities cache in QEMU tests

Pavel Fedin p.fedin at samsung.com
Fri Sep 4 06:47:07 UTC 2015


> It's just an assert.  We have those for various reasons and extra
> carefulness cannot hurt.  I don't think it needs differentiating
> between whether the code is ran in tests or not. 

 It would need differentiating because in tests we should not talk to the real filesystem, while in
real environment it's OK. So we would need some "extern bool qemuTestMode".
 Well, anyway, take a look at my new implementation, i sent it yesterday. It uses a similar global
variable, with only a 2-line change in the library code. The basic idea is to override 'binary' name
in virQEMUCapsCacheLookup(), so that we can force it to return particular capability set no matter
what def->emulator is. This very simple change actually allows us to do lots of nice things, and
improve our test suite even further by removing hardcoded capabilities at all.
 I cc'ed to you, but just in case:

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

More information about the libvir-list mailing list