[libvirt] [PATCH] util: eventpoll: Survive EBADF on macOS

2018-08-21 Thread Roman Bolshakov
fixes the issue in qemucapabilitiestest. It returns Bad file descriptor message 25 times without the fix. Signed-off-by: Roman Bolshakov --- src/util/vireventpoll.c | 8 1 file changed, 8 insertions(+) diff --git a/src/util/vireventpoll.c b/src/util/vireventpoll.c index 13d278df13

[libvirt] [PATCH] qemu: Start domain on a node without cpu affinity

2018-08-21 Thread Roman Bolshakov
vm --live --cpulist 7 error: Requested operation is not valid: cpu affinity is not supported The patch also fixes virmacmaptest on macOS Signed-off-by: Roman Bolshakov --- src/qemu/qemu_driver.c | 6 ++ src/util/virprocess.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff

Re: [libvirt] [PATCH] util: eventpoll: Survive EBADF on macOS

2018-08-22 Thread Roman Bolshakov
On Wed, Aug 22, 2018 at 10:41:18AM +0100, Daniel P. Berrangé wrote: > I don't think we should go through the dispatch code when > we get EBADF, as the contents of the 'revents' fields are > undefined after we get an error. > > We should jump straight to the end where we have > "eventLoop.running

[libvirt] [PATCH v2] util: eventpoll: Survive EBADF on macOS

2018-08-23 Thread Roman Bolshakov
fixes the issue in qemucapabilitiestest. It returns Bad file descriptor message 25 times without the fix. Signed-off-by: Roman Bolshakov --- Changes since v1: * Don't go through dispatch code on EBADF src/util/vireventpoll.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/util

[libvirt] [PATCH v2] qemu: Start domain on a node without cpu affinity

2018-08-23 Thread Roman Bolshakov
qemuProcessInitCpuAffinity prevents a VM from getting started on a platform that uses cpu affinity wrapper stubs e.g. macOS. The patch adds qemuProcessInitCpuAffinity stub on all platforms without HAVE_SCHED_GETAFFINITY or HAVE_BSD_CPU_AFFINITY. Signed-off-by: Roman Bolshakov --- Changes since

Re: [libvirt] [PATCH 00/13] Add hvf domain type for Hypervisor.framework

2018-10-22 Thread Roman Bolshakov
On Sat, Oct 20, 2018 at 05:19:45PM +0300, Roman Bolshakov wrote: > conf: Define hvf domain type > qemu: Define hvf capability > qemu: Query hvf capability on macOS > qemu: Expose hvf domain type if hvf is supported > qemu: Rename kvmCPU to accelCPU >

[libvirt] [PATCH 02/13] qemu: Define hvf capability

2018-10-20 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_capabilities.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e228f52ec0..65cf5b5c03 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src

[libvirt] [PATCH 08/13] qemu: Introduce virQEMUCapsToVirtType

2018-10-20 Thread Roman Bolshakov
virQEMUCapsGetHostCPUData is not interested in the exact type of accelarator. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCH 07/13] qemu: Introduce virQEMUCapsHaveAccel

2018-10-20 Thread Roman Bolshakov
The function should be used to check if qemu capabilities include a hardware acceleration, i.e. QEMU accel is not TCG. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b

[libvirt] [PATCH 12/13] schema: Add hvf domain type

2018-10-20 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- docs/schemas/domaincommon.rng | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 099a949cf8..2e1203f58e 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -213,6

[libvirt] [PATCH 09/13] qemu: Introduce virQEMUCapsAccelStr

2018-10-20 Thread Roman Bolshakov
This makes possible to add more accelerators by touching less code and reduces code duplication. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCH 06/13] qemu: Introduce virQEMUCapsTypeIsAccelerated

2018-10-20 Thread Roman Bolshakov
. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4dac040246..eb3148038a 100644 --- a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 10/13] qemu: Make error message accel-agnostic

2018-10-20 Thread Roman Bolshakov
With more acceleration types, KVM should be used only in error messages related to KVM. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCH 11/13] qemu: Correct CPU capabilities probing for hvf

2018-10-20 Thread Roman Bolshakov
With this change virsh domcapabilites shows: Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index cd78f936ab..497b4ef1e9

[libvirt] [PATCH 13/13] news: Mention hvf domain type

2018-10-20 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index dc08c96352..81db0c9165 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,18 @@ + + + qemu: Add hvf

[libvirt] [PATCH 01/13] conf: Define hvf domain type

2018-10-20 Thread Roman Bolshakov
QEMU supports Hypervisor.framework as hvf accel since 2.12. Signed-off-by: Roman Bolshakov --- src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 4 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf

[libvirt] [PATCH 04/13] qemu: Expose hvf domain type if hvf is supported

