[libvirt] [appdev-guide] [PATCH] fix minor bug in code example

2019-04-05 Thread Ilias Stamatis
--- en-US/Guest_Domains.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en-US/Guest_Domains.xml b/en-US/Guest_Domains.xml index c15bbb8..2a4ef7c 100644 --- a/en-US/Guest_Domains.xml +++ b/en-US/Guest_Domains.xml @@ -88,7 +88,7 @@ dom = virDomainLookupByID(conn, domainID);

Re: [libvirt] [appdev-guide] [PATCH] fix minor bug in code example

2019-04-06 Thread Ilias Stamatis
ocess and trying to get my first tiny patch accepted. Thanks. > > Jano > > On Fri, Apr 05, 2019 at 05:58:43PM +0200, Ilias Stamatis wrote: > >--- > > en-US/Guest_Domains.xml | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >diff --git a/en-US/Guest_

[libvirt] [appdev-guide] [PATCH v2] Guest Domains: fix code example

2019-04-06 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- en-US/Guest_Domains.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en-US/Guest_Domains.xml b/en-US/Guest_Domains.xml index c15bbb8..2a4ef7c 100644 --- a/en-US/Guest_Domains.xml +++ b/en-US/Guest_Domains.xml @@ -88,7 +88,7 @@ dom

[libvirt] [PATCH] test_driver: provide virDomainGetTime implementation

2019-04-07 Thread Ilias Stamatis
Implement testDomainGetTime by returning the current time. Signed-off-by: Ilias Stamatis --- I initially implemented this using clock_gettime, but Pavel suggested that this might not be a good idea since it isn't a cross-platform function. So I used virTimeMillisNow instead and set

[libvirt] [PATCH v2] test_driver: implement virDomainGetDiskErrors

2019-05-12 Thread Ilias Stamatis
Return the number of disks present in the configuration of the test domain when called with @errors as NULL and @maxerrors as 0. Otherwise report an error for every second disk, assigning available error codes in a cyclic order. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 42

[libvirt] [PATCH] test_driver: implement virDomainSendProcessSignal

2019-06-04 Thread Ilias Stamatis
ing sending SIGTERM and SIGKILL to init, the test driver domains pretend to run Linux, and on Linux init/systemd explicitly ignores these signals. Correspondingly, we can assume that no signal handlers are installed for any other signal and succeed by doing nothing. Signed-off-by: Ilias Stama

[libvirt] [PATCH] test_driver: implement virDomainGetHostname

2019-05-31 Thread Ilias Stamatis
Always return "domain_name" + "host". Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2f58a1da95..aad7bb6036 100644 --- a/src/test/tes

Re: [libvirt] [PATCH] test_driver: implement virDomainGetHostname

2019-05-31 Thread Ilias Stamatis
On Fri, May 31, 2019 at 4:31 PM Ilias Stamatis wrote: > > Always return "domain_name" + "host". > > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/

Re: [libvirt] Scope of the test driver? (Was: Re: [PATCH] test_driver: implement virDomainSendKey)

2019-06-07 Thread Ilias Stamatis
On Fri, Jun 7, 2019 at 12:25 PM Erik Skultety wrote: > > On Mon, Jun 03, 2019 at 03:51:29PM +0200, Peter Krempa wrote: > > On Mon, Jun 03, 2019 at 14:16:15 +0200, Pavel Hrdina wrote: > > > On Mon, Jun 03, 2019 at 01:48:55PM +0200, Peter Krempa wrote: > > > > [...] > > > > > > Sure we want to

[libvirt] [PATCH] test_driver: implement virNetworkGetDHCPLeases

2019-06-08 Thread Ilias Stamatis
Return infinite time DHCP leases for fixed IPV4 addresses. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 118 + 1 file changed, 118 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 1aa79ce898..b7f8f6ecf2

[libvirt] [PATCH 3/4] test_driver: implement virDomainSaveImageDefineXML

2019-05-29 Thread Ilias Stamatis
Updates the existing image stored in @path, in case @dxml contains valid XML supported by the fake host. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 28 1 file changed, 28 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c

[libvirt] [PATCH 4/4] test_driver: implement virDomainSaveImageGetXMLDesc

2019-05-29 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 24 1 file changed, 24 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index b0195ac63d..719e956d99 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2255,6 +2255,29

