On Tue, Apr 20, 2021 at 11:11:54AM +0100, Daniel P. Berrangé wrote: > On Mon, Apr 19, 2021 at 07:14:13PM +0200, Pavel Hrdina wrote: > > Having the function on mock library reflect more closely what we usually > > do in tests. > > Yes & no - having it in testutilsqemu.c would make it available to all > QEMU tests, while domaincapsmock.c only makes it available from those > loading that mock. > > Using testutilsqemu.c might be simpler if we need to expand what it > mocks, as we have one place to put all the hacks. It gets confusing > if we have 2 mocks both overriding the same function. > > This isn't a NACK - just saying that I don't think the commit message > is a clear justification for the move. Guess I'd like an explanation > of why it should be restricted to just tests using domaincapsmock > vs any of those linking to testutilsqemu
I don't have any explanation why it should be restricted. My main motivation was to have it clearly separated in a mock library. The alternative I had in mind was to introduce a mock library that would be used for all tests but that is for different patch series. I'll drop this patch as it is not necessary for this series. Pavel
signature.asc
Description: PGP signature