[libvirt PATCH 0/3] qemu: Fix default CPU for old s390 machine types
by Jiri Denemark
See the last patch for detailed description and
https://bugzilla.redhat.com/show_bug.cgi?id=1795651 for a discussion
about this topic.
Jiri Denemark (3):
qemu: Pass machine type to virQEMUCapsIsCPUModeSupported
qemuxml2*test: Add default CPU tests for s390-ccw-virtio-2.7 machines
qemu_capabilities: Disable CPU models on old s390 machine types
src/qemu/qemu_capabilities.c | 29 ++++++++++++++---
src/qemu/qemu_capabilities.h | 3 +-
src/qemu/qemu_domain.c | 3 +-
src/qemu/qemu_process.c | 2 +-
...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 32 +++++++++++++++++++
.../s390-default-cpu-kvm-ccw-virtio-2.7.xml | 16 ++++++++++
...t-cpu-tcg-ccw-virtio-2.7.s390x-latest.args | 32 +++++++++++++++++++
.../s390-default-cpu-tcg-ccw-virtio-2.7.xml | 16 ++++++++++
tests/qemuxml2argvtest.c | 2 ++
...lt-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml | 24 ++++++++++++++
...lt-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml | 26 +++++++++++++++
tests/qemuxml2xmltest.c | 2 ++
12 files changed, 180 insertions(+), 7 deletions(-)
create mode 100644 tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args
create mode 100644 tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-2.7.xml
create mode 100644 tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args
create mode 100644 tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-2.7.xml
create mode 100644 tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml
--
2.25.0
4 years, 9 months
[libvirt PATCH] testutils: print a helpful summary of failed tests
by Ján Tomko
When debugging test failures in seven independent test
cases, it might be helpful to only gather the debug output
of the failing cases.
Record the indexes of the tests that fail and print them
in the VIR_TEST_RANGE of the command line that will result
in only those tests being run.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
tests/testutils.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/testutils.c b/tests/testutils.c
index 7b9a5ea05b..0cf0ac7e5c 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -54,6 +54,7 @@ static unsigned int testRegenerate = -1;
static size_t testCounter;
static virBitmapPtr testBitmap;
+static virBitmapPtr failedTests;
virArch virTestHostArch = VIR_ARCH_X86_64;
@@ -172,6 +173,9 @@ virTestRun(const char *title,
fprintf(stderr, "!");
}
+ if (ret != 0)
+ ignore_value(virBitmapSetBitExpand(failedTests, testCounter));
+
g_unsetenv("VIR_TEST_MOCK_TESTNAME");
return ret;
}
@@ -930,6 +934,9 @@ int virTestMain(int argc,
}
}
+ if (!(failedTests = virBitmapNew(1)))
+ return EXIT_FAILURE;
+
ret = (func)();
virResetLastError();
@@ -938,6 +945,11 @@ int virTestMain(int argc,
fprintf(stderr, "%*s", 40 - (int)(testCounter % 40), "");
fprintf(stderr, " %-3zu %s\n", testCounter, ret == 0 ? "OK" : "FAIL");
}
+ if (ret == EXIT_FAILURE && !virBitmapIsAllClear(failedTests)) {
+ g_autofree char *failed = virBitmapFormat(failedTests);
+ fprintf(stderr, "Some tests failed. Run them using:\n");
+ fprintf(stderr, "VIR_TEST_DEBUG=1 VIR_TEST_RANGE=%s %s\n", failed, argv[0]);
+ }
virLogReset();
return ret;
}
--
2.21.1
4 years, 9 months
[libvirt-php PATCH] libvirt-domain: Introduce libvirt_domain_reset()
by Marcus Recck
We currently have all other power-related functions implemented,
but are missing the ability to call virDomainReset from the PHP
bindings. This adds that functionality.
Signed-off-by: Marcus Recck <mrecck(a)datto.com>
---
doc/source/libvirt/entities.functions.xml | 1 +
.../functions/libvirt-domain-reboot.xml | 1 +
.../functions/libvirt-domain-reset.xml | 82 +++++++++++++++++++
.../functions/libvirt-domain-resume.xml | 1 +
.../functions/libvirt-domain-shutdown.xml | 1 +
.../functions/libvirt-domain-suspend.xml | 1 +
examples/libvirt.php | 9 ++
src/libvirt-domain.c | 24 ++++++
src/libvirt-domain.h | 2 +
9 files changed, 122 insertions(+)
create mode 100644 doc/source/libvirt/functions/libvirt-domain-reset.xml
diff --git a/doc/source/libvirt/entities.functions.xml b/doc/source/libvirt/entities.functions.xml
index 58faefa..0c1c83c 100644
--- a/doc/source/libvirt/entities.functions.xml
+++ b/doc/source/libvirt/entities.functions.xml
@@ -22,6 +22,7 @@
&reference.libvirt.functions.libvirt-domain-migrate-to-uri;
&reference.libvirt.functions.libvirt-domain-migrate;
&reference.libvirt.functions.libvirt-domain-reboot;
+&reference.libvirt.functions.libvirt-domain-reset;
&reference.libvirt.functions.libvirt-domain-resume;
&reference.libvirt.functions.libvirt-domain-shutdown;
&reference.libvirt.functions.libvirt-domain-suspend;
diff --git a/doc/source/libvirt/functions/libvirt-domain-reboot.xml b/doc/source/libvirt/functions/libvirt-domain-reboot.xml
index b2531f6..8e00ece 100644
--- a/doc/source/libvirt/functions/libvirt-domain-reboot.xml
+++ b/doc/source/libvirt/functions/libvirt-domain-reboot.xml
@@ -53,6 +53,7 @@
<member><function>libvirt_domain_shutdown</function></member>
<member><function>libvirt_domain_suspend</function></member>
<member><function>libvirt_domain_create</function></member>
+ <member><function>libvirt_domain_reset</function></member>
</simplelist>
</para>
</refsect1>
diff --git a/doc/source/libvirt/functions/libvirt-domain-reset.xml b/doc/source/libvirt/functions/libvirt-domain-reset.xml
new file mode 100644
index 0000000..51af0c1
--- /dev/null
+++ b/doc/source/libvirt/functions/libvirt-domain-reset.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: 1.28 $ -->
+
+<refentry xml:id="function.libvirt-domain-reset" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>libvirt_domain_reset</refname>
+ <refpurpose>Reset a domain</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>bool</type><methodname>libvirt_domain_reset</methodname>
+ <methodparam ><type>resource</type><parameter>domain</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Reset a domain immediately without any guest shutdown.
+ </para>
+
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>domain</parameter></term>
+ <listitem>
+ <para>
+ Domain resource of domain to reset. You can get domain resource using various functions (i.e. <function>libvirt_domain_lookup_by_uuid</function> or <function>libvirt_list_domains</function>).
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <!-- See also &return.success; -->
+ <para>
+ &true; on success and &false; on failure
+ </para>
+ </refsect1>
+
+
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>libvirt_domain_reboot</function></member>
+ <member><function>libvirt_domain_resume</function></member>
+ <member><function>libvirt_domain_suspend</function></member>
+ <member><function>libvirt_domain_create</function></member>
+ <member><function>libvirt_domain_shutdown</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"../../../../manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
diff --git a/doc/source/libvirt/functions/libvirt-domain-resume.xml b/doc/source/libvirt/functions/libvirt-domain-resume.xml
index c7d1ba4..cf6378a 100644
--- a/doc/source/libvirt/functions/libvirt-domain-resume.xml
+++ b/doc/source/libvirt/functions/libvirt-domain-resume.xml
@@ -53,6 +53,7 @@
<member><function>libvirt_domain_shutdown</function></member>
<member><function>libvirt_domain_suspend</function></member>
<member><function>libvirt_domain_create</function></member>
+ <member><function>libvirt_domain_reset</function></member>
</simplelist>
</para>
</refsect1>
diff --git a/doc/source/libvirt/functions/libvirt-domain-shutdown.xml b/doc/source/libvirt/functions/libvirt-domain-shutdown.xml
index 99d6dde..5ae430b 100644
--- a/doc/source/libvirt/functions/libvirt-domain-shutdown.xml
+++ b/doc/source/libvirt/functions/libvirt-domain-shutdown.xml
@@ -53,6 +53,7 @@
<member><function>libvirt_domain_resume</function></member>
<member><function>libvirt_domain_suspend</function></member>
<member><function>libvirt_domain_create</function></member>
+ <member><function>libvirt_domain_reset</function></member>
</simplelist>
</para>
</refsect1>
diff --git a/doc/source/libvirt/functions/libvirt-domain-suspend.xml b/doc/source/libvirt/functions/libvirt-domain-suspend.xml
index 6787c7e..6627a5e 100644
--- a/doc/source/libvirt/functions/libvirt-domain-suspend.xml
+++ b/doc/source/libvirt/functions/libvirt-domain-suspend.xml
@@ -53,6 +53,7 @@
<member><function>libvirt_domain_resume</function></member>
<member><function>libvirt_domain_shutdown</function></member>
<member><function>libvirt_domain_create</function></member>
+ <member><function>libvirt_domain_reset</function></member>
</simplelist>
</para>
</refsect1>
diff --git a/examples/libvirt.php b/examples/libvirt.php
index 8e56327..1b1c9d0 100644
--- a/examples/libvirt.php
+++ b/examples/libvirt.php
@@ -873,6 +873,15 @@ class Libvirt {
return ($tmp) ? $tmp : $this->_set_last_error();
}
+ function domain_reset($domain) {
+ $dom = $this->get_domain_object($domain);
+ if (!$dom)
+ return false;
+
+ $tmp = libvirt_domain_reset($dom);
+ return ($tmp) ? $tmp: $this->_set_last_error();
+ }
+
function domain_suspend($domain) {
$dom = $this->get_domain_object($domain);
if (!$dom)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 701aab3..9a7f28c 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -1496,6 +1496,30 @@ PHP_FUNCTION(libvirt_domain_reboot)
RETURN_TRUE;
}
+/*
+ * Function name: libvirt_domain_reset
+ * Since version: 0.5.5
+ * Description: Function is used to reset the domain identified by its resource
+ * Arguments: @res [resource]: libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ @flags [int]: optional flags
+ * Returns: TRUE for success, FALSE on error
+ */
+PHP_FUNCTION(libvirt_domain_reset)
+{
+ php_libvirt_domain *domain = NULL;
+ zval *zdomain;
+ int retval;
+ zend_long flags = 0;
+
+ GET_DOMAIN_FROM_ARGS("r|l", &zdomain, &flags);
+
+ retval = virDomainReset(domain->domain, flags);
+ DPRINTF("%s: virDomainReset(%p) returned %d\n", PHPFUNC, domain->domain, retval);
+ if (retval != 0)
+ RETURN_FALSE;
+ RETURN_TRUE;
+}
+
/*
* Function name: libvirt_domain_define_xml
* Since version: 0.4.1(-1)
diff --git a/src/libvirt-domain.h b/src/libvirt-domain.h
index f15237f..8b80c9c 100644
--- a/src/libvirt-domain.h
+++ b/src/libvirt-domain.h
@@ -74,6 +74,7 @@
PHP_FE(libvirt_domain_managedsave, arginfo_libvirt_conn) \
PHP_FE(libvirt_domain_undefine, arginfo_libvirt_conn) \
PHP_FE(libvirt_domain_reboot, arginfo_libvirt_conn_flags) \
+ PHP_FE(libvirt_domain_reset, arginfo_libvirt_conn_flags) \
PHP_FE(libvirt_domain_define_xml, arginfo_libvirt_conn_xml) \
PHP_FE(libvirt_domain_create_xml, arginfo_libvirt_conn_xml) \
PHP_FE(libvirt_domain_xml_from_native, arginfo_libvirt_domain_xml_from_native) \
@@ -165,6 +166,7 @@ PHP_FUNCTION(libvirt_domain_suspend);
PHP_FUNCTION(libvirt_domain_managedsave);
PHP_FUNCTION(libvirt_domain_undefine);
PHP_FUNCTION(libvirt_domain_reboot);
+PHP_FUNCTION(libvirt_domain_reset);
PHP_FUNCTION(libvirt_domain_define_xml);
PHP_FUNCTION(libvirt_domain_create_xml);
PHP_FUNCTION(libvirt_domain_xml_from_native);
--
2.24.0
4 years, 9 months
[PATCH v2 0/6] ui: rework -show-cursor option
by Gerd Hoffmann
Gerd Hoffmann (6):
ui: add show-cursor option
ui/gtk: implement show-cursor option
ui/sdl: implement show-cursor option
ui/cocoa: implement show-cursor option
ui: wire up legacy -show-cursor option
ui: deprecate legacy -show-cursor option
include/sysemu/sysemu.h | 1 -
ui/gtk.c | 8 +++++++-
ui/sdl2.c | 28 ++++++++++++++++++++--------
vl.c | 6 ++++--
qapi/ui.json | 3 +++
qemu-deprecated.texi | 5 +++++
ui/cocoa.m | 4 ++++
7 files changed, 43 insertions(+), 12 deletions(-)
--
2.18.1
4 years, 9 months
[PATCH 00/15] qemu: Handle 'size' and 'offset' attributes of 'raw' format
by Peter Krempa
This series fixes and improves the 'json:' pseudo-protocol parser and
implements the 'offset' and 'size' attributes and exposes them as
<slice> in the XML.
https://bugzilla.redhat.com/show_bug.cgi?id=1791788
Peter Krempa (15):
virStorageSourceParseBackingJSON: Pass around original backing file
string
virStorageSourceParseBackingJSON: Move deflattening of json: URIs out
of recursion
virStorageSourceJSONDriverParser: annotate 'format' drivers
virStorageSourceParseBackingJSON: Allow 'json:' pseudo URIs without
'file' wrapper
virStorageSourceParseBackingJSON: Prevent arbitrary nesting with
format drivers
tests: virstorage: Add test cases for "json:" pseudo-URI without
'file' wrapper
tests: virstorage: Add test data for json specified raw image with
offset/size
util: virstoragefile: Add data structure for storing storage source
slices
qemuBlockStorageSourceGetFormatRawProps: format 'offset' and 'size'
for slice
qemuDomainValidateStorageSource: Reject unsupported slices
docs: formatdomain: Close <source> on one of disk examples
docs: Document the new <slices> sub-element of disk's <source>
conf: Implement support for <slices> of disk source
tests: qemu: Add test data for the new <slice> element
virStorageSourceParseBackingJSONRaw: Parse 'offset' and 'size'
attributes
docs/formatdomain.html.in | 12 ++
docs/schemas/domaincommon.rng | 33 ++++
src/conf/domain_conf.c | 92 +++++++++++
src/qemu/qemu_block.c | 12 +-
src/qemu/qemu_domain.c | 15 ++
src/util/virstoragefile.c | 156 +++++++++++++-----
src/util/virstoragefile.h | 12 ++
.../disk-slices.x86_64-latest.args | 50 ++++++
tests/qemuxml2argvdata/disk-slices.xml | 45 +++++
tests/qemuxml2argvtest.c | 2 +
.../disk-slices.x86_64-latest.xml | 56 +++++++
tests/qemuxml2xmltest.c | 2 +
tests/virstoragetest.c | 23 +++
13 files changed, 462 insertions(+), 48 deletions(-)
create mode 100644 tests/qemuxml2argvdata/disk-slices.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-slices.xml
create mode 100644 tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml
--
2.24.1
4 years, 9 months
[PULL 07/46] qemu-deprecated: Remove text about Python 2
by Philippe Mathieu-Daudé
From: Thomas Huth <thuth(a)redhat.com>
Python 2 support has been removed, so we should now also remove
the announcement text for the deprecation.
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
Reviewed by: Aleksandar Markovic <amarkovic(a)wavecomp.com>
Reviewed-by: John Snow <jsnow(a)redhat.com>
Message-Id: <20200109095116.18201-1-thuth(a)redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd(a)redhat.com>
---
qemu-deprecated.texi | 8 --------
1 file changed, 8 deletions(-)
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index ea3e10bde3..97668edf92 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -351,14 +351,6 @@ they have no effect when used with @option{-n} to skip image creation.
Silently ignored options can be confusing, so this combination of
options will be made an error in future versions.
-@section Build system
-
-@subsection Python 2 support (since 4.1.0)
-
-In the future, QEMU will require Python 3 to be available at
-build time. Support for Python 2 in scripts shipped with QEMU
-is deprecated.
-
@section Backwards compatibility
@subsection Runnability guarantee of CPU models (since 4.1.0)
--
2.21.1
4 years, 9 months
[PATCH 0/4] qemu: Fix handling of 'copy-on-read' on hotplug with blockdev
by Peter Krempa
See patch 4.
Peter Krempa (4):
qemuMonitorJSONBlockdevAdd: Refactor cleanup
qemuMonitorJSONBlockdevDel: Refactor cleanup
qemuMonitorBlockdevAdd: Take double pointer argument
qemu: hotplug: Fix handling of the 'copy-on-read' layer with blockdev
src/qemu/qemu_block.c | 14 ++------------
src/qemu/qemu_hotplug.c | 25 +++++++++++++++---------
src/qemu/qemu_monitor.c | 16 ++++++----------
src/qemu/qemu_monitor.h | 2 +-
src/qemu/qemu_monitor_json.c | 37 +++++++++++++-----------------------
src/qemu/qemu_monitor_json.h | 2 +-
6 files changed, 39 insertions(+), 57 deletions(-)
--
2.24.1
4 years, 9 months
[PATCH] qemuBlockStorageSourceGetBackendProps: Report errors on all switch cases
by Peter Krempa
Few switch cases returned failure but didn't report an error. For a
situation when the backingStore type='volume' was not translated the
following error would occur:
$ virsh start VM
error: Failed to start domain VM
error: An error occurred, but the cause is unknown
After this patch:
$ virsh start VM
error: Failed to start domain VM
error: internal error: storage source pool 'tmp' volume 'pull3.qcow2' is not translated
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_block.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 63116ef5f2..0ee10dd770 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -1081,8 +1081,14 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src,
break;
case VIR_STORAGE_TYPE_VOLUME:
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("storage source pool '%s' volume '%s' is not translated"),
+ src->srcpool->pool, src->srcpool->volume);
+ return NULL;
+
case VIR_STORAGE_TYPE_NONE:
case VIR_STORAGE_TYPE_LAST:
+ virReportEnumRangeError(virStorageType, actualType);
return NULL;
case VIR_STORAGE_TYPE_NETWORK:
@@ -1141,6 +1147,7 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_NONE:
case VIR_STORAGE_NET_PROTOCOL_LAST:
+ virReportEnumRangeError(virStorageNetProtocol, src->protocol);
return NULL;
}
break;
--
2.24.1
4 years, 9 months
[PATCH] docs: render <span class="literal"> with monospace font
by Daniel P. Berrangé
When using ``....`` in RST, this results in <span class="literal">...</span>
instead of <code>...</code>. We thus need an extra rule to render it
with a monospace font. Colouring a light gray also helps the text
stand out a little more and matches background of <pre> blocks.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
docs/libvirt.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/libvirt.css b/docs/libvirt.css
index d2e1842b62..50cf02e348 100644
--- a/docs/libvirt.css
+++ b/docs/libvirt.css
@@ -574,3 +574,8 @@ ul.news-section-content li dl dd {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
+
+span.literal, code {
+ font-family: monospace;
+ background: #eeeeee;
+}
--
2.24.1
4 years, 9 months
[libvirt PATCH v3 0/7] the gnulib saga: the season finale
by Daniel P. Berrangé
This is a followup to
v1: https://www.redhat.com/archives/libvir-list/2020-January/msg00900.html
v2: https://www.redhat.com/archives/libvir-list/2020-January/msg01158.html
At the end of this series we have 100% eliminated use of GNULIB
from libvirt.
Some things to note
- I have build tested this on Travis platforms and manually
via FreeBSD 11/12. This covers make, make syntax-check &
make check
- I've validated that virsh still works with mingw64 builds
on Windows 2008r2.
- I've done basic functional testing on Fedora 31, starting
and stopping VMs & other other simple APIs
The config.h we generate is much much smaller than before as we
eliminated alot of gnulib macros.
The risk here is that we are no longer setting some HAVE_XXX
in config.h that we rely on. To mitigate this I did a diff
of config.h before & after this series to determinw which
HAVE_XXX we no longer set. I then grepped the source to see
if we actually use any of them. This identified a few mistakes
which I fixed in testing this series.
The builds times for libvirt after applying this series have
some significant gains, improving speed of all stages (autogen,
configure & make).
Overall while this was time consuming work (due to massive number
of builds for testing each step), it is surprising just how easy
it was eliminate need for GNULIB. GLib helped a little bit in
this respect, but the biggest factor is simply that a large
number of issues GNULIB fixes only matter for ancient / obsolete
OS platforms.
With libvirt only targetting modern Linux, FreeBSD, macOS & MinGW,
the only really hard stuff where GNULIB was a big help is the
Windows sockets portability.
GNULIB was a pretty valuable approach when there were countless
flavours of UNIX to worry about with poor levels of POSIX API
compatibility. With a typical modern set of platforms, I think
it is better to just use a library like GLib and deal with any
other portability problems explicitly.
Almost certainly someone will appear after next release and
complain that libvirt no longer builds on some platform that
we don't officially support. My expectation is that when this
happens it will be reasonably easy to fix whatever problem
they report. Also at that time we can also consider whether
the platform needs to be added to CI.
Changed in v3:
- Merged all the already acked patches which didn't
have ordering dependencies
- Rewrite way virsh monitor long running jobs to
avoid non-portable pipe usage
- Improve debug messages in glib event loop
- Add dtrace probes to glib event loop
- Remove main context acquire/release steps
- Fix buck passing mistakes in RPC client
event loop conversion
- Purge more from syntax-check
- Improve event watch to GIOCondition conversions
- Fix leak of windows event object HANDLE
Daniel P. Berrangé (7):
tools: rewrite interactive job monitoring logic
src: introduce helper API for creating GSource for socket
rpc: convert RPC client to use GMainLoop instead of poll
util: import an event loop impl based on GMainContext
util: switch to use the GLib event loop impl
util: delete the poll() based event loop impl
gnulib: delete all gnulib integration
.color_coded.in | 2 -
.gitignore | 9 +-
.gitmodules | 3 -
.gnulib | 1 -
.ycm_extra_conf.py.in | 2 -
Makefile.am | 2 +-
README-hacking | 9 +-
autogen.sh | 219 +------
bootstrap | 1073 -------------------------------
bootstrap.conf | 100 ---
build-aux/syntax-check.mk | 160 +----
ci/build.sh | 4 +-
config-post.h | 5 +-
configure.ac | 11 +-
docs/compiling.html.in | 25 -
docs/hacking.html.in | 5 +-
gnulib/lib/Makefile.am | 30 -
libvirt.spec.in | 2 -
m4/virt-compile-warnings.m4 | 18 +-
po/POTFILES.in | 1 -
src/Makefile.am | 7 +-
src/admin/Makefile.inc.am | 1 -
src/bhyve/Makefile.inc.am | 1 -
src/interface/Makefile.inc.am | 1 -
src/libvirt_private.syms | 14 +-
src/libvirt_probes.d | 14 +
src/libxl/Makefile.inc.am | 1 -
src/locking/Makefile.inc.am | 3 -
src/logging/Makefile.inc.am | 1 -
src/lxc/Makefile.inc.am | 2 -
src/network/Makefile.inc.am | 3 +-
src/node_device/Makefile.inc.am | 2 -
src/nwfilter/Makefile.inc.am | 1 -
src/qemu/Makefile.inc.am | 1 -
src/remote/Makefile.inc.am | 1 -
src/rpc/virnetclient.c | 222 ++++---
src/rpc/virnetsocket.c | 6 -
src/secret/Makefile.inc.am | 1 -
src/security/Makefile.inc.am | 1 -
src/storage/Makefile.inc.am | 16 -
src/util/Makefile.inc.am | 6 +-
src/util/viralloc.h | 3 +-
src/util/virbitmap.c | 4 +-
src/util/virevent.c | 21 +-
src/util/vireventglib.c | 499 ++++++++++++++
src/util/vireventglib.h | 28 +
src/util/vireventglibwatch.c | 249 +++++++
src/util/vireventglibwatch.h | 48 ++
src/util/vireventpoll.c | 772 ----------------------
src/util/vireventpoll.h | 126 ----
src/util/virfile.c | 7 +-
src/util/virsocket.h | 15 -
src/vbox/Makefile.inc.am | 1 -
src/vz/Makefile.inc.am | 1 -
tests/Makefile.am | 21 +-
tests/virstringtest.c | 3 +-
tools/Makefile.am | 9 +-
tools/virsh-domain.c | 388 ++++++-----
tools/virsh.h | 3 +-
59 files changed, 1268 insertions(+), 2916 deletions(-)
delete mode 160000 .gnulib
delete mode 100755 bootstrap
delete mode 100644 bootstrap.conf
delete mode 100644 gnulib/lib/Makefile.am
create mode 100644 src/util/vireventglib.c
create mode 100644 src/util/vireventglib.h
create mode 100644 src/util/vireventglibwatch.c
create mode 100644 src/util/vireventglibwatch.h
delete mode 100644 src/util/vireventpoll.c
delete mode 100644 src/util/vireventpoll.h
--
2.24.1
4 years, 9 months