[libvirt] [PATCH 1/4] test_driver: extract image saving code into a separate function

2019-05-29 Thread Ilias Stamatis
Extracting the code logic for writing a test image to disk from testDomainSaveFlags into a separate function, allows us to reuse this code in other functions such as testDomainSaveImageDefineXML. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 114

[libvirt] [PATCH 2/4] test_driver: extract image loading code into a separate function

2019-05-29 Thread Ilias Stamatis
Extracting the code logic for opening and parsing a test image from testDomainRestoreFlags into a separate function, allows us to reuse this code in other functions such as testDomainSaveImageGetXMLDesc. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 115

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

2019-05-29 Thread Ilias Stamatis
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

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

2019-06-03 Thread Ilias Stamatis
On Mon, Jun 3, 2019 at 1:50 PM Pavel Hrdina wrote: > > On Mon, Jun 03, 2019 at 10:36:58AM +0200, Erik Skultety wrote: > > On Wed, May 29, 2019 at 02:22:55PM +0200, Ilias Stamatis wrote: > > > While implementing virDomainSaveImageGetXMLDesc and > > > virDomainSaveImag

Re: [libvirt] [PATCH 1/4] test_driver: extract image saving code into a separate function

2019-06-03 Thread Ilias Stamatis
On Mon, Jun 3, 2019 at 10:01 AM Erik Skultety wrote: > > On Wed, May 29, 2019 at 02:22:56PM +0200, Ilias Stamatis wrote: > > Extracting the code logic for writing a test image to disk from > > testDomainSaveFlags into a separate function, allows us to reuse this > >

[libvirt] [PATCH] virDomainSendKey: validate codeset argument

2019-06-01 Thread Ilias Stamatis
uses codeset as an index to the virKeymapValues array, causing an out-of-bounds error. Signed-off-by: Ilias Stamatis --- src/libvirt-domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index df7e405b3e..c09448927b 100644 --- a/src/libvirt

[libvirt] [PATCH] test_driver: implement virDomainSendKey

2019-06-01 Thread Ilias Stamatis
Validate @keycodes and sleep for @holdtime before successfully returning. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 40 1 file changed, 40 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2f58a1da95

Re: [libvirt] [PATCH] test_driver: implement virDomainSendProcessSignal

2019-06-13 Thread Ilias Stamatis
On Thu, Jun 13, 2019 at 10:20 AM Erik Skultety wrote: > > On Tue, Jun 04, 2019 at 03:17:43PM +0200, Ilias Stamatis wrote: > > Only succeed when @pid_value is 1, since according to the docs this is > > Why do we need to restrict ourselves for @pid 1 in the test driver? This &g

[libvirt] [PATCH] test_driver: implement virDomainGetLaunchSecurityInfo

2019-06-11 Thread Ilias Stamatis
Since this is the test driver and this is tied to AMD CPUs at the moment, we can pretend that the domain doesn't have launch security and always return 0 parameters. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src

[libvirt] [PATCH 1/2] test_driver: implement virConnectDomainXMLToNative

2019-06-10 Thread Ilias Stamatis
Since this is the test driver, we can pretend that the native hypervisor representation is the same as libvirt's domain XML. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/src/test/test_driver.c b

[libvirt] [PATCH 2/2] test_driver: implement virConnectDomainXMLFromNative

2019-06-10 Thread Ilias Stamatis
Since this is the test driver, we can pretend that the native hypervisor representation is the same as libvirt's domain XML. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/test/test_driver.c b/src

[libvirt] [PATCH] virNetworkGetDHCPLeases: fix docstring format

2019-06-18 Thread Ilias Stamatis
The docstring of virNetworkGetDHCPLeases is not correctly formatted and as a result the example code snippet appears as normal text under the "Returns:" section. This patch fixes the problem. Signed-off-by: Ilias Stamatis --- src/libvirt-netw

Re: [libvirt] [PATCH] test_driver: implement virNetworkGetDHCPLeases

2019-06-17 Thread Ilias Stamatis
On Sat, Jun 15, 2019 at 3:25 PM Michal Prívozník wrote: > > On 6/8/19 12:00 PM, Ilias Stamatis wrote: > > Return infinite time DHCP leases for fixed IPV4 addresses. > > > > Signed-off-by: Ilias Stamatis > > --- > > src/test/test_driver.c | 118

