[RFC 0/4] meson: Enable -Wundef
by Andrea Bolognani
A few days ago I have posted a patch[1] that addresses an issue
introduced when a meson check was dropped but some uses of the
corresponding WITH_ macro were not removed at the same time.
That got me thinking about what we can do to prevent such scenarios
from happening again in the future. I have come up with something
that I think would be effective, but since applying the approach
throughout the entire codebase would require a non-trivial amount of
work, I figured I'd ask for feedback before embarking on it.
The idea is that there are two types of macros we can use for
conditional compilation: external ones, coming from the OS or other
libraries, and internal ones, which are the result of meson tests.
The external ones (e.g. SIOCSIFFLAGS, __APPLE__) are usually only
defined if they apply, so it is correct to check for their presence
with #ifdef. Using #if will also work, as undefined macros evaluate
to zero, but it's not good practice to use them that way. If -Wundef
has been passed to the compiler, those incorrect uses will be
reported (only on platforms where they are not defined, of course).
The internal ones (e.g. WITH_QEMU, WITH_STRUCT_IFREQ) are similar,
but in this case we control their definition. This means that using
means that the feature is not available on the machine we're building
on, but it could also mean that we've removed the meson check and
forgot to update all users of the macro. In this case, -Wundef would
work 100% reliably to detect the issue: if the meson check doesn't
exist, neither will the macro, regardless of what platform we're
building on.
So the approach I'm suggesting is to use a syntax-check rule to
ensure that internal macros are only ever checked with #if instead of
Of course this requires a full sweep to fix all cases in which we're
not already doing things according to the proposal. Should be fairly
easy, if annoying. A couple of examples are included here for
demonstration purposes.
The bigger impact is going to be on the build system. Right now we
generally only define WITH_ macros if the check passed, but that will
have to change and the result is going to be quite a bit of
additional meson code I'm afraid.
Thoughts?
[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/S...
Andrea Bolognani (4):
configmake: Check for WIN32 correctly
meson: Always define WITH_*_DECL macros
syntax-check: Ensure WITH_ macros are used correctly
meson: Enable -Wundef
build-aux/syntax-check.mk | 5 +++++
configmake.h.in | 2 +-
meson.build | 3 +++
tests/virmockstathelpers.c | 28 ++++++++++++++--------------
4 files changed, 23 insertions(+), 15 deletions(-)
--
2.43.2
10 months
[PATCH] NEWS: Document my contributions for upcoming release
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
NEWS.rst | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index def5a5edd0..5e3a29eed6 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -43,6 +43,13 @@ v10.1.0 (unreleased)
to resolve names of the connected guests using the name server started
for this network.
+ * qemu: Introduce dynamicMemslots attribute for virtio-mem
+
+ QEMU now allows setting ``.dynamic-memslots`` attribute for virtio-mem-pci
+ devices. When turned on, it allows memory exposed to guest to be split into
+ multiple memory slots and thus smaller memory footprint (see the original
+ commit for detailed explanation).
+
* **Improvements**
* nodedev: Add ability to update persistent mediated devices by defining them
@@ -50,6 +57,15 @@ v10.1.0 (unreleased)
Existing persistent mediated devices can now also be updated by
``virNodeDeviceDefineXML()`` as long as parent and UUID remain unchanged.
+ * ch: Enable ``ethernet`` interface mode support
+
+ The ``<interface type="ethernet"/>`` can now be used for CH domains.
+
+ * viraccessdriverpolkit: Add missing vtpm case
+
+ Secrets with ``<usage type='vtpm'>`` were left unable to be checked for in
+ the access driver, i.e. in ACL rules. Missing code was provided.
+
* **Bug fixes**
* qemu_process: Skip over non-virtio non-TAP NIC models when refreshing rx-filter
@@ -61,6 +77,32 @@ v10.1.0 (unreleased)
change ``trustGuestRxFilters`` value on live domains via
``virDomainUpdateDeviceFlags()`` or ``virsh device-update``).
+ * domain: Fix check for overlapping ``<memory/>`` devices
+
+ A bug was identified which caused libvirt to report two NVDIMMs as
+ overlapping even though they weren't. This now fixed.
+
+ * vmx: Accept empty fileName for cdrom-image
+
+ Turns out, ``fileName`` attribute (which contains path to CDROM image) can
+ be set to an empty string (``""``) to denote a state in which the CDROM has
+ no medium in it. Libvirt used to reject such configuration file, but not
+ anymore.
+
+ * qemu_hotplug: Don't lose 'created' flag in qemuDomainChangeNet()
+
+ When starting a domain, libvirt tracks what resources it created for it and
+ which were pre-existing and uses this information to preserve pre-existing
+ resources when cleaning up after the said domain is shut off. But for
+ macvtaps this information was lost after the macvtap device was changed
+ (e.g. via ``virsh update-device``).
+
+ * Fix virStream hole handling
+
+ When a client sent multiple holes into a virStream it may have caused
+ daemon hangup as the daemon stopped processing RPC from the client
+ temporarily. This is now fixed.
+
v10.0.0 (2024-01-15)
====================
--
2.43.0
10 months
[PATCH v5 00/12] nodedev state and update
by Boris Fiuczynski
The series adds a dual state to the mdev node devices as these objects
can be active and defined at the same time. These two states can
become different. To be able to also introspect the persistent and
transient nodedevs filtering is added. To be able to also dump the XML
of an inactive state while the node device is active a new option is
added.
The last four patches add the capability to update a mdev node device.
This can be done on the persistent configuration, on the active
configuration or on both. To support this v1.3.0 of mdevctl is required.
nodeDeviceDefineXML() does now support modifying a persistent configuration.
Changes since v4:
* reworked findPersistentMdevNodeDevice()
* changed the way the split into the modify path and the cleanup/unlocking is
done in nodeDeviceDefineXML()
Changes since v3:
* replaced in all patches occurrences of persisted with persistent
Changes since v2:
* made error messages in virNodeDeviceObjUpdateModificationImpact() device
type agnostic
* renamed virNodeDeviceUpdateXML* into virNodeDeviceUpdate*
* renamed nodeDeviceDefCompareMdevs() into nodeDeviceDefValidateUpdate()
* renamed multiple local variable names
* removed method for config cloning by commenting cross config compare in
nodeDeviceDefValidateUpdate()
* changed nodeDeviceDefineXML() to modify an existing persistent configuration
Changes since v1:
* replaced spec file requirement for v1.3.0 of mdevctl by a dynamic
support check and an unsupported message if not available
* renamed persisted and persist into persistent
* removed persistent precheck in virsh
* addressed all other review comments made on v1
* added NEWS
Boris Fiuczynski (12):
virmdev: prepare type and attributes for dual state
node_device: refactor mdev attributes handling
node_device: remove unnecessary checks in virNodeDeviceDefFormat
nodedev: add an active config to mdev
tools: add option inactive to nodedev-dumpxml
nodedev: add persistent and transient filter on list
tools: add switches persistent and transient to nodedev-list
virsh: doc fix on nodedev-list
api: add virNodeDeviceUpdate()
nodedev: Implement virNodeDeviceUpdate
virsh: add nodedev-update
nodedev: allow modify on define of a persistent node device
NEWS.rst | 12 +
docs/drvnodedev.rst | 4 +-
docs/manpages/virsh.rst | 36 +-
include/libvirt/libvirt-nodedev.h | 31 ++
libvirt.spec.in | 1 +
src/access/viraccessperm.c | 1 +
src/access/viraccessperm.h | 6 +
src/conf/node_device_conf.c | 76 +--
src/conf/node_device_conf.h | 14 +-
src/conf/virnodedeviceobj.c | 50 ++
src/conf/virnodedeviceobj.h | 3 +
src/driver-nodedev.h | 6 +
src/libvirt-nodedev.c | 51 +-
src/libvirt_private.syms | 1 +
src/libvirt_public.syms | 5 +
src/node_device/node_device_driver.c | 474 ++++++++++++++----
src/node_device/node_device_driver.h | 17 +-
src/node_device/node_device_udev.c | 5 +-
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 17 +-
src/remote_protocol-structs | 6 +
src/test/test_driver.c | 6 +-
src/util/virmdev.h | 6 +
...60c_c60c_c60c_c60c_c60cc60cc60c_update.xml | 16 +
tests/nodedevmdevctldata/mdevctl-modify.argv | 25 +
tests/nodedevmdevctldata/mdevctl-modify.json | 4 +
tests/nodedevmdevctltest.c | 94 +++-
...v_c60cc60c_c60c_c60c_c60c_c60cc60cc60c.xml | 14 +
...d_b7f0_4fea_b468_f1da537d301b_inactive.xml | 1 +
...v_c60cc60c_c60c_c60c_c60c_c60cc60cc60c.xml | 10 +
...c_c60c_c60c_c60c_c60cc60cc60c_inactive.xml | 9 +
...9_36ea_4111_8f0a_8c9a70e21366_inactive.xml | 1 +
...9_495e_4243_ad9f_beb3f14c23d9_inactive.xml | 1 +
...4_f554_4dc1_809d_b2a01e8e48ad_inactive.xml | 8 +
...6_1ca8_49ac_b176_871d16c13076_inactive.xml | 1 +
tests/nodedevxml2xmltest.c | 59 ++-
tools/virsh-nodedev.c | 140 +++++-
37 files changed, 1057 insertions(+), 155 deletions(-)
create mode 100644 tests/nodedevmdevctldata/mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c_update.xml
create mode 100644 tests/nodedevmdevctldata/mdevctl-modify.argv
create mode 100644 tests/nodedevmdevctldata/mdevctl-modify.json
create mode 100644 tests/nodedevschemadata/mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c.xml
create mode 120000 tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b_inactive.xml
create mode 100644 tests/nodedevxml2xmlout/mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c.xml
create mode 100644 tests/nodedevxml2xmlout/mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c_inactive.xml
create mode 120000 tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366_inactive.xml
create mode 120000 tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9_inactive.xml
create mode 100644 tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad_inactive.xml
create mode 120000 tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076_inactive.xml
--
2.42.0
10 months
Entering freeze for libvirt-10.1.0
by Jiri Denemark
I have just tagged v10.1.0-rc1 in the repository and pushed signed
tarballs and source RPMs to https://download.libvirt.org/
Please give the release candidate some testing and in case you find a
serious issue which should have a fix in the upcoming release, feel
free to reply to this thread to make sure the issue is more visible.
If you have not done so yet, please update NEWS.rst to document any
significant change you made since the last release.
Thanks,
Jirka
10 months
Google Summer of Code 2024 Proposal: Enhancing libvirt's Website and Documentation
by Gowreesh Simhadri
Dear Libvirt Team,
I had a deep look at your website and believe there is significant
potential to enhance its user experience and reach.
My proposal focuses on delivering the following improvements:
Website Enhancements:
User Interface and Functionality:
•Implement user login and logout features for authorized administrators to
manage the website, specifically for posting blog content.
•Ensure responsive design across mobile, tablet, and laptop devices for
seamless user experience on any platform.
•Consider incorporating modern design elements, using neon colors
cautiously and strategically, to create a more visually engaging website.
•Integrate a statistical dashboard displaying user engagement metrics and
positive feedback to showcase the website's impact.
Documentation Improvement:
•Develop a comprehensive "How to Get Started" guide to aid new contributors
and users.
•Enhance the documentation with all necessary information, ensuring clarity
and ease of access.
•Integrate a dedicated "Documentation" tab within the website for easy
access to all relevant information.
Accessibility Features:
•Implement multi-language support for the website, including French,
Spanish, German, and other relevant languages to expand its reach and
inclusivity.
•Integrate search functionality within both the website and documentation
for efficient information retrieval.
•Explore the feasibility of incorporating animated code snippets within
blog posts for interactive learning and engagement.
Additional Support:
•I am also interested contributing to future website updates and
enhancements as needed beyond the scope of this proposal.
I am proficient in HTML, CSS, JavaScript, Node js, Sql, MongoDB, React and
also I've done projects and Open Source work and possess a strong
understanding of user-centered design principles. I am confident that my
skills and dedication will allow me to deliver impactful contributions to
your project.
I understand the importance of aligning my proposal with your
organization's specific needs and priorities. Therefore, I would be
grateful for the opportunity to discuss my proposal further and explore how
it can best benefit your organization. I am available for a call or email
at your convenience.
Thank you for your time and consideration.
Sincerely,
Gowreesh
PS:
My project idea isn't listed in the given project ideas for 2024.
So, I would like to propose the above idea.
Please let me know your opinion.
Thanks
10 months
[PATCH] meson: Skip detection of sched_* functionality on Hurd
by Andrea Bolognani
We use the presence of sched_setscheduler() and cpu_set_t as
witnesses for whether we can set process affinity and the
like.
This entire class of functionality is missing on Hurd, but
unfortunately it still gets advertised, so the end result is
that a number of warnings are produced during build:
sched_get_priority_max is not implemented and will always fail
sched_get_priority_min is not implemented and will always fail
sched_getaffinity is not implemented and will always fail
sched_setaffinity is not implemented and will always fail
Don't even attempt to detect the known-broken APIs, so that
we don't get compiler warnings and can report the missing
functionality correctly at runtime if attempts to use it are
made.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
meson.build | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 7845f60ff7..eef00ee32a 100644
--- a/meson.build
+++ b/meson.build
@@ -584,13 +584,19 @@ functions = [
'posix_fallocate',
'posix_memalign',
'prlimit',
- 'sched_setscheduler',
'setgroups',
'setrlimit',
'symlink',
'sysctlbyname',
]
+# sched_* APIs are know to be broken on Hurd
+if host_machine.system() != 'gnu'
+ functions += [
+ 'sched_setscheduler',
+ ]
+endif
+
stat_functions = [
'__lxstat',
'__lxstat64',
@@ -669,8 +675,6 @@ symbols = [
# Check for BSD approach for setting MAC addr
[ 'net/if_dl.h', 'link_addr', '#include <sys/types.h>\n#include <sys/socket.h>' ],
-
- [ 'sched.h', 'cpu_set_t' ],
]
if host_machine.system() == 'linux'
@@ -680,6 +684,13 @@ if host_machine.system() == 'linux'
]
endif
+# sched_* APIs are know to be broken on Hurd
+if host_machine.system() != 'gnu'
+ symbols += [
+ [ 'sched.h', 'cpu_set_t' ],
+ ]
+endif
+
foreach symbol : symbols
if cc.has_header_symbol(symbol[0], symbol[1], args: '-D_GNU_SOURCE', prefix: symbol.get(2, ''))
conf.set('WITH_DECL_@0@'.format(symbol[1].to_upper()), 1)
--
2.43.2
10 months
[PATCH] ci: regenerate
by Michal Privoznik
Regenerate the ci files using the latest libvirt-ci:
commit face9746f9729699ae8525ffac4ee19be82c1ba5
ci: drop update-alternatives for opensuse tumbleweed
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
To see this in action:
https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/1192081842
Now we're stuck with broken wireshark. I was hoping that the CI job
would update to wireshark-4.2.2-3 which: a) should fix the header file
problem, and b) was moved to stable repo this morning (according to
bodhi). But apparently, that's not the case. Nevermind - one CI problem
less (aka bash-completiong pkg-config file).
ci/buildenv/fedora-rawhide-cross-mingw32.sh | 2 +-
ci/buildenv/fedora-rawhide-cross-mingw64.sh | 2 +-
ci/buildenv/fedora-rawhide.sh | 2 +-
ci/buildenv/opensuse-leap-15.sh | 2 +-
ci/buildenv/opensuse-tumbleweed.sh | 2 +-
ci/containers/fedora-rawhide-cross-mingw32.Dockerfile | 2 +-
ci/containers/fedora-rawhide-cross-mingw64.Dockerfile | 2 +-
ci/containers/fedora-rawhide.Dockerfile | 2 +-
ci/containers/opensuse-leap-15.Dockerfile | 2 +-
ci/containers/opensuse-tumbleweed.Dockerfile | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/ci/buildenv/fedora-rawhide-cross-mingw32.sh b/ci/buildenv/fedora-rawhide-cross-mingw32.sh
index b0fbbab488..de0f16222e 100644
--- a/ci/buildenv/fedora-rawhide-cross-mingw32.sh
+++ b/ci/buildenv/fedora-rawhide-cross-mingw32.sh
@@ -9,7 +9,7 @@ function install_buildenv() {
dnf distro-sync -y
dnf install -y \
augeas \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
codespell \
diff --git a/ci/buildenv/fedora-rawhide-cross-mingw64.sh b/ci/buildenv/fedora-rawhide-cross-mingw64.sh
index 0b54c34b19..30d2654f0e 100644
--- a/ci/buildenv/fedora-rawhide-cross-mingw64.sh
+++ b/ci/buildenv/fedora-rawhide-cross-mingw64.sh
@@ -9,7 +9,7 @@ function install_buildenv() {
dnf distro-sync -y
dnf install -y \
augeas \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
codespell \
diff --git a/ci/buildenv/fedora-rawhide.sh b/ci/buildenv/fedora-rawhide.sh
index 16cd5e02e8..399b1bae97 100644
--- a/ci/buildenv/fedora-rawhide.sh
+++ b/ci/buildenv/fedora-rawhide.sh
@@ -10,7 +10,7 @@ function install_buildenv() {
dnf install -y \
audit-libs-devel \
augeas \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
clang \
diff --git a/ci/buildenv/opensuse-leap-15.sh b/ci/buildenv/opensuse-leap-15.sh
index 87afc34053..bc7394839b 100644
--- a/ci/buildenv/opensuse-leap-15.sh
+++ b/ci/buildenv/opensuse-leap-15.sh
@@ -10,7 +10,7 @@ function install_buildenv() {
audit-devel \
augeas \
augeas-lenses \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
clang \
diff --git a/ci/buildenv/opensuse-tumbleweed.sh b/ci/buildenv/opensuse-tumbleweed.sh
index 1d39f11d58..88ccff99c6 100644
--- a/ci/buildenv/opensuse-tumbleweed.sh
+++ b/ci/buildenv/opensuse-tumbleweed.sh
@@ -10,7 +10,7 @@ function install_buildenv() {
audit-devel \
augeas \
augeas-lenses \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
clang \
diff --git a/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile b/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile
index 53935a91d4..3c6653affd 100644
--- a/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile
+++ b/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile
@@ -20,7 +20,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf distro-sync -y && \
nosync dnf install -y \
augeas \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
codespell \
diff --git a/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile b/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile
index 07e1dfac40..c668d9dcae 100644
--- a/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile
+++ b/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile
@@ -20,7 +20,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf distro-sync -y && \
nosync dnf install -y \
augeas \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
codespell \
diff --git a/ci/containers/fedora-rawhide.Dockerfile b/ci/containers/fedora-rawhide.Dockerfile
index 928b3b11de..232d76b95a 100644
--- a/ci/containers/fedora-rawhide.Dockerfile
+++ b/ci/containers/fedora-rawhide.Dockerfile
@@ -21,7 +21,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf install -y \
audit-libs-devel \
augeas \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
clang \
diff --git a/ci/containers/opensuse-leap-15.Dockerfile b/ci/containers/opensuse-leap-15.Dockerfile
index 0e6b5b5ee0..6deaea0904 100644
--- a/ci/containers/opensuse-leap-15.Dockerfile
+++ b/ci/containers/opensuse-leap-15.Dockerfile
@@ -11,7 +11,7 @@ RUN zypper update -y && \
audit-devel \
augeas \
augeas-lenses \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
clang \
diff --git a/ci/containers/opensuse-tumbleweed.Dockerfile b/ci/containers/opensuse-tumbleweed.Dockerfile
index 7f8c1e28ea..d4ebcd7176 100644
--- a/ci/containers/opensuse-tumbleweed.Dockerfile
+++ b/ci/containers/opensuse-tumbleweed.Dockerfile
@@ -11,7 +11,7 @@ RUN zypper dist-upgrade -y && \
audit-devel \
augeas \
augeas-lenses \
- bash-completion \
+ bash-completion-devel \
ca-certificates \
ccache \
clang \
--
2.43.0
10 months
[PATCH] nodedevmdevctltest: Fix two memleaks
by Michal Privoznik
There are two memleaks inside of nodedevmdevctltest:
1) In the testCommandDryRunCallback() - when appending lines to
stdinbuf the pointer is overwritten without freeing the old
memory it pointed to.
2) In testMdevctlModify() the livecmd variable is reused and
since its marked as g_autoptr() the first use leaks.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/nodedevmdevctltest.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c
index de688c982e..827036fa74 100644
--- a/tests/nodedevmdevctltest.c
+++ b/tests/nodedevmdevctltest.c
@@ -33,10 +33,13 @@ testCommandDryRunCallback(const char *const*args G_GNUC_UNUSED,
{
char **stdinbuf = opaque;
- if (*stdinbuf)
- *stdinbuf = g_strconcat(*stdinbuf, "\n", input, NULL);
- else
+ if (*stdinbuf) {
+ char *new = g_strconcat(*stdinbuf, "\n", input, NULL);
+ VIR_FREE(*stdinbuf);
+ *stdinbuf = g_steal_pointer(&new);
+ } else {
*stdinbuf = g_strdup(input);
+ }
}
typedef virCommand * (*MdevctlCmdFunc)(virNodeDeviceDef *, char **, char **);
@@ -188,6 +191,7 @@ testMdevctlModify(const void *data G_GNUC_UNUSED)
int ret = -1;
g_autoptr(virCommand) definedcmd = NULL;
g_autoptr(virCommand) livecmd = NULL;
+ g_autoptr(virCommand) livecmd_update = NULL;
g_autoptr(virCommand) bothcmd = NULL;
g_autofree char *errmsg = NULL;
g_autofree char *stdinbuf = NULL;
@@ -222,10 +226,10 @@ testMdevctlModify(const void *data G_GNUC_UNUSED)
&parser_callbacks, NULL, false)))
goto cleanup;
- if (!(livecmd = nodeDeviceGetMdevctlModifyCommand(def_update, false, true, &errmsg)))
+ if (!(livecmd_update = nodeDeviceGetMdevctlModifyCommand(def_update, false, true, &errmsg)))
goto cleanup;
- if (virCommandRun(livecmd, NULL) < 0)
+ if (virCommandRun(livecmd_update, NULL) < 0)
goto cleanup;
if (!(livecmd = nodeDeviceGetMdevctlModifyCommand(def, false, true, &errmsg)))
--
2.43.0
10 months
[PATCH pushed] ci: cirrus: Use --break-system-packages with 'pip install'
by Peter Krempa
Cirrus tests on macos started to fail when installing 'pytest'. Override
the pip lock.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
Pushed as CI fix:
https://gitlab.com/pipo.sk/libvirt/-/jobs/6255978961
https://gitlab.com/pipo.sk/libvirt/-/jobs/6255978962
ci/cirrus/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ci/cirrus/build.yml b/ci/cirrus/build.yml
index 60ac90eee0..0ae5c2ce64 100644
--- a/ci/cirrus/build.yml
+++ b/ci/cirrus/build.yml
@@ -18,7 +18,7 @@ build_task:
- @UPDATE_COMMAND@
- @UPGRADE_COMMAND@
- @INSTALL_COMMAND@ @PKGS@
- - if test -n "@PYPI_PKGS@" ; then @PIP3@ install @PYPI_PKGS@ ; fi
+ - if test -n "@PYPI_PKGS@" ; then @PIP3@ install --break-system-packages @PYPI_PKGS@ ; fi
clone_script:
- git clone --depth 100 "$CI_REPOSITORY_URL" .
- git fetch origin "${CI_MERGE_REQUEST_REF_PATH:-$CI_COMMIT_REF_NAME}"
--
2.43.0
10 months
[PATCH] daemon: fix wrong request count for sparse stream
by Vincent Vanlaer
Similar to when actual data is being written to the stream, it is
necessary to acknowledge handling of the client request when a hole is
encountered. This is done later in daemonStreamHandleWrite by sending a
fake zero-length reply if the status variable is set to
VIR_STREAM_CONTINUE. It seems that setting status from the message
header was missed for holes in the introduction of the sparse stream
feature.
Signed-off-by: Vincent Vanlaer <libvirt-e6954efa(a)volkihar.be>
---
src/remote/remote_daemon_stream.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/remote/remote_daemon_stream.c b/src/remote/remote_daemon_stream.c
index 1a89ff822c..453728a66b 100644
--- a/src/remote/remote_daemon_stream.c
+++ b/src/remote/remote_daemon_stream.c
@@ -747,6 +747,7 @@ daemonStreamHandleWrite(virNetServerClient *client,
* Otherwise just carry on with processing stream
* data. */
ret = daemonStreamHandleHole(client, stream, msg);
+ status = msg->header.status;
} else if (msg->header.type == VIR_NET_STREAM) {
status = msg->header.status;
switch (status) {
--
2.42.0
10 months