[libvirt] [PATCH v2 0/4] test_driver: implement virDomainSaveImageGetXMLDesc and virDomainSaveImageDefineXML

Ilias Stamatis posted 4 patches 13 weeks ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190610090501.2274-1-stamatis.iliass@gmail.com
src/test/test_driver.c | 293 ++++++++++++++++++++++++++++-------------
1 file changed, 205 insertions(+), 88 deletions(-)

[libvirt] [PATCH v2 0/4] test_driver: implement virDomainSaveImageGetXMLDesc and virDomainSaveImageDefineXML

Posted by Ilias Stamatis 13 weeks ago
Changed in v2:

* in testDomainSaveImageDefineXML check first that a saved image already
  exists before parsing the new file
* reordered the arguments of testDomainSaveImageWrite in order for its
  signature to be consistent with testDomainSaveImageOpen

While implementing virDomainSaveImageGetXMLDesc and
virDomainSaveImageDefineXML for the test driver, I realized that there
exists already code for saving and loading test images which can be
reused. However, it needed to be extracted from testDomainSaveFlags and
testDomainRestoreFlags into separate functions. The new functions are
inspired by the corresponding QEMU driver code where e.g.
qemuDomainSaveImageOpen serves as a helper used by other functions.

This series of patches initially extracts the code mentioned above into
separate functions and then provides the test driver with
implementations for virDomainSaveImageGetXMLDesc and
virDomainSaveImageDefineXML which make use of the newly introduced
functions.

Ilias Stamatis (4):
  test_driver: extract image saving code into a separate function
  test_driver: extract image loading code into a separate function
  test_driver: implement virDomainSaveImageDefineXML
  test_driver: implement virDomainSaveImageGetXMLDesc

 src/test/test_driver.c | 293 ++++++++++++++++++++++++++++-------------
 1 file changed, 205 insertions(+), 88 deletions(-)

--
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 0/4] test_driver: implement virDomainSaveImageGetXMLDesc and virDomainSaveImageDefineXML

Posted by Erik Skultety 13 weeks ago
On Mon, Jun 10, 2019 at 11:04:57AM +0200, Ilias Stamatis wrote:
> Changed in v2:
>
> * in testDomainSaveImageDefineXML check first that a saved image already
>   exists before parsing the new file
> * reordered the arguments of testDomainSaveImageWrite in order for its
>   signature to be consistent with testDomainSaveImageOpen
>
> While implementing virDomainSaveImageGetXMLDesc and
> virDomainSaveImageDefineXML for the test driver, I realized that there
> exists already code for saving and loading test images which can be
> reused. However, it needed to be extracted from testDomainSaveFlags and
> testDomainRestoreFlags into separate functions. The new functions are
> inspired by the corresponding QEMU driver code where e.g.
> qemuDomainSaveImageOpen serves as a helper used by other functions.
>
> This series of patches initially extracts the code mentioned above into
> separate functions and then provides the test driver with
> implementations for virDomainSaveImageGetXMLDesc and
> virDomainSaveImageDefineXML which make use of the newly introduced
> functions.
>
> Ilias Stamatis (4):
>   test_driver: extract image saving code into a separate function
>   test_driver: extract image loading code into a separate function
>   test_driver: implement virDomainSaveImageDefineXML
>   test_driver: implement virDomainSaveImageGetXMLDesc
>
>  src/test/test_driver.c | 293 ++++++++++++++++++++++++++++-------------
>  1 file changed, 205 insertions(+), 88 deletions(-)

Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list