Re: [libvirt] [PATCH] test_driver: implement virDomainSendProcessSignal

2019-06-17 Thread Ilias Stamatis
On Mon, Jun 17, 2019 at 9:52 AM Erik Skultety wrote: > > On Fri, Jun 14, 2019 at 12:59:11PM +0200, Ilias Stamatis wrote: > > On Fri, Jun 14, 2019 at 10:07 AM Erik Skultety wrote: > > > > > > On Thu, Jun 13, 2019 at 02:20:22PM +0200, Ilias Stamatis wrote: > >

Re: [libvirt] [PATCH] test_driver: implement virDomainInterfaceAddresses

2019-06-17 Thread Ilias Stamatis
On Mon, Jun 17, 2019 at 11:12 AM Michal Privoznik wrote: > > On 5/22/19 10:10 PM, Ilias Stamatis wrote: > > Ignore @source in the case of the test driver and return fixed private > > IPv4 addresses for all the interfaces defined in the domain. > > > >

[libvirt] [PATCH v2] test_driver: implement virNetworkGetDHCPLeases

2019-06-24 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 141 + 1 file changed, 141 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 4b1f2724a0..180940f859 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 1/2] test_driver: use addr_offset for non-network infs too

2019-06-24 Thread Ilias Stamatis
The addr_offset can be used even for the hard-coded addresses in an attempt to always return unique ips. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index

[libvirt] [PATCH 0/2] test_driver: A couple of small changes in testDomainInterfaceAddresses

2019-06-24 Thread Ilias Stamatis
Ilias Stamatis (2): test_driver: use addr_offset for non-network infs too test_driver: use virDomainNetDefPtr instead of virDomainNetDef * src/test/test_driver.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v2] test_driver: implement virNetworkGetDHCPLeases

2019-06-24 Thread Ilias Stamatis
On Mon, Jun 24, 2019 at 9:10 PM Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 141 + > 1 file changed, 141 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver

[libvirt] [PATCH 2/2] test_driver: use virDomainNetDefPtr instead of virDomainNetDef *

2019-06-24 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d3bc6e7bce..868dadd682 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3433,7 +3433,7

[libvirt] [PATCH 0/2] test_driver: add a disk device and implement

2019-06-25 Thread Ilias Stamatis
Ilias Stamatis (2): test_driver: add a disk device in the default config test_driver: implement virDomainGetFSInfo src/test/test_driver.c | 71 ++ 1 file changed, 71 insertions(+) -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https

[libvirt] [PATCH 1/2] test_driver: add a disk device in the default config

2019-06-25 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 4b1f2724a0..1b1ff3003e 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -438,6 +438,11 @@ static const char

[libvirt] [PATCH 2/2] test_driver: implement virDomainGetFSInfo

2019-06-25 Thread Ilias Stamatis
Always return / and /boot as the mount points imitating a default Fedora installation. Use the first disk found, otherwise if no disk device of type VIR_DOMAIN_DISK_DEVICE_DISK is present, return 0 mount points. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 66

[libvirt] [PATCH] test_driver: implement virDomainGetMemoryParameters

2019-06-13 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 8ef843b203..9e8236a5b6 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

Re: [libvirt] [PATCH 3/3] test_driver: consider DHCP ranges in testDomainInterfaceAddresses

2019-06-19 Thread Ilias Stamatis
On Wed, Jun 19, 2019 at 4:19 PM Michal Privoznik wrote: > > On 6/19/19 4:04 PM, Ilias Stamatis wrote: > > On Wed, Jun 19, 2019 at 3:48 PM Michal Privoznik > > wrote: > >> > >> On 6/19/19 1:18 PM, Ilias Stamatis wrote: > >>> testDomainInter

[libvirt] [PATCH v2] test_driver: properly handle DHCP ranges and IPv6 networks in testDomainInterfaceAddresses

2019-06-19 Thread Ilias Stamatis
unique addresses *most of the time*. Additionally, properly handle IPv6 networks which were previously ignored completely. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 44 +- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/src/test

Re: [libvirt] [PATCH 0/3] test_driver: improve testDomainInterfaceAddresses