2018-10-20 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 8da0a8476b..b3bfe500e2 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 03/13] qemu: Query hvf capability on macOS

2018-10-20 Thread Roman Bolshakov
There's no QMP command for querying if hvf is supported, therefore we use sysctl interface that tells if Hypervisor.framwork works/available on the host. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 28 1 file changed, 28 insertions(+) diff

[libvirt] [PATCH 05/13] qemu: Rename kvmCPU to accelCPU

2018-10-20 Thread Roman Bolshakov
QEMU supports a number of accelerators. It'd be good to have more generic name for kvmCPUModels and kvmCPU. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/qemu

[libvirt] [PATCH 00/13] Add hvf domain type for Hypervisor.framework

2018-10-20 Thread Roman Bolshakov
supports Hypervisor.framework since 2.12. Roman Bolshakov (13): conf: Define hvf domain type qemu: Define hvf capability qemu: Query hvf capability on macOS qemu: Expose hvf domain type if hvf is supported qemu: Rename kvmCPU to accelCPU qemu: Introduce virQEMUCapsTypeIsAccelerated qemu

Re: [libvirt] [PATCHv2 01/16] qemu: Add KVM CPUs into cache only if KVM is present

2018-12-12 Thread Roman Bolshakov
On Fri, Nov 23, 2018 at 09:46:36PM +0300, Roman Bolshakov wrote: > On Fri, Nov 23, 2018 at 06:16:46PM +0100, Jiri Denemark wrote: > > On Fri, Nov 23, 2018 at 18:55:00 +0300, Roman Bolshakov wrote: > > > On Fri, Nov 23, 2018 at 04:30:13PM +0100, Jiri Denemark wrote: > >

Re: [libvirt] [PATCHv2 01/16] qemu: Add KVM CPUs into cache only if KVM is present

2018-11-23 Thread Roman Bolshakov
On Wed, Nov 21, 2018 at 07:43:43PM +0100, Jiri Denemark wrote: > On Wed, Nov 21, 2018 at 20:50:50 +0300, Roman Bolshakov wrote: > > On Wed, Nov 21, 2018 at 05:04:07PM +0100, Jiri Denemark wrote: > > > On Wed, Nov 21, 2018 at 17:01:44 +0300, Roman Bolshakov wrote: > > &

Re: [libvirt] [PATCHv2 07/16] qemu: Introduce virQEMUCapsTypeIsAccelerated

2018-11-23 Thread Roman Bolshakov
On Fri, Nov 23, 2018 at 03:27:50PM +0100, Pino Toscano wrote: > On Wednesday, 21 November 2018 15:01:50 CET Roman Bolshakov wrote: > > +static bool > > +virQEMUCapsTypeIsAccelerated(virDomainVirtType type) > > +{ > > +return type == VIR_DOMAIN_VIRT_KVM; > > +}

Re: [libvirt] [PATCHv2 01/16] qemu: Add KVM CPUs into cache only if KVM is present

2018-11-23 Thread Roman Bolshakov
On Fri, Nov 23, 2018 at 04:30:13PM +0100, Jiri Denemark wrote: > On Fri, Nov 23, 2018 at 17:16:12 +0300, Roman Bolshakov wrote: > > On Wed, Nov 21, 2018 at 07:43:43PM +0100, Jiri Denemark wrote: > > > virQEMUCapsInitHostCPUModel always fills in something and your check > >

Re: [libvirt] [PATCHv2 01/16] qemu: Add KVM CPUs into cache only if KVM is present

2018-11-23 Thread Roman Bolshakov
On Fri, Nov 23, 2018 at 06:16:46PM +0100, Jiri Denemark wrote: > On Fri, Nov 23, 2018 at 18:55:00 +0300, Roman Bolshakov wrote: > > On Fri, Nov 23, 2018 at 04:30:13PM +0100, Jiri Denemark wrote: > > > On Fri, Nov 23, 2018 at 17:16:12 +0300, Roman Bolshakov wrote: > > > &

Re: [libvirt] [PATCH 02/13] qemu: Define hvf capability

2018-11-19 Thread Roman Bolshakov
On Thu, Oct 25, 2018 at 09:44:01PM +0100, Daniel P. Berrangé wrote: > On Sat, Oct 20, 2018 at 05:19:47PM +0300, Roman Bolshakov wrote: > > Signed-off-by: Roman Bolshakov > > --- > > src/qemu/qemu_capabilities.c | 1 + > > src/qemu/qemu_capabilities.h | 1 + > &g

[libvirt] [PATCHv2 02/16] conf: Add hvf domain type

