<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/scripts/device-crash-test, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/scripts/device-crash-test?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/scripts/device-crash-test?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2023-10-12T18:21:43Z</updated>
<entry>
<title>python/qemu: rename command() to cmd()</title>
<updated>2023-10-12T18:21:43Z</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
<email>vsementsov@yandex-team.ru</email>
</author>
<published>2023-10-06T15:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=684750ab4f8a3ad69512b71532408be3ac2547d4'/>
<id>urn:sha1:684750ab4f8a3ad69512b71532408be3ac2547d4</id>
<content type='text'>
Use a shorter name. We are going to move in iotests from qmp() to
command() where possible. But command() is longer than qmp() and don't
look better. Let's rename.

You can simply grep for '\.command(' and for 'def command(' to check
that everything is updated (command() in tests/docker/docker.py is
unrelated).

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Message-id: 20231006154125.1068348-6-vsementsov@yandex-team.ru
[vsementsov: also update three occurrences in
   tests/avocado/machine_aspeed.py and keep r-b]
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>Revert "tests: Use separate virtual environment for avocado"</title>
<updated>2023-08-28T07:55:48Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-08-08T09:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=c03f57fd5bf72588a05750f14202f63be7ddbd0c'/>
<id>urn:sha1:c03f57fd5bf72588a05750f14202f63be7ddbd0c</id>
<content type='text'>
This reverts commit e8e4298feadae7924cf7600bb3bcc5b0a8d7cbe9.

ensuregroup allows to specify both the acceptable versions of avocado,
and a locked version to be used when avocado is not installed as a system
pacakge.  This lets us install avocado in pyvenv/ using "mkvenv.py" and
reuse the distro package on Fedora and CentOS Stream (the only distros
where it's available).

ensuregroup's usage of "(&gt;=..., &lt;=...)" constraints when evaluating
the distro package, and "==" constraints when installing it from PyPI,
makes it possible to avoid conflicts between the known-good version and
a package plugins included in the distro.

This is because package plugins have "==" constraints on the version
that is included in the distro, and, using "pip install avocado==88.1"
on a venv that includes system packages will result in an error:

   avocado-framework-plugin-varianter-yaml-to-mux 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
   avocado-framework-plugin-result-html 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.

But at the same time, if the venv does not include a system distribution
of avocado then we can install a known-good version and stick to LTS
releases.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1663
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tests: Use separate virtual environment for avocado</title>
<updated>2023-06-06T14:29:53Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-06-05T15:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=e8e4298feadae7924cf7600bb3bcc5b0a8d7cbe9'/>
<id>urn:sha1:e8e4298feadae7924cf7600bb3bcc5b0a8d7cbe9</id>
<content type='text'>
This reverts commits eea2d141179 ("Makefile: remove $(TESTS_PYTHON)",
2023-05-26) and 9c6692db550 ("tests: Use configure-provided pyvenv for
tests", 2023-05-18).

Right now, there is a conflict between wanting a "&gt;=" constraint when
using a distro-provided package and wanting a "==" constraint when
installing Avocado from PyPI; this would provide the best of both worlds
in terms of resiliency for both distros that have required packages and
distros that don't.

The conflict is visible also for meson, where we would like to install
the latest 0.63.x version but also accept a distro 1.1.x version.
But it is worse for avocado, for two reasons:

1) we cannot use an "==" constraint to install avocado if the venv
includes a system avocado.  The distro will package plugins that have
"==" constraints on the version that is included in the distro, and, using
"pip install avocado==88.1" on a venv that includes system packages will
result in this error:

   ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
   avocado-framework-plugin-varianter-yaml-to-mux 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
   avocado-framework-plugin-result-html 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
   make[1]: Leaving directory '/home/berrange/src/virt/qemu/build'

2) we cannot use "&gt;=" either if the venv does _not_ include a system
avocado, because that would result in the installation of v101.0 which
is the one we've just reverted.

So the idea is to encode the dependencies as an (acceptable, locked)
tuple, like this hypothetical TOML that would be committed inside
python/ and used by mkvenv.py:

  [meson]
  meson = { minimum = "0.63.0", install = "0.63.3", canary = "meson" }

  [docs]
  # 6.0 drops support for Python 3.7
  sphinx = { minimum = "1.6", install = "&lt;6.0", canary = "sphinx-build" }
  sphinx_rtd_theme = { minimum = "0.5" }

  [avocado]
  avocado-framework = { minimum = "88.1", install = "88.1", canary = "avocado" }

