[libvirt] [PATCH 16/21] test: replace calls to individual detach functions with one call to main detach

Peter Krempa pkrempa at redhat.com
Fri Mar 22 11:42:06 UTC 2019


On Thu, Mar 21, 2019 at 18:28:56 -0400, Laine Stump wrote:
> The individual qemuDomainDetach*Device() functions will soon be "less
> functional", since some of the code that is duplicated in 10 of the 12
> detach functions is going to be moved into the common
> qemuDomainDetachDeviceLive(), which calls them all.
> 
> qemuhotplugtest.c is the only place any of these individual functions
> is called other than qemuDomainDetachDeviceLive() itself. Fortunately,
> qemuDomainDetachDeviceLive() provides exactly the functionality needed
> by the test driver (except that it supports detach of more device
> types than the test driver has tests for).
> 
> This patch replaces the calls to
> qemuDomainDetach(Chr|Shmen|Watchdog|Disk)Device with a single call to
> the higher level function, allowing us to shift functionality between
> the lower level functions without breaking the tests.
> 
> Signed-off-by: Laine Stump <laine at laine.org>
> ---
>  src/qemu/qemu_hotplug.c | 15 ++++++++-------
>  src/qemu/qemu_hotplug.h | 16 ----------------
>  tests/qemuhotplugtest.c |  8 +-------
>  3 files changed, 9 insertions(+), 30 deletions(-)

The change makes sense, but keep the function header changes separate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190322/f93e478e/attachment-0001.sig>


More information about the libvir-list mailing list