2019-06-19 Thread Ilias Stamatis
On Wed, Jun 19, 2019 at 1:18 PM Ilias Stamatis wrote: > > This patch series introduces the following improvements to the > testDomainInterfaceAddresses function: > > - if a dhcp range is defined for the network, addresses are returned > from there (instead of hard-coded a

Re: [libvirt] [PATCH 3/3] test_driver: consider DHCP ranges in testDomainInterfaceAddresses

2019-06-19 Thread Ilias Stamatis
On Wed, Jun 19, 2019 at 3:48 PM Michal Privoznik wrote: > > On 6/19/19 1:18 PM, Ilias Stamatis wrote: > > testDomainInterfaceAddresses always returns the same hard-coded > > addresses. Change the behavior such as if there is a DHCP range defined, > > addresses are

Re: [libvirt] [PATCH 3/3] test_driver: consider DHCP ranges in testDomainInterfaceAddresses

2019-06-19 Thread Ilias Stamatis
On Wed, Jun 19, 2019 at 1:19 PM Ilias Stamatis wrote: > > testDomainInterfaceAddresses always returns the same hard-coded > addresses. Change the behavior such as if there is a DHCP range defined, > addresses are returned from that pool. > > The specific address return

Re: [libvirt] [PATCH 2/3] test_driver: return addresses only for nets of type network

2019-06-19 Thread Ilias Stamatis
On Wed, Jun 19, 2019 at 3:48 PM Michal Privoznik wrote: > > On 6/19/19 1:18 PM, Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > > --- > > src/test/test_driver.c | 9 + > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > diff

[libvirt] [PATCH 3/3] test_driver: consider DHCP ranges in testDomainInterfaceAddresses

2019-06-19 Thread Ilias Stamatis
unique addresses *most of the time*. Additionally, return IPv6 addresses too when needed. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 78 +++--- 1 file changed, 73 insertions(+), 5 deletions(-) diff --git a/src/test/test_driver.c b/src/test

[libvirt] [PATCH 0/3] test_driver: improve testDomainInterfaceAddresses

2019-06-19 Thread Ilias Stamatis
is not defined IPv6 addresses will be returned instead of IPv4 - the @source argument is validated - only networks of type VIR_DOMAIN_NET_TYPE_NETWORK are considered Ilias Stamatis (3): test_driver: validate @source in testDomainInterfaceAddresses test_driver: return addresses only for nets

[libvirt] [PATCH 2/3] test_driver: return addresses only for nets of type network

2019-06-19 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 437df9cdf9..0c2cfdd2f7 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3409,10 +3409,10

[libvirt] [PATCH 1/3] test_driver: validate @source in testDomainInterfaceAddresses

2019-06-19 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 8ef843b203..437df9cdf9 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3383,7 +3383,7

[libvirt] [PATCH] test_driver: call virCheckFlags on testDomainReboot

2019-06-20 Thread Ilias Stamatis
Currently the flags argument is completely ignored, but it should be checked for any unsupported flags that might have been passed. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test

Re: [libvirt] [PATCH] test_driver: implement virDomainGetMemoryParameters

2019-06-20 Thread Ilias Stamatis
On Tue, Jun 18, 2019 at 5:19 PM Ján Tomko wrote: > > On Thu, Jun 13, 2019 at 04:06:59PM +0200, Ilias Stamatis wrote: > >Signed-off-by: Ilias Stamatis > >--- > > src/test/test_driver.c | 46 ++ > > 1 file changed, 46 inserti

[libvirt] [PATCH RFC] test_driver: check that the domain is running in testDomainGetTime

2019-06-20 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- Currently in the test driver in APIs that would normally require guest agents and similar we are just checking if the domain is active (using virDomainObjCheckActive). But a domain will be active even if stopped, so I would say that most of the time

[libvirt] [PATCH] test_driver: fix some bugs on testDomainGetDiskErrors

2019-06-20 Thread Ilias Stamatis
is used which contradicts the documentation of the API that says that disks with no errors are not reported This patch fixes all of them and additionally reports errors only for every second disk (instead of reporting errors for all disks) which was the initial intention. Signed-off-by: Ilias

Re: [libvirt] [PATCH v2] test_driver: properly handle DHCP ranges and IPv6 networks in testDomainInterfaceAddresses

2019-06-20 Thread Ilias Stamatis
On Thu, Jun 20, 2019 at 5:57 PM Michal Privoznik wrote: > > On 6/19/19 6:45 PM, Ilias Stamatis wrote: > > testDomainInterfaceAddresses always returns the same hard-coded > > addresses. Change the behavior such as if there is a DHCP range defined, > > addresses are

Re: [libvirt] [PATCH v2] test_driver: properly handle DHCP ranges and IPv6 networks in testDomainInterfaceAddresses

2019-06-21 Thread Ilias Stamatis
On Fri, Jun 21, 2019 at 10:03 AM Michal Privoznik wrote: > > On 6/20/19 7:36 PM, Ilias Stamatis wrote: > > On Thu, Jun 20, 2019 at 5:57 PM Michal Privoznik > > wrote: > >> > >> On 6/19/19 6:45 PM, Ilias Stamatis wrote: > >>> testDomainInter

[libvirt] [PATCH] test_driver: implement virConnectGetLibVersion

2019-06-10 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 1aa79ce898..dc267b6ecd 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -1453,6 +1453,14 @@ static char

Re: [libvirt] [PATCH] test_driver: implement virConnectGetLibVersion

2019-06-10 Thread Ilias Stamatis
On Mon, Jun 10, 2019 at 3:35 PM Erik Skultety wrote: > > On Mon, Jun 10, 2019 at 02:38:15PM +0200, Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > > --- > > src/test/test_driver.c | 9 + > > 1 file changed, 9 insertions(+) > > > > diff

[libvirt] [PATCH v2 1/4] test_driver: extract image saving code into a separate function

2019-06-10 Thread Ilias Stamatis
Extracting the code logic for writing a test image to disk from testDomainSaveFlags into a separate function, allows us to reuse this code in other functions such as testDomainSaveImageDefineXML. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 115

[libvirt] [PATCH v2 2/4] test_driver: extract image loading code into a separate function

2019-06-10 Thread Ilias Stamatis
Extracting the code logic for opening and parsing a test image from testDomainRestoreFlags into a separate function, allows us to reuse this code in other functions such as testDomainSaveImageGetXMLDesc. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 116

[libvirt] [PATCH v2 4/4] test_driver: implement virDomainSaveImageGetXMLDesc

2019-06-10 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 906c9d5365..ebf6f84b58 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2291,6

[libvirt] [PATCH v2 3/4] test_driver: implement virDomainSaveImageDefineXML

2019-06-10 Thread Ilias Stamatis
Updates the existing image stored in @path, in case @dxml contains valid XML supported by the fake host. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 37 + 1 file changed, 37 insertions(+) diff --git a/src/test/test_driver.c b/src/test

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

2019-06-10 Thread Ilias Stamatis
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

Re: [libvirt] [PATCH] test_driver: implement virNetworkGetDHCPLeases

2019-06-18 Thread Ilias Stamatis
On Tue, Jun 18, 2019 at 9:17 AM Michal Privoznik wrote: > > On 6/17/19 10:09 PM, Ilias Stamatis wrote: > > On Sat, Jun 15, 2019 at 3:25 PM Michal Prívozník > > wrote: > >> > >> On 6/8/19 12:00 PM, Ilias Stamatis wrote: > >>> Return in

Re: [libvirt] [PATCH] test_driver: implement virDomainGetDiskErrors

2019-05-09 Thread Ilias Stamatis
On Thu, May 9, 2019 at 4:36 PM Michal Privoznik wrote: > > On 5/7/19 10:23 PM, Ilias Stamatis wrote: > > Return the number of disks present in the configuration of the fake > > driver when called with @errors as NULL and @maxerrors as 0. > > > > Otherwise re

Re: [libvirt] [PATCH v2] test_driver: implement virDomainGetDiskErrors

2019-05-13 Thread Ilias Stamatis
On Mon, May 13, 2019 at 2:38 PM Michal Privoznik wrote: > > On 5/13/19 1:26 AM, Ilias Stamatis wrote: > > Return the number of disks present in the configuration of the test > > domain when called with @errors as NULL and @maxerrors as 0. > > > > Otherwise report

Re: [libvirt] [PATCH v2] test_driver: implement virDomainGetDiskErrors

2019-05-14 Thread Ilias Stamatis
On Tue, May 14, 2019 at 12:40 PM John Ferlan wrote: > > > > On 5/13/19 9:04 AM, Ilias Stamatis wrote: > > On Mon, May 13, 2019 at 2:38 PM Michal Privoznik > > wrote: > >> > >> On 5/13/19 1:26 AM, Ilias Stamatis wrote: > >>> Return the nu

[libvirt] [PATCH] test_driver: implement virDomainInterfaceAddresses

2019-05-22 Thread Ilias Stamatis
Ignore @source in the case of the test driver and return fixed private IPv4 addresses for all the interfaces defined in the domain. Signed-off-by: Ilias Stamatis --- The default config of the test driver has no guest interfaces defined, so this must be tested with a custom config. Maybe

[libvirt] [PATCH] test_driver: implement virDomainMemoryPeek

2019-05-23 Thread Ilias Stamatis
Begins by writing a @start byte in the first position of @buffer and then for every next byte it stores the value of its previous one incremented by one. Behaves the same for both supported flags. Signed-off-by: Ilias Stamatis --- Initially I thought about checking whether start+size exceeds

[libvirt] [PATCH v2 1/2] test_driver: implement virDomainInterfaceAddresses

2019-05-23 Thread Ilias Stamatis
Ignore @source in the case of the test driver and return fixed private IPv4 addresses for all the interfaces defined in the domain. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 66 ++ 1 file changed, 66 insertions(+) diff --git a/src/test

[libvirt] [PATCH v2 0/2] test_driver: add a guest inf and implement virDomainInterfaceAddresses

2019-05-23 Thread Ilias Stamatis
Ilias Stamatis (2): test_driver: implement virDomainInterfaceAddresses test_driver: add a guest interface in the default config src/test/test_driver.c | 73 ++ 1 file changed, 73 insertions(+) -- 2.21.0 -- libvir-list mailing list libvir-list

[libvirt] [PATCH v2 2/2] test_driver: add a guest interface in the default config

2019-05-23 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index ac3b3d1e89..b29fd12903 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -436,6 +436,13 @@ static const char

Re: [libvirt] [PATCH] test_driver: implement virDomainMemoryPeek

2019-05-24 Thread Ilias Stamatis
On Fri, May 24, 2019 at 2:39 PM Ján Tomko wrote: > > On Thu, May 23, 2019 at 01:37:01PM +0200, Ilias Stamatis wrote: > >Begins by writing a @start byte in the first position of @buffer and > >then for every next byte it stores the value of its previous one > >incremente

Re: [libvirt] [PATCH] test_driver: implement virDomainInterfaceAddresses

2019-05-23 Thread Ilias Stamatis
On Thu, May 23, 2019 at 9:46 AM Erik Skultety wrote: > > On Wed, May 22, 2019 at 10:10:34PM +0200, Ilias Stamatis wrote: > > Ignore @source in the case of the test driver and return fixed private > > IPv4 addresses for all the interfaces defined in the domain. > >

Re: [libvirt] [PATCH v2] test_driver: implement virDomainGetDiskErrors

2019-05-16 Thread Ilias Stamatis
On Thu, May 16, 2019 at 9:44 AM Michal Privoznik wrote: > > On 5/15/19 11:49 AM, Ilias Stamatis wrote: > > On Wed, May 15, 2019 at 10:14 AM Michal Privoznik > > wrote: > >> > >> On 5/14/19 5:24 PM, Ilias Stamatis wrote: > >>> On Tue, May 14

Re: [libvirt] [PATCH v2] test_driver: implement virDomainGetDiskErrors

2019-05-15 Thread Ilias Stamatis
On Wed, May 15, 2019 at 10:14 AM Michal Privoznik wrote: > > On 5/14/19 5:24 PM, Ilias Stamatis wrote: > > On Tue, May 14, 2019 at 5:04 PM Michal Privoznik > > wrote: > >> > >> On 5/14/19 12:50 PM, Ilias Stamatis wrote: > >>> On

Re: [libvirt] [PATCH v2] test_driver: implement virDomainGetDiskErrors

2019-05-14 Thread Ilias Stamatis
On Tue, May 14, 2019 at 5:04 PM Michal Privoznik wrote: > > On 5/14/19 12:50 PM, Ilias Stamatis wrote: > > On Tue, May 14, 2019 at 12:40 PM John Ferlan wrote: > >> > >> > >> > >> On 5/13/19 9:04 AM, Ilias Stamatis wrote: > >>> On

Re: [libvirt] [PATCH v2] test_driver: provide virDomainGetTime implementation

2019-04-29 Thread Ilias Stamatis
On Mon, Apr 29, 2019 at 5:13 PM Michal Privoznik wrote: > > > Unfortunately, this missed -rc0 and therefore has to go into 5.4.0. > Sorry for delayed review. I'll keep this in a private branch and push it > once the freeze is over. > > ACK > > Michal That's perfect. Just the version number in

[libvirt] [PATCH] test_driver: implement virDomainGetDiskErrors

2019-05-07 Thread Ilias Stamatis
Return the number of disks present in the configuration of the fake driver when called with @errors as NULL and @maxerrors as 0. Otherwise return 0 as the number of errors encountered. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 27 +++ 1 file changed, 27

[libvirt] [PATCH 0/2] test_driver: implement virDomainSetNumaParameters

2019-07-04 Thread Ilias Stamatis
I send these 2 patches together, since testConnectSupportsFeature needs to be implemented in order for testDomainSetNumaParameters to support string parameters. Ilias Stamatis (2): test_driver: implement virConnectSupportsFeature test_driver: implement virDomainSetNumaParameters src/test

[libvirt] [PATCH 2/2] test_driver: implement virDomainSetNumaParameters

2019-07-04 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 82 ++ 1 file changed, 82 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 74de8f13ad..fa690e2bd6 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 1/2] test_driver: implement virConnectSupportsFeature

