[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

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 > > code

[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

[libvirt] [PATCH] virDomainSendKey: validate codeset argument

2019-06-01 Thread Ilias Stamatis
which 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/li

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/

[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

[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
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] 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

[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

[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] 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

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. > >

[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 it

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: 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

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

[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

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

[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

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 the

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

2019-04-24 Thread Ilias Stamatis
Implement testDomainGetTime by returning a fixed timestamp. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d5eecf4b7f..9b78c5c2ca 100644 --- a/src/test

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

2019-04-16 Thread Ilias Stamatis
Στις Τρί, 16 Απρ 2019 στις 2:00 π.μ., ο/η Cole Robinson έγραψε: > > On 4/9/19 6:16 AM, Ján Tomko wrote: > > On Mon, Apr 08, 2019 at 01:43:17AM +0200, Ilias Stamatis wrote: > >> Implement testDomainGetTime by returning the current time. > >> > >> Signed-

[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 se

[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

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

2019-04-06 Thread Ilias Stamatis
#x27;m new to the process 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

[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);

<    1   2   3