4e620ff4 | 06-Oct-2023 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
python/machine.py: upgrade vm.cmd() method
The method is not popular in iotests, we prefer use vm.qmp() and then check success by hand. But that's not optimal. To simplify movement to vm.cmd() let's
python/machine.py: upgrade vm.cmd() method
The method is not popular in iotests, we prefer use vm.qmp() and then check success by hand. But that's not optimal. To simplify movement to vm.cmd() let's support same interface improvements like in vm.qmp().
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-7-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
37274707 | 06-Oct-2023 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
python: rename QEMUMonitorProtocol.cmd() to cmd_raw()
Having cmd() and command() methods in one class doesn't look good. Rename cmd() to cmd_raw(), to show its meaning better.
We also want to renam
python: rename QEMUMonitorProtocol.cmd() to cmd_raw()
Having cmd() and command() methods in one class doesn't look good. Rename cmd() to cmd_raw(), to show its meaning better.
We also want to rename command() to cmd() in future, so this commit is a necessary step.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-5-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
2cee9ca9 | 06-Oct-2023 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
qmp_shell.py: _fill_completion() use .command() instead of .cmd()
We just want to ignore failure, so we don't need low level .cmd(). This helps further renaming .command() to .cmd().
Signed-off-by:
qmp_shell.py: _fill_completion() use .command() instead of .cmd()
We just want to ignore failure, so we don't need low level .cmd(). This helps further renaming .command() to .cmd().
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-3-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
f187cfef | 06-Oct-2023 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument
The argument is unused, let's drop it for now, as we are going to refactor the interface and don't want to refactor unused things.
Signed-
python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument
The argument is unused, let's drop it for now, as we are going to refactor the interface and don't want to refactor unused things.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-2-vsementsov@yandex-team.ru Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
19a39e27 | 06-Oct-2023 |
John Snow <jsnow@redhat.com> |
Python: Enable python3.12 support
Python 3.12 has released, so update the test infrastructure to test against this version. Update the configure script to look for it when an explicit Python interpr
Python: Enable python3.12 support
Python 3.12 has released, so update the test infrastructure to test against this version. Update the configure script to look for it when an explicit Python interpreter isn't chosen.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-id: 20231006195243.3131140-5-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
acf87387 | 06-Oct-2023 |
John Snow <jsnow@redhat.com> |
python/qmp: remove Server.wait_closed() call for Python 3.12
This patch is a backport from https://gitlab.com/qemu-project/python-qemu-qmp/-/commit/e03a3334b6a477beb09b293708632f2c06fe9f61
Accordin
python/qmp: remove Server.wait_closed() call for Python 3.12
This patch is a backport from https://gitlab.com/qemu-project/python-qemu-qmp/-/commit/e03a3334b6a477beb09b293708632f2c06fe9f61
According to Guido in https://github.com/python/cpython/issues/104344 , this call was never meant to wait for the server to shut down - that is handled synchronously - but instead, this waits for all connections to close. Or, it would have, if it wasn't broken since it was introduced.
3.12 fixes the bug, which now causes a hang in our code. The fix is just to remove the wait.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-id: 20231006195243.3131140-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
46d4747a | 28-Sep-2023 |
John Snow <jsnow@redhat.com> |
python/machine: remove unused sock_dir argument
By using a socketpair for all of the sockets managed by the VM class and its extensions, we don't need the sock_dir argument anymore, so remove it.
W
python/machine: remove unused sock_dir argument
By using a socketpair for all of the sockets managed by the VM class and its extensions, we don't need the sock_dir argument anymore, so remove it.
We only added this argument so that we could specify a second, shorter temporary directory for cases where the temp/log dirs were "too long" as a socket name on macOS. We don't need it for this class now. In one case, avocado testing takes over responsibility for creating an appropriate sockdir.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20230928044943.849073-7-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
d3967378 | 28-Sep-2023 |
John Snow <jsnow@redhat.com> |
python/machine: use socketpair() for qtest connection
Like the QMP and console sockets, begin using socketpairs for the qtest connection, too. After this patch, we'll be able to remove the vestigial
python/machine: use socketpair() for qtest connection
Like the QMP and console sockets, begin using socketpairs for the qtest connection, too. After this patch, we'll be able to remove the vestigial sock_dir argument, but that cleanup is best done in its own patch.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20230928044943.849073-6-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
1d4796cd | 28-Sep-2023 |
John Snow <jsnow@redhat.com> |
python/machine: use socketpair() for console connections
Create a socketpair for the console output. This should help eliminate race conditions around console text early in the boot process that mig
python/machine: use socketpair() for console connections
Create a socketpair for the console output. This should help eliminate race conditions around console text early in the boot process that might otherwise have been dropped on the floor before being able to connect to QEMU under "server,nowait".
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20230928044943.849073-5-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
5f263cb1 | 28-Sep-2023 |
John Snow <jsnow@redhat.com> |
python/console_socket: accept existing FD in initializer
Useful if we want to use ConsoleSocket() for a socket created by socketpair().
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Ani
python/console_socket: accept existing FD in initializer
Useful if we want to use ConsoleSocket() for a socket created by socketpair().
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20230928044943.849073-4-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
612b3ba2 | 28-Sep-2023 |
John Snow <jsnow@redhat.com> |
python/machine: close sock_pair in cleanup path
If everything has gone smoothly, we'll already have closed the socket we gave to the child during post_launch. The other half of the pair that we gave
python/machine: close sock_pair in cleanup path
If everything has gone smoothly, we'll already have closed the socket we gave to the child during post_launch. The other half of the pair that we gave to the QMP connection should, likewise, be definitively closed by now.
However, in the cleanup path, it's possible we've created the socketpair but flubbed the launch and need to clean up resources. These resources *would* be handled by the garbage collector, but that can happen at unpredictable times. Nicer to just clean them up synchronously on the exit path, here.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20230928044943.849073-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
0a88ac96 | 16-May-2023 |
Paolo Bonzini <pbonzini@redhat.com> |
Revert "mkvenv: work around broken pip installations on Debian 10"
Debian 10 has Python 3.7, so it is not possible to use it anymore now that Python 3.8 is required.
Signed-off-by: Paolo Bonzini <p
Revert "mkvenv: work around broken pip installations on Debian 10"
Debian 10 has Python 3.7, so it is not possible to use it anymore now that Python 3.8 is required.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
3e4b6b0a | 06-Jun-2023 |
Paolo Bonzini <pbonzini@redhat.com> |
mkvenv: assume presence of importlib.metadata
importlib.metadata is included in Python 3.8, so there is no need to fallback to either importlib-metadata or pkgresources when generating console scrip
mkvenv: assume presence of importlib.metadata
importlib.metadata is included in Python 3.8, so there is no need to fallback to either importlib-metadata or pkgresources when generating console script shims.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
c03f57fd | 08-Aug-2023 |
Paolo Bonzini <pbonzini@redhat.com> |
Revert "tests: Use separate virtual environment for avocado"
This reverts commit e8e4298feadae7924cf7600bb3bcc5b0a8d7cbe9.
ensuregroup allows to specify both the acceptable versions of avocado, and
Revert "tests: Use separate virtual environment for avocado"
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 "(>=..., <=...)" 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 <pbonzini@redhat.com>
show more ...
|
71ed611c | 08-Aug-2023 |
Paolo Bonzini <pbonzini@redhat.com> |
python: mkvenv: add ensuregroup command
Introduce a new subcommand that retrieves the packages to be installed from a TOML file. This allows being more flexible in using the system version of a pack
python: mkvenv: add ensuregroup command
Introduce a new subcommand that retrieves the packages to be installed from a TOML file. This allows being more flexible in using the system version of a package, while at the same time using a known-good version when installing the package. This is important for packages that sometimes have backwards-incompatible changes or that depend on specific versions of their dependencies.
Compared to JSON, TOML is more human readable and easier to edit. A parser is available in 3.11 but also available as a small (12k) package for older versions, tomli. While tomli is bundled with pip, this is only true of recent versions of pip. Of all the supported OSes pretty much only FreeBSD has a recent enough version of pip while staying on Python <3.11. So we cannot use the same trick that is in place for distlib.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
0f1ec070 | 08-Aug-2023 |
Paolo Bonzini <pbonzini@redhat.com> |
python: mkvenv: introduce TOML-like representation of dependencies
We would like to place all Python dependencies in the same file, so that we can add more information without having long and comple
python: mkvenv: introduce TOML-like representation of dependencies
We would like to place all Python dependencies in the same file, so that we can add more information without having long and complex command lines. The plan is to have a TOML file with one entry per package, for example
[avocado] avocado-framework = { accepted = "(>=88.1, <93.0)", installed = "88.1", canary = "avocado" }
Each TOML section will thus be a dictionary of dictionaries. Modify mkvenv.py's workhorse function, _do_ensure, to already operate on such a data structure. The "ensure" subcommand is modified to separate the depspec into a name and a version part, and use the result (plus the --diagnose argument) to build a dictionary for each command line argument.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|