2019-07-04 Thread Ilias Stamatis
Make the test driver only support the VIR_TYPED_PARAM_STRING flag for now. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 29 + 1 file changed, 29 insertions(+) mode change 100644 => 100755 src/test/test_driver.c diff --git a/src/test/test_driver.

[libvirt] [PATCH] test_driver: implement virDomainSetMemoryParameters

2019-07-04 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 85 ++ 1 file changed, 85 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c14603e3af..2f4f94968b 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH] test_driver: avoid using nerrors unitialized in testDomainGetDiskErrors

2019-07-04 Thread Ilias Stamatis
Right now nerrors can be used unitialized in the last for loop causing a bug. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index ce4ff1a582..2371581f51 100644

[libvirt] [PATCH] test_driver: Implement virDomainSetPerfEvents

2019-07-03 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 64 ++ 1 file changed, 64 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7c58d2c8ce..9974eba882 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

Re: [libvirt] [RFC] test_driver: Thoughts on the implementation of some FS-related APIs

2019-07-04 Thread Ilias Stamatis
On Thu, Jul 4, 2019 at 12:58 PM Pavel Hrdina wrote: > > On Wed, Jun 26, 2019 at 06:36:28PM +0200, Ilias Stamatis wrote: > > Hello, > > > > I was thinking about how to implement the following APIs in the test driver: > > -virDomainFSFreeze > > -

