[libvirt] [PATCH v2 2/3] virCommand: Introduce virCommandSetDryRun

2014-01-28 Thread Michal Privoznik
There are some units within libvirt that utilize virCommand API to run some commands and deserve own unit testing. These units are, however, not desired to be rewritten to dig virCommand API usage out. As a great example virNetDevBandwidth could be used. The problem with the bandwidth unit is: it

Re: [libvirt] [PATCH v2 2/3] virCommand: Introduce virCommandSetDryRun

2014-01-28 Thread Daniel P. Berrange
On Tue, Jan 28, 2014 at 05:08:14PM +0100, Michal Privoznik wrote: There are some units within libvirt that utilize virCommand API to run some commands and deserve own unit testing. These units are, however, not desired to be rewritten to dig virCommand API usage out. As a great example

Re: [libvirt] [PATCH v2 2/3] virCommand: Introduce virCommandSetDryRun

2014-01-28 Thread Eric Blake
On 01/28/2014 09:51 AM, Daniel P. Berrange wrote: Do we really need to write it out to a file, or would it be simpler to just pass in a virBufferPtr instead, so we just write to RAM. This avoids any tmpfile naming complexity in code using this. Ah, a virBufferPtr would be even nicer - less