Once this is implemented, it would also be possible to install avocado in
pyvenv/ using "mkvenv.py ensure", thus using the distro package on Fedora
and CentOS Stream (the only distros where it's available).  But until
this is implemented, keep avocado in a separate venv.  There is still the
benefit of using a single python for meson custom_targets and for sphinx.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tests: Use configure-provided pyvenv for tests</title>
<updated>2023-05-18T06:53:51Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2023-05-11T03:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=9c6692db550f739a84fe4b677428df09d9fafdc3'/>
<id>urn:sha1:9c6692db550f739a84fe4b677428df09d9fafdc3</id>
<content type='text'>
This patch changes how the avocado tests are provided, ever so
slightly. Instead of creating a new testing venv, use the
configure-provided 'pyvenv' instead, and install optional packages into
that.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-Id: &lt;20230511035435.734312-20-jsnow@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scripts/device-crash-test: Add a parameter to run with TCG only</title>
<updated>2023-04-27T13:58:11Z</updated>
<author>
<name>Thomas Huth</name>
<email>thuth@redhat.com</email>
</author>
<published>2023-04-24T09:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=8b869aa59109d238fd684e1ade204b6942202120'/>
<id>urn:sha1:8b869aa59109d238fd684e1ade204b6942202120</id>
<content type='text'>
We're currently facing the problem that the device-crash-test script
runs twice as long in the CI when a runner supports KVM - which sometimes
results in a timeout of the CI job. To get a more deterministic runtime
here, add an option to the script that allows to run it with TCG only.

Reported-by: Eldon Stegall &lt;eldon-qemu@eldondev.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20230414145845.456145-3-thuth@redhat.com&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20230424092249.58552-6-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>tests: run 'device-crash-test' from tests/venv</title>
<updated>2022-06-06T07:26:54Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2022-05-26T00:09:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=1d8cf47e5b8b4faa95954824cb6610d81c50d7d2'/>
<id>urn:sha1:1d8cf47e5b8b4faa95954824cb6610d81c50d7d2</id>
<content type='text'>
Remove the sys.path hacking from device-crash-test, and add in a little
user-friendly message for anyone who was used to running this script
directly from the source tree.

Modify the GitLab job recipes to create the tests/venv first, then run
device-crash-test from that venv.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20220526000921.1581503-10-jsnow@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/pxb: Allow creation of a CXL PXB (host bridge)</title>
<updated>2022-05-13T10:13:36Z</updated>
<author>
<name>Ben Widawsky</name>
<email>ben.widawsky@intel.com</email>
</author>
<published>2022-04-29T14:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=4f8db8711cbd27c9acf17e685987e9e74815e087'/>
<id>urn:sha1:4f8db8711cbd27c9acf17e685987e9e74815e087</id>
<content type='text'>
This works like adding a typical pxb device, except the name is
'pxb-cxl' instead of 'pxb-pcie'. An example command line would be as
follows:
  -device pxb-cxl,id=cxl.0,bus="pcie.0",bus_nr=1

A CXL PXB is backward compatible with PCIe. What this means in practice
is that an operating system that is unaware of CXL should still be able
to enumerate this topology as if it were PCIe.

One can create multiple CXL PXB host bridges, but a host bridge can only
be connected to the main root bus. Host bridges cannot appear elsewhere
in the topology.

Note that as of this patch, the ACPI tables needed for the host bridge
(specifically, an ACPI object in _SB named ACPI0016 and the CEDT) aren't
created. So while this patch internally creates it, it cannot be
properly used by an operating system or other system software.

Also necessary is to add an exception to scripts/device-crash-test
similar to that for exiting pxb as both must created on a PCIexpress
host bus.

Signed-off-by: Ben Widawsky &lt;ben.widawsky@intel.com&gt;
Signed-off-by: Jonathan.Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20220429144110.25167-15-Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>python: rename qemu.aqmp to qemu.qmp</title>
<updated>2022-04-21T15:01:00Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2022-03-30T17:28:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=37094b6dd59f56978b918e79cadf17c6fd5d36e2'/>
<id>urn:sha1:37094b6dd59f56978b918e79cadf17c6fd5d36e2</id>
<content type='text'>
Now that we are fully switched over to the new QMP library, move it back
over the old namespace. This is being done primarily so that we may
upload this package simply as "qemu.qmp" without introducing confusion
over whether or not "aqmp" is a new protocol or not.

The trade-off is increased confusion inside the QEMU developer
tree. Sorry!

Note: the 'private' member "_aqmp" in legacy.py also changes to "_qmp";
not out of necessity, but just to remove any traces of the "aqmp"
name.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Beraldo Leal &lt;bleal@redhat.com&gt;
Acked-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@openvz.org&gt;
Message-id: 20220330172812.3427355-8-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>scripts/device-crash-test: Use a QMP timeout</title>
<updated>2021-11-22T23:41:21Z</updated>
<author>
<name>John Snow</name>
<email>jsnow@redhat.com</email>
</author>
<published>2021-11-18T20:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=206439cd8937a3dc556537074d5d37e5d74eb0d0'/>
<id>urn:sha1:206439cd8937a3dc556537074d5d37e5d74eb0d0</id>
<content type='text'>
Despite all the previous fixes, it's still possible for
device-crash-test to wedge itself in the case that QEMU terminates *so
quickly* that it doesn't even begin a connection attempt to our QMP
client. Python will just joyfully wait ad infinitum for a connection
that will now never arrive.

The real fix is to use asyncio to simultaneously poll both the health of
the launched process AND the connection attempt. That's quite a bit more
invasive than just setting a connection timeout, though.

Do the very simplest thing for now.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-id: 20211118204620.1897674-7-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>Revert "device-crash-test: Ignore errors about a bus not being available"</title>
<updated>2021-11-17T09:20:17Z</updated>
<author>
<name>Thomas Huth</name>
<email>thuth@redhat.com</email>
</author>
<published>2021-11-12T07:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=418ce0201ff6f4c9d9560eaea15ff393c2cd7412'/>
<id>urn:sha1:418ce0201ff6f4c9d9560eaea15ff393c2cd7412</id>
<content type='text'>
This reverts commit ca89d15f8e42f2e5eac5bd200af38fdbfb32e875.

There is already an entry for this kind of messages earlier in the
ERROR_RULE_LIST - when I added this patch, I just got fooled by
the other errors that occur due to a race between QMP connection
and QEMU terminating early (which still spit out the 'No bus found'
messages in their backtrace), but these other problems have now
fortunately been tackled by John Snow, so we certainly don't need
this duplicated entry here anymore.

Message-Id: &lt;20211112072220.108580-1-thuth@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
</feed>