[libvirt] [PATCH] test_driver: sanitize user-provided array in testDomainGetDiskErrors

2019-07-04 Thread Ilias Stamatis
Zero out the user provided memory in order to avoid passing random pointers to VIR_FREE later. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7c58d2c8ce

[libvirt] [PATCH] implement virDomainSetInterfaceParameters

2019-07-06 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 97 ++ 1 file changed, 97 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7dd448bb20..fd57c8c572 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

Re: [libvirt] [PATCH] implement virDomainSetInterfaceParameters

2019-07-06 Thread Ilias Stamatis
On Sat, Jul 6, 2019 at 1:24 PM Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 97 ++ > 1 file changed, 97 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver

[libvirt] [PATCH] test_driver: implement virDomainGetInterfaceParameters

2019-06-27 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- This is almost identical to the QEMU's driver implementation. I wonder if we can somehow avoid copying that much code. src/test/test_driver.c | 100 + 1 file changed, 100 insertions(+) diff --git a/src/test

[libvirt] [RFC] test_driver: Thoughts on the implementation of some FS-related APIs

2019-06-26 Thread Ilias Stamatis
Hello, I was thinking about how to implement the following APIs in the test driver: -virDomainFSFreeze -virDomainFSThaw -virDomainFSTrim The first two are conceptually paired. They both get a mountpoints argument. The QEMU driver (which is the only driver implementing this currently) ignores

