Re: [libvirt PATCH] meson: Fix yajl workaround

2022-01-09 Thread Roman Bolshakov
; $ pkg-config --print-variables yajl > > and > > $ pkg-config --variable=cflags yajl > > doesn't work either. > > Use "includedir", which is a proper pkg-config variable, > instead. > Hi Andrea, The fix helps, thanks! Reviewed-by: Roman Bolshakov

[PATCH] lib: Specify domain redefinition requirements

2021-06-30 Thread Roman Bolshakov
There might be misunderstanding [1] when libvirt permits domain redefinition and if it's a valid case at all. 1. https://github.com/ansible-collections/community.libvirt/blob/b973d7c4b405818b9fe77bbb0432c67acc12e82f/plugins/modules/virt.py#L533 Signed-off-by: Roman Bolshakov --- src/libvirt

Re: [libvirt PATCH] meson: Add yajl kludge

2021-05-18 Thread Roman Bolshakov
an, can you please test this? Thanks! :) > Thanks Andrea! It works fine :) Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov > meson.build | 35 +++ > 1 file changed, 35 insertions(+) > > diff --git a/meson.build b/meson.build > index 1f9

Re: [libvirt PATCH] tests: Only mock $INODE64 symbols on x86_64 macOS

2021-02-10 Thread Roman Bolshakov
. > > https://gitlab.com/libvirt/libvirt/-/issues/121 > > Signed-off-by: Andrea Bolognani > --- > tests/virfilewrapper.c | 2 +- > tests/virmockstathelpers.c | 4 ++-- > tests/virpcimock.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > Hi And

Re: [libvirt PATCH] Revert "tests: Avoid gnulib replacements in mocks"

2021-02-05 Thread Roman Bolshakov
; Roman, > > this seems to work fine both locally and on Cirrus CI[1], but > I'd like to have your thumbs up before pushing. > Hi, I thought about that too back in Oct/Nov. Thanks for doing the change! Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Regards, Roman > Thank

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

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

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

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

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

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

2020-11-17 Thread Roman Bolshakov
On Tue, Nov 17, 2020 at 11:01:21AM +0100, Andrea Bolognani wrote: > On Tue, 2020-11-17 at 01:34 +0300, Roman Bolshakov wrote: > > On Fri, Nov 13, 2020 at 04:58:36PM +0100, Michal Privoznik wrote: > > > On 11/8/20 10:24 PM, Roman Bolshakov wrote: > > > > + if dat

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

2020-11-16 Thread Roman Bolshakov
On Fri, Nov 13, 2020 at 04:58:36PM +0100, Michal Privoznik wrote: > On 11/8/20 10:24 PM, Roman Bolshakov wrote: > > The test takes 100+ seconds if all test suite is run with meson and 45+ > > seconds if it's run directly. According to the output of sample tool, > > most of

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

2020-11-16 Thread Roman Bolshakov
On Fri, Nov 13, 2020 at 04:58:39PM +0100, Michal Privoznik wrote: > On 11/8/20 10:24 PM, Roman Bolshakov wrote: > > Some tests in qemuxml2argvtest need opendir() from virpcimock, others > > need opendir() from virfilewrapper. > > > > But as of now, only opendir() fr