2018-11-21 Thread Roman Bolshakov
Extended Page Tables (EPT) and Unrestricted Mode. Signed-off-by: Roman Bolshakov --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c| 4 +++- src/conf/domain_conf.h| 1 + src/qemu/qemu_command.c | 4 5 files

[libvirt] [PATCHv2 00/16] Introduce hvf domain type for Hypevisor.framework

2018-11-21 Thread Roman Bolshakov
ooks like a separate work item. - [ ] Can't retrieve qemucapsprobe replies for macOS because qemucapsprobemock is not getting injected because of the issue with VIRT_TEST_PRELOAD - [ ] Can't add to tests/qemuxml2argvtest.c to illustrate the hvf example because qemucapsprobe doesn't work yet. Roman B

[libvirt] [PATCHv2 08/16] qemu: Introduce virQEMUCapsHaveAccel

2018-11-21 Thread Roman Bolshakov
The function should be used to check if qemu capabilities include a hardware acceleration, i.e. accel is not TCG. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src

[libvirt] [PATCHv2 13/16] news: Mention hvf domain type

2018-11-21 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4406aeb775..90e378187d 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -68,6 +68,18 @@ be viewed via the domain statistics

[libvirt] [PATCHv2 15/16] docs: Note hvf support for domain elements

2018-11-21 Thread Roman Bolshakov
Many domain elements have "QEMU and KVM only" or "QEMU/KVM since x.y.z" remarks. Most of the elements work for HVF domain, so it makes sense to add respective notices for HVF domain. All the elements have been manually tested. Signed-off-by: Roman Bolshakov --- docs/format

[libvirt] [PATCHv2 16/16] docs: Add support page for libvirt on macOS

2018-11-21 Thread Roman Bolshakov
While at it, rename OS-X on index page to macOS. Signed-off-by: Roman Bolshakov --- docs/docs.html.in | 3 + docs/index.html.in | 3 +- docs/macos.html.in | 229 + 3 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 docs

[libvirt] [PATCHv2 04/16] qemu: Query hvf capability on macOS

2018-11-21 Thread Roman Bolshakov
There's no QMP command for querying if hvf is supported, therefore we use sysctl interface that tells if Hypervisor.framwork works/available on the host. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 34 ++ 1 file changed, 34 insertions

[libvirt] [PATCHv2 06/16] qemu: Rename kvmCPU to accelCPU

2018-11-21 Thread Roman Bolshakov
QEMU supports a number of accelerators. It'd be good to have more generic name for kvmCPUModels and kvmCPU. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/qemu

[libvirt] [PATCHv2 01/16] qemu: Add KVM CPUs into cache only if KVM is present

2018-11-21 Thread Roman Bolshakov
From: Roman Bolshakov virQEMUCapsFormatCache/virQEMUCapsLoadCache adds/reads KVM CPUs to/from capabilities cache regardless of QEMU_CAPS_KVM. That can cause undesired side-effects when KVM CPUs are present in the cache on a platform that doesn't support it, e.g. macOS or Linux without KVM

[libvirt] [PATCHv2 12/16] qemu: Correct CPU capabilities probing for hvf

2018-11-21 Thread Roman Bolshakov
With this change virsh domcapabilites shows: Signed-off-by: Roman Bolshakov Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCHv2 03/16] qemu: Define hvf capability

2018-11-21 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_capabilities.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4ba8369e3a..0bbda80782 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src

[libvirt] [PATCHv2 07/16] qemu: Introduce virQEMUCapsTypeIsAccelerated

2018-11-21 Thread Roman Bolshakov
. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index ad15d2853e..e302fbb48f 100644 --- a/src/qemu/qemu_capabilities.c

[libvirt] [PATCHv2 09/16] qemu: Introduce virQEMUCapsToVirtType

2018-11-21 Thread Roman Bolshakov
virQEMUCapsGetHostCPUData is not interested in the exact type of accelarator. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCHv2 10/16] qemu: Introduce virQEMUCapsAccelStr

2018-11-21 Thread Roman Bolshakov
This makes possible to add more accelerators by touching less code and reduces code duplication. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCHv2 11/16] qemu: Make error message accel-agnostic

2018-11-21 Thread Roman Bolshakov
With more acceleration types, KVM should be used only in error messages related to KVM. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCHv2 14/16] docs: Add hvf on QEMU driver page

2018-11-21 Thread Roman Bolshakov
It's worth to make the domain type a little bit more visible than a row in news. An example of hvf domain is available on QEMU driver page. While at it, mention Hypervisor.framework on index page. Signed-off-by: Roman Bolshakov --- docs/drvqemu.html.in | 49

[libvirt] [PATCHv2 05/16] qemu: Expose hvf domain type if hvf is supported