[libvirt] [PATCH 1/2] domain_conf: move DomainParseBlkioDeviceStr out of QEMU and LXC drivers

2019-07-10 Thread Ilias Stamatis
it such as the test driver. Signed-off-by: Ilias Stamatis --- src/conf/domain_conf.c | 115 +++ src/conf/domain_conf.h | 6 ++ src/libvirt_private.syms | 1 + src/lxc/lxc_driver.c | 112 +- src/qemu/qemu_driver.c | 126

[libvirt] [PATCH 2/2] domain_conf: move DomainMergeBlkioDevice out of QEMU and LXC drivers

2019-07-10 Thread Ilias Stamatis
it such as the test driver. Signed-off-by: Ilias Stamatis --- src/conf/domain_conf.c | 70 ++ src/conf/domain_conf.h | 7 src/libvirt_private.syms | 1 + src/lxc/lxc_driver.c | 72 +-- src/qemu/qemu_driver.c | 81

[libvirt] [PATCH 0/2] qemu and lxc: remove duplicate code and move some definitions to domain_conf

2019-07-10 Thread Ilias Stamatis
Ilias Stamatis (2): domain_conf: move DomainParseBlkioDeviceStr out of QEMU and LXC drivers domain_conf: move DomainMergeBlkioDevice out of QEMU and LXC drivers src/conf/domain_conf.c | 185 ++ src/conf/domain_conf.h | 13 +++ src/libvirt_private.syms