[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

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

2020-11-08 Thread Roman Bolshakov
The set of changes fixes qemuxml2argvtest and closes issue #58. Note, qemucapsprobe hasn't been fixed yet but it has no impact on the current test suite. Pipeline results: https://gitlab.com/roolebo/libvirt/-/pipelines/213377159 Roman Bolshakov (4): tests: Fix opendir mocks on macOS tests

[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 4/4] ci: Run test suite on macOS

2020-11-08 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

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

2020-11-03 Thread Roman Bolshakov
On Mon, Nov 02, 2020 at 06:12:34PM +0100, Andrea Bolognani wrote: > On Sun, 2020-11-01 at 14:38 +0300, Roman Bolshakov wrote: > > But I'm not sure if libvirt on macOS is going to > > be used from root, rather from a user account. > > So, it's just qemu:///session on macOS? Y

Re: [PATCH 1/4] security_util: Don't error on macOS when getting/setting/moving XATTRs

2020-11-03 Thread Roman Bolshakov
ame(name))) > +!(timestamp_name = virSecurityGetTimestampAttrName(name))) { > +if (errno == ENOSYS) > +return -2; > return -1; > +} > > if (virFileGetXAttrQuiet(src, ref_name, _value) < 0) { > if (errno == ENOSYS || errno == ENOTSUP) {

Re: [PATCH 4/4] qemu_conf: Don't even attempt to enable rememberOwner if unsupported

2020-11-03 Thread Roman Bolshakov
rConfigPtr virQEMUDriverConfigNew(bool > privileged, > cfg->group = (gid_t)-1; > } > cfg->dynamicOwnership = privileged; > -cfg->rememberOwner = privileged; > + > +if (privileged) > +cfg->rememberOwner = virSecurityXATTRN

Re: [PATCH 3/4] qemusecuritytest: Skip on non supported platforms

2020-11-03 Thread Roman Bolshakov
ty_manager.h" > +#include "security/security_util.h" > #include "conf/domain_conf.h" > #include "qemu/qemu_domain.h" > #include "qemu/qemu_security.h" > @@ -148,6 +149,11 @@ mymain(void) > qemuTestDriverInit() < 0) > return -1; > > +if (!virSecurityXATTRNamespaceDefined()) { > +ret = EXIT_AM_SKIP; > +goto cleanup; > +} > + > /* Now fix the secdriver */ > virObjectUnref(driver.securityManager); > > -- > 2.26.2 > Reviewed-by: Roman Bolshakov

Re: [PATCH 0/4] Couple of qemusecuritytest and security_util improvements

2020-11-03 Thread Roman Bolshakov
he series: Tested-By: Roman Bolshakov Regards, Roman

[PATCH v2 0/3] tests: Fix issues on macOS

2020-11-03 Thread Roman Bolshakov
://www.redhat.com/archives/libvir-list/2020-October/msg01345.html 3. https://www.redhat.com/archives/libvir-list/2020-October/msg01347.html Roman Bolshakov (3): virpcimock: Initialize real_close before using it virpcimock: Enable on macOS storagepoolxml2argvtest: Reorder gluster arguments tests

[PATCH v2 3/3] storagepoolxml2argvtest: Reorder gluster arguments

2020-11-03 Thread Roman Bolshakov
fault mount options for fs/netfs storage pools") Signed-off-by: Roman Bolshakov --- tests/storagepoolxml2argvdata/pool-netfs-gluster.argv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/storagepoolxml2argvdata/pool-netfs-gluster.argv b/tests/storagepoolxml2argvdata/

[PATCH v2 1/3] virpcimock: Initialize real_close before using it

2020-11-03 Thread Roman Bolshakov
real_close() is not inialized by the first invocation of close(). That causes an issue when the mock is used before others and a call of real_close() results in a jump to NULL pointer. Signed-off-by: Roman Bolshakov --- tests/virpcimock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v2 2/3] virpcimock: Enable on macOS

2020-11-03 Thread Roman Bolshakov
, qemumemlocktest and qemuxml2xmltest. Signed-off-by: Roman Bolshakov --- tests/virpcimock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 438cb7a672..5cd688c825 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -18,7 +18,7

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

2020-11-01 Thread Roman Bolshakov
On Thu, Oct 29, 2020 at 03:23:46PM +0100, Michal Privoznik wrote: > On 10/29/20 2:36 PM, Andrea Bolognani wrote: > > On Thu, 2020-10-29 at 12:18 +0100, Michal Privoznik wrote: > > > > > I'm not very familiar with security drivers but I guess the question > > is: are xattrs a critical part of the

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

2020-11-01 Thread Roman Bolshakov
On Thu, Oct 29, 2020 at 12:18:13PM +0100, Michal Privoznik wrote: > On 10/29/20 11:49 AM, Andrea Bolognani wrote: > > On Wed, 2020-10-28 at 20:25 +0100, Michal Privoznik wrote: > > > On 10/28/20 8:16 PM, Andrea Bolognani wrote: > > > > On Mon, 2020-10-26 at 00:2

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

2020-11-01 Thread Roman Bolshakov
On Wed, Oct 28, 2020 at 08:25:46PM +0100, Michal Privoznik wrote: > On 10/28/20 8:16 PM, Andrea Bolognani wrote: > > On Mon, 2020-10-26 at 00:25 +0300, Roman Bolshakov wrote: > > > There're no guidelines on what namespace should be used but it seems > > > thirdpa

Re: [PATCH] storagepoolxml2argvtest: Populate test entries for macOS

2020-10-31 Thread Roman Bolshakov
On Wed, Oct 28, 2020 at 09:52:47PM +0100, Andrea Bolognani wrote: > On Mon, 2020-10-26 at 00:54 +0300, Roman Bolshakov wrote: > > tests/storagepoolxml2argvdata/pool-fs-darwin.argv | 1 + > > tests/storagepoolxml2argvdata/pool-netfs-auto-darwin.argv |

Re: [PATCH] tests: Enable virpcimock on macOS

2020-10-31 Thread Roman Bolshakov
On Wed, Oct 28, 2020 at 08:09:51PM +0100, Andrea Bolognani wrote: > On Sun, 2020-10-25 at 17:26 +0300, Roman Bolshakov wrote: > > @@ -1123,6 +1123,8 @@ opendir(const char *path) > > int > > close(int fd) > > { > > +init_syms(); > > This hunk is compl

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

2020-10-29 Thread Roman Bolshakov
On Thu, Oct 29, 2020 at 07:28:23PM +0100, Michal Privoznik wrote: > On 10/29/20 6:56 PM, Andrea Bolognani wrote: > > On Thu, 2020-10-29 at 15:23 +0100, Michal Privoznik wrote: > > > On 10/29/20 2:36 PM, Andrea Bolognani wrote: > > > > In the former case we should modify the functions dealing with

[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

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

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

[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

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

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

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

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 >

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

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

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

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

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

  1   2   >