2018-11-21 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5ebe3f1afe..645ce2c89e 100644 --- a/src/qemu/qemu_capabilities.c

Re: [libvirt] [PATCHv2 01/16] qemu: Add KVM CPUs into cache only if KVM is present

2018-11-21 Thread Roman Bolshakov
On Wed, Nov 21, 2018 at 05:04:07PM +0100, Jiri Denemark wrote: > On Wed, Nov 21, 2018 at 17:01:44 +0300, Roman Bolshakov wrote: > > From: Roman Bolshakov > > > > virQEMUCapsFormatCache/virQEMUCapsLoadCache adds/reads KVM CPUs to/from > > capabilities cache regardless

Re: [libvirt] [PATCH v2 0/3] Better syntax-check on BSD

2019-01-09 Thread Roman Bolshakov
On Thu, Jan 03, 2019 at 01:41:56PM -0600, Eric Blake wrote: > Since v1: fix the gnulib bug I accidentally introduced, then > copy the gist of Roman's gnulib changes to also apply to our > cfg.mk syntax checks. > > Eric Blake (3): > maint: update gnulib for syntax-check on BSD > maint: prefer

Re: [libvirt] [PATCH v2 0/3] Better syntax-check on BSD

2019-01-10 Thread Roman Bolshakov
On Thu, Jan 10, 2019 at 11:49:35AM +0100, Andrea Bolognani wrote: > On Thu, 2019-01-10 at 10:34 +0300, Roman Bolshakov wrote: > > I've run 'make syntax-check' on libvirt's HEAD. It succeeds on macOS. > > Perhaps we can add syntax-check to .travis.yml? > > syntax-

[libvirt] [PATCH v2] tools: console: Relax stream EOF handling

2019-08-12 Thread Roman Bolshakov
. In that case, virStreamFinish should be used to get confirmation of stream completion. virSteramAbort is used otherwise to terminate the stream early before an EOF. Fixes: 29f2b5248c6 ("tools: console: pass stream/fd errors to user") Signed-off-by: Roman Bolshakov --- Changes since v1

Re: [libvirt] Fwd: libvirtd failing on MacOS in setgroups

2019-08-21 Thread Roman Bolshakov
On Wed, Aug 21, 2019 at 05:55:51PM +0100, Daniel P. Berrangé wrote: > On Wed, Aug 21, 2019 at 12:47:03PM -0400, Marcus Furlong wrote: > > On Wed, 21 Aug 2019 at 08:23, Daniel P. Berrangé > > wrote: > > > > > > On Tue, Aug 20, 2019 at 11:11:07AM -0400, Marcus Furlong wrote: > > > > Resend to

Re: [libvirt] [PATCH v2] tools: console: Relax stream EOF handling

2019-08-20 Thread Roman Bolshakov
On Mon, Aug 12, 2019 at 07:01:47PM -0300, Daniel Henrique Barboza wrote: > The comment I have here is that you're changing virConsoleShutdown > API for all callers, with this new boolean value 'needAbort', because of a > scenario (virStreamRecv being called before) that happens only on >

Re: [libvirt] [PATCH] tools: console: Relax stream EOF handling

2019-08-26 Thread Roman Bolshakov
On Mon, Aug 26, 2019 at 07:51:18AM +, Nikolay Shirokovskiy wrote: > > > On 08.08.2019 21:00, Daniel Henrique Barboza wrote: > > (CCing Nikolay Shirokovskiy, author of  29f2b5248c ) > > > > On 8/7/19 8:34 AM, Roman Bolshakov wrote: > >> An attempt t

Re: [libvirt] [PATCH] virsh: Allow graceful console shutdown

2019-08-23 Thread Roman Bolshakov
uld be a bit more cleaner here to sign explicit abort, rather than conditional. Reviewed-by: Roman Bolshakov Thanks, Roman -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v3] tools: console: Relax stream EOF handling

2019-08-21 Thread Roman Bolshakov
("tools: console: pass stream/fd errors to user") Signed-off-by: Roman Bolshakov --- tools/virsh-console.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/virsh-console.c b/tools/virsh-console.c index e16f841e57..a235a9a283 100644 --- a/tools/virsh-conso

[libvirt] [PATCH 00/11] Fix 10 tests on macOS

2019-08-21 Thread Roman Bolshakov
-platform? Skipping them entirely is not an option IMO as I think qemu driver can be used on macOS with qemu/hvf/haxm domains and the tests are helpful for the domains. And as soon as we get working tests and qemucapsprobe I'd want to resend hvf patchset. Best regards, Roman Roman Bolshakov (11

[libvirt] [PATCH 04/11] tests: Add lib- prefix to all mocks