Re: [libvirt] [PATCH] test_driver: consider flags in testDomainSetMemoryFlags

2019-07-11 Thread Ilias Stamatis
On Thu, Jul 11, 2019 at 4:03 PM Eric Blake wrote: > > On 7/11/19 6:04 AM, Ilias Stamatis wrote: > > Update the current or max memory, on the persistent or live definition > > depending on the flags which are currently ignored. > > > > Signed-off-by: Ilias S

[libvirt] [PATCH] test_driver: implement virDomainSetMemoryStatsPeriod

2019-07-11 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c10344f6cd..b6394fad2b 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH] test_driver: consider flags in testDomainSetMemoryFlags

2019-07-11 Thread Ilias Stamatis
Update the current or max memory, on the persistent or live definition depending on the flags which are currently ignored. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 51 +++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/src

[libvirt] [PATCH v2 3/3] test_driver: testDomainSetMaxMemory should simply forward the call

2019-07-11 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 6b39b78a93..8aea739387 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH v2 0/3] test_driver: re-implement testDomainSetMemoryFlags

2019-07-11 Thread Ilias Stamatis
Ilias Stamatis (3): test_driver: consider flags in testDomainSetMemoryFlags test_driver: testDomainSetMemory should forward the call with VIR_DOMAIN_AFFECT_LIVE test_driver: testDomainSetMaxMemory should simply forward the call src/test/test_driver.c | 75

[libvirt] [PATCH v2 1/3] test_driver: consider flags in testDomainSetMemoryFlags

2019-07-11 Thread Ilias Stamatis
Update the current or max memory, on the persistent or live definition depending on the flags which are currently ignored. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 51 +++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/src

[libvirt] [PATCH v2 2/3] test_driver: testDomainSetMemory should forward the call with VIR_DOMAIN_AFFECT_LIVE

2019-07-11 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 90910060ed..6b39b78a93 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2532,7 +2532,7 @@ static

[libvirt] [PATCH] test_driver: implement virDomainSetUserPassword

2019-07-09 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 49d7030d21..891a398a92 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2602,6

[libvirt] [PATCH v2 1/4] test_driver: introduce TEST_SET_PARAM macro

2019-07-02 Thread Ilias Stamatis
This macro can be used by most or all of the DomainGetXXXParameters APIs. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 4b1f2724a0..c0608a4bea 100644 --- a/src/test

[libvirt] [PATCH v2 2/4] test_driver: implement virDomainGetMemoryParameters

2019-07-02 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c0608a4bea..44090a7d71 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

  1   2   3   >