2019-08-21 Thread Roman Bolshakov
and allows to tailor VIR_TEST_MOCK for specific platform if it has shared library suffix different from ".so". Signed-off-by: Roman Bolshakov --- tests/Makefile.am | 194 - tests/bhyveargv2xmltest.c | 2 +- tests/bhyvexml2argvtest.c

[libvirt] [PATCH 05/11] tests: Remove -module flag for mocks

2019-08-21 Thread Roman Bolshakov
, a bundle is built if -module flag is provided to libtool. The flag has been removed to build dylibs with ".dylib" suffix. Signed-off-by: Roman Bolshakov --- tests/Makefile.am | 2 +- tests/testutils.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.

[libvirt] [PATCH 09/11] tests: Use flat namespace on macOS

2019-08-21 Thread Roman Bolshakov
other tests that rely on mocks a little bit further. Signed-off-by: Roman Bolshakov --- tests/testutils.h | 4 1 file changed, 4 insertions(+) diff --git a/tests/testutils.h b/tests/testutils.h index 7660101991..b46bc86d84 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -119,9

[libvirt] [PATCH 10/11] tests: Avoid gnulib replacements in mocks

2019-08-21 Thread Roman Bolshakov
name for the mocks. This fixes firmware lookup in domaincapstest on macOS. Signed-off-by: Roman Bolshakov --- tests/virfilewrapper.c | 5 + tests/virmockstathelpers.c | 10 ++ 2 files changed, 15 insertions(+) diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index

[libvirt] [PATCH 07/11] build: Use flat namespace for libvirt on macOS

2019-08-21 Thread Roman Bolshakov
est viriscsitest virmacmaptest virnetserverclienttest Signed-off-by: Roman Bolshakov --- configure.ac| 1 + src/Makefile.am | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index f41c6d5d86..852b464e97 100644 --- a/configure.ac ++

[libvirt] [PATCH 08/11] tests: Lookup extended stat/lstat in mocks

2019-08-21 Thread Roman Bolshakov
t stat" is laid out differently from the values returned by stat. Introduce VIR_MOCK_REAL_INIT_ALIASED that can be used to lookup stat$INODE64 and lstat$INODE64 and use it to setup real functions on macOS. Signed-off-by: Roman Bolshakov --- tests/virmock.h| 10 ++ tests/

[libvirt] [PATCH 06/11] tests: Drop /private CWD prefix in commandhelper

2019-08-21 Thread Roman Bolshakov
/tmp is a symbolic link to /private/tmp on macOS. That causes failures in commandtest, because getcwd returns /private/tmp and the expected output doesn't match to "CWD: /tmp". Rathern than making a copy of commanddata solely for macOS, the /private prefix is stripped. Signed-off

[libvirt] [PATCH 11/11] tests: Make references to global symbols indirect in test drivers

2019-08-21 Thread Roman Bolshakov
a way to interpose a mock for virQEMUCapsProbeHostCPU from qemucpumock and fixes domaincapstest on macOS. Signed-off-by: Roman Bolshakov --- tests/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index 460efb6b7b..f92710db43 100644 --- a/tests

[libvirt] [PATCH 02/11] tests: Avoid IPv4-translated IPv6 address in sockettest

2019-08-21 Thread Roman Bolshakov
is formated as :::0.0.0.0 ::fffe:0:0 is formated as ::fffe:0:0 :::0:0:0 is formated as :::0:0:0 The getnameinfo behavior causes a failure for: DO_TEST_PARSE_AND_FORMAT("::", AF_UNSPEC, true); Use non-ambigious IPv6 for parse/format testing. Signed-off-by: Roman

[libvirt] [PATCH 01/11] tests: Don't test octal localhost IP in sockettest on macOS

2019-08-21 Thread Roman Bolshakov
https://github.com/dotnet/corefx/issues/8362 Signed-off-by: Roman Bolshakov --- tests/sockettest.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/sockettest.c b/tests/sockettest.c index 859f02e51e..2b21352c13 100644 --- a/tests/sockettest.c +++ b/tests/sockettest.c @@ -465,7 +4

[libvirt] [PATCH 03/11] tests: Preload mocks with DYLD_INSERT_LIBRARIES on macOS

2019-08-21 Thread Roman Bolshakov
LD_PRELOAD has no effect on macOS. Instead, dyld(1) provides a way for symbol hooking via DYLD_INSERT_LIBRARIES. The variable should contain colon-separated paths to the dylibs to be inserted. Signed-off-by: Roman Bolshakov --- tests/testutils.h | 10 -- 1 file changed, 8 insertions

[libvirt] [PATCH] tools: console: Relax stream EOF handling

2019-08-07 Thread Roman Bolshakov
pass stream/fd errors to user") Signed-off-by: Roman Bolshakov --- tools/virsh-console.c | 4 1 file changed, 4 deletions(-) diff --git a/tools/virsh-console.c b/tools/virsh-console.c index e16f841e57..408a745b0f 100644 --- a/tools/virsh-console.c +++ b/tools/virsh-console.c @@ -172

[libvirt] [PATCH] tools: console: Use proper constructor

2019-08-05 Thread Roman Bolshakov
that fails with EINVAL. The mutex in the parent is not initialized with pthread_mutex_init and it results in silent failure of pthead_mutex_lock and the attach failure. Fixes: 98361cc3b95 ("tools: console: make console virLockableObject") Signed-off-by: Roman Bolshakov --- tools/virsh-cons

Re: [libvirt] [PATCH] tools: console: Relax stream EOF handling

2019-08-09 Thread Roman Bolshakov
On Thu, Aug 08, 2019 at 03:00:27PM -0300, Daniel Henrique Barboza wrote: > (CCing Nikolay Shirokovskiy, author of  29f2b5248c ) > > On 8/7/19 8:34 AM, Roman Bolshakov wrote: > > An attempt to poweroff a VM from inside triggers the error for existing > > session of virsh c

[libvirt] [PATCH] tests: Fix message for IP parse/format failures

2019-08-08 Thread Roman Bolshakov
: 38) Test format :: family AF_UNSPEC ... Offset 2 Expect [] Actual [0.0.255.255] Signed-off-by: Roman Bolshakov --- tests/sockettest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sockettest.c b/tests/sockettest.c index

[libvirt] sockettest failures on macOS

2019-08-08 Thread Roman Bolshakov
Hello dear list, As of now there're two test failures of sockettest on macOS: 38) Test format :: family AF_UNSPEC ... Offset 2 Expect [] Actual [0.0.255.255] ... FAILED 89)

[PATCH] wireshark: Fix missing bool_t on macOS

2020-10-07 Thread Roman Bolshakov
The header has to be explicitly added to pull definition of bool_t and a few other types. Otherwise packet-libvirt.c can't be compiled. Signed-off-by: Roman Bolshakov --- tools/wireshark/src/packet-libvirt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/wireshark/src/packet

[PATCH] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-07 Thread Roman Bolshakov
din: $ tests/commandhelper <<< test BEGIN STDOUT BEGIN STDERR test test END STDOUT END STDERR The issue is mentioned in poll(2): BUGS The poll() system call currently does not support devices. With the change all 28 cases in commandtest pass. Signed-off-by: Rom

Re: [PATCH v2] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-08 Thread Roman Bolshakov
On Thu, Oct 08, 2020 at 05:12:24PM +0200, Andrea Bolognani wrote: > > Since you seem interested in getting libvirt to work better on macOS, > you might want to take a look at > > https://gitlab.com/libvirt/libvirt/-/issues/58 > > which contains additional information about the current issues

[PATCH v2] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-08 Thread Roman Bolshakov
din: $ tests/commandhelper <<< test BEGIN STDOUT BEGIN STDERR test test END STDOUT END STDERR The issue is mentioned in poll(2): BUGS The poll() system call currently does not support devices. With the change all 28 cases in commandtest pass. Signed-off-by: Rom

Re: [PATCH] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-07 Thread Roman Bolshakov
On Wed, Oct 07, 2020 at 07:17:05PM +0200, Ján Tomko wrote: > On a Wednesday in 2020, Roman Bolshakov wrote: Hi Jano, > > *indefinitely > Thanks, I'll correct it. > > BUGS > >The poll() system call currently does not support devices. > > > > I

Re: [PATCH] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-07 Thread Roman Bolshakov
On Wed, Oct 07, 2020 at 06:57:21PM +0200, Andrea Bolognani wrote: > On Wed, 2020-10-07 at 15:20 +0300, Roman Bolshakov wrote: > > for (i = 0; i < numpollfds; i++) { > > -if (fds[i].revents & (POLLIN | POLLHUP | POLLERR)) { > > +

[PATCH 2/3] tests: Re-introduce stat/lstat mocks on macOS

2020-10-18 Thread Roman Bolshakov
Commit d6b17edd5163 ("tests: Lookup extended stat/lstat in mocks") adds support for mocking of stat() and lstat() on macOS. The change was broken because virmockstathelpers.c only follows glibc logic and MOCK_STAT and MOCK_LSTAT are not getting defined on macOS. Signed-off-by: Roman

[PATCH 0/3] Fix stat mocks on macOS

2020-10-18 Thread Roman Bolshakov
Hi, The series partially addresses https://gitlab.com/libvirt/libvirt/-/issues/58 by enabling stat mocks and that fixes qemufirmwaretest, domaincapstest and qemuvhostusertest. Thanks, Roman Roman Bolshakov (3): tests: Fix lstat() mock initialization on macOS tests: Re-introduce stat/lstat

[PATCH 1/3] tests: Fix lstat() mock initialization on macOS

2020-10-18 Thread Roman Bolshakov
There is a typo that prevents initialization of real_lstat. Fixes: d6b17edd5163 ("tests: Lookup extended stat/lstat in mocks") Signed-off-by: Roman Bolshakov --- tests/virmockstathelpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/virmockstathelpers

[PATCH 3/3] tests: Use flat namespace for qemu test driver

2020-10-18 Thread Roman Bolshakov
The change re-introduces f6d6086dbfec ("tests: Make references to global symbols indirect in test drivers") that got lost during meson conversion. Signed-off-by: Roman Bolshakov --- tests/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/meson.build b/tests/meson.b

[PATCH] tests: Enable virpcimock on macOS

2020-10-25 Thread Roman Bolshakov
is added to close() to avoid invocation of real_close() before it's set up. The change fixes qemuhotplugtest, qemumemlocktest and qemuxml2xmltest. Signed-off-by: Roman Bolshakov --- tests/virpcimock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/virpcimock.c b/tests

[PATCH] security: Use org namespace for xattrs on macOS

2020-10-25 Thread Roman Bolshakov
There're no guidelines on what namespace should be used but it seems thirdparty apps can select the one they like [1], i.e. freedekstop xattrs are prefixed with xdg. qemusecuritytest passes after that. 1. https://www.freedesktop.org/wiki/CommonExtendedAttributes/ Signed-off-by: Roman Bolshakov

[PATCH] storagepoolxml2argvtest: Populate test entries for macOS

2020-10-25 Thread Roman Bolshakov
] glusterfs has not been tested on macOS but for now we can just make tests happy by providing them with the data they expect. Likely, there'll be updates to the argv files in the future. storagepoolxml2argvtest passes after the change. Signed-off-by: Roman Bolshakov --- tests/storagepoolxml2argvdata

Re: [PATCH v2 3/6] qemuxml2argvtest: Increase timeout on macOS

2020-11-27 Thread Roman Bolshakov
On Fri, Nov 27, 2020 at 10:53:49AM +0100, Michal Prívozník wrote: > On 11/23/20 11:10 PM, Roman Bolshakov wrote: > > The test takes 40+ seconds on MBP 2012, MBA 2015. Cirrus completes the > > test within default timeout, just above 29 seconds but the error margin > > is n

Re: [PATCH for-6.0 6/6] qapi: Deprecate 'query-kvm'

2020-11-27 Thread Roman Bolshakov
On Fri, Nov 27, 2020 at 12:21:54PM +0100, Peter Krempa wrote: > On Fri, Nov 27, 2020 at 10:50:59 +, Daniel Berrange wrote: > > Copying libvir-list for the deprecation warning. > > > > > > On Mon, Nov 16, 2020 at 04:10:11PM +0300, Roman Bolshakov wrote: > > &

Re: [PATCH v2 3/6] qemuxml2argvtest: Increase timeout on macOS

2020-11-27 Thread Roman Bolshakov
On Fri, Nov 27, 2020 at 04:37:53PM +0100, Michal Prívozník wrote: > On 11/27/20 12:52 PM, Roman Bolshakov wrote: > > On Fri, Nov 27, 2020 at 10:53:49AM +0100, Michal Prívozník wrote: > > > On 11/23/20 11:10 PM, Roman Bolshakov wrote: > > > > The test takes 40+

[PATCH for-6.0] accel: Wire accel to /machine

2020-12-07 Thread Roman Bolshakov
by: Markus Armbruster Suggested-by: Paolo Bonzini Signed-off-by: Roman Bolshakov --- Hi, this is a follow up patch that deprecates earlier series [1]. An outstanding issue is whether management applications can rely on the value of /machine/accel/type and output of qom-list-types command [2]

Re: [PATCH for-6.0] accel: Wire accel to /machine

2020-12-08 Thread Roman Bolshakov
On Mon, Dec 07, 2020 at 12:38:49PM -0500, Eduardo Habkost wrote: > On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote: > > There's no generic way to query current accel and its properties via QOM > > because there's no link between an accel and current machine. >

Re: [PATCH for-6.0] accel: Wire accel to /machine

2020-12-07 Thread Roman Bolshakov
On Mon, Dec 07, 2020 at 05:44:19PM +, Daniel P. Berrangé wrote: > On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote: > > An outstanding issue is whether management applications can rely on the > > value of /machine/accel/type and output of qom-list-type

Re: [PATCH for-6.0] accel: Wire accel to /machine

2020-12-08 Thread Roman Bolshakov
On Mon, Dec 07, 2020 at 06:50:07PM +0100, Peter Krempa wrote: > On Mon, Dec 07, 2020 at 12:38:49 -0500, Eduardo Habkost wrote: > > On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote: > > > There's no generic way to query current accel and its properties via QOM >

Re: [PATCH 4/4] ci: Run test suite on macOS

2020-11-23 Thread Roman Bolshakov
On Fri, Nov 20, 2020 at 08:10:57AM +0100, Michal Privoznik wrote: > On 11/13/20 8:08 PM, Andrea Bolognani wrote: > > On Fri, 2020-11-13 at 16:58 +0100, Michal Privoznik wrote: > > > On 11/8/20 10:24 PM, Roman Bolshakov wrote: > > > > -- if test "$(uname)&quo

[PATCH v2 1/6] tests: Fix opendir mocks on macOS

2020-11-23 Thread Roman Bolshakov
opendir() mocks need to search for decorated function with $INODE64 suffix, like stat mocks. Reviewed-by: Michal Privoznik Signed-off-by: Roman Bolshakov --- tests/virfilewrapper.c | 4 tests/virpcimock.c | 4 2 files changed, 8 insertions(+) diff --git a/tests/virfilewrapper.c

[PATCH v2 0/6] Final changes to fix test suite on macOS

2020-11-23 Thread Roman Bolshakov
/-/pipelines/220225729 Roman Bolshakov (6): tests: Fix opendir mocks on macOS tests: Fix mock chaining on macOS qemuxml2argvtest: Increase timeout on macOS ci: Run test suite on macOS tests: Delay mock creation qemucapsprobemock: Fix lookup of qemu functions ci/cirrus/build.yml| 3

[PATCH v2 2/6] tests: Fix mock chaining on macOS

2020-11-23 Thread Roman Bolshakov
RTLD_NEXT handle results into libsystem_kernel.dylib being searched before main executable. Signed-off-by: Roman Bolshakov --- tests/virmock.h| 13 + tests/virpcimock.c | 1 + 2 files changed, 14 insertions(+) diff --git a/tests/virmock.h b/tests/virmock.h index dea5feb80f..5250e733a1

[PATCH v2 5/6] tests: Delay mock creation

2020-11-23 Thread Roman Bolshakov
-by: Roman Bolshakov --- tests/meson.build | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index cb06873ba5..ef8ded1ea4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -115,24 +115,6

[PATCH v2 3/6] qemuxml2argvtest: Increase timeout on macOS

2020-11-23 Thread Roman Bolshakov
arguments. Closes https://gitlab.com/libvirt/libvirt/-/issues/58 Signed-off-by: Roman Bolshakov --- tests/meson.build | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index f88410ff33..cb06873ba5 100644 --- a/tests/meson.build +

[PATCH v2 6/6] qemucapsprobemock: Fix lookup of qemu functions

2020-11-23 Thread Roman Bolshakov
there with RTLD_NEXT. Signed-off-by: Roman Bolshakov --- tests/meson.build | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index ef8ded1ea4..cc0657f3c1 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -101,7 +101,6 @@ endif

[PATCH v2 4/6] ci: Run test suite on macOS

2020-11-23 Thread Roman Bolshakov
There's no need to have different CI process between macOS and FreeBSD as test suite has been fixed on macOS. Signed-off-by: Roman Bolshakov --- ci/cirrus/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/cirrus/build.yml b/ci/cirrus/build.yml index 912284b906

[PATCH 1/4] tests: Fix opendir mocks on macOS

2020-11-08 Thread Roman Bolshakov
opendir() mocks need to search for decorated function with $INODE64 suffix, like stat mocks. Signed-off-by: Roman Bolshakov --- tests/virfilewrapper.c | 4 tests/virpcimock.c | 4 2 files changed, 8 insertions(+) diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index

[PATCH 3/4] qemuxml2argvtest: Increase timeout on macOS

2020-11-08 Thread Roman Bolshakov
lib)1258 tiny_malloc_from_free_list (in libsystem_malloc.dylib)1256 Closes https://gitlab.com/libvirt/libvirt/-/issues/58 Signed-off-by: Roman Bolshakov --- tests/meson.build | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.bu

[PATCH 2/4] tests: Fix mock chaining on macOS

2020-11-08 Thread Roman Bolshakov
RTLD_NEXT handle results into libsystem_kernel.dylib being searched before main executable. Signed-off-by: Roman Bolshakov --- tests/virmock.h| 37 +++-- tests/virpcimock.c | 1 + 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/tests/virmock.h b

  1   2   >