[PULL 0/6] Floppy patches

2021-06-25 Thread John Snow
The following changes since commit e0da9171e02f4534124b9a9e0782b38376c6: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210624-pull-request' into staging (2021-06-25 09:10:37 +0100) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git

Re: Running iotest linters from check-python-* CI jobs

2021-06-23 Thread John Snow
On 6/23/21 6:55 AM, Kevin Wolf wrote: Am 22.06.2021 um 18:24 hat John Snow geschrieben: On 6/22/21 11:52 AM, Max Reitz wrote: On 22.06.21 16:57, John Snow wrote: Hi Kevin: At one point I had the idea to augment the Python linter CI jobs to also run the iotest linters. I thought it would

Re: Running iotest linters from check-python-* CI jobs

2021-06-22 Thread John Snow
On 6/22/21 11:52 AM, Max Reitz wrote: On 22.06.21 16:57, John Snow wrote: Hi Kevin: At one point I had the idea to augment the Python linter CI jobs to also run the iotest linters. I thought it would be convenient to ensure that while I changed around the QMP and Machine packages that I

Re: [PATCH 2/4] Python QEMU utils: introduce a generic feature list

2021-06-22 Thread John Snow
t in QEMU binaries. Using introspection data or QMP queries would be my preferred (and ideally SOLE) way to detect QEMU features. But that's something to worry about later, I suppose. As long as it passes the CI and doesn't break any tests, I'll toss you my ACK here and trust your judgment: Acked-by: John Snow --js

Running iotest linters from check-python-* CI jobs

2021-06-22 Thread John Snow
Hi Kevin: At one point I had the idea to augment the Python linter CI jobs to also run the iotest linters. I thought it would be convenient to ensure that while I changed around the QMP and Machine packages that I didn't introduce regressions in iotest 297 either. I sent an RFC, got

Re: [PATCH v6 01/16] python: qemu: add timer parameter for qmp.accept socket

2021-06-22 Thread John Snow
to be 15 seconds in iotests.py, to give an upper bound to the QMP monitor test command execution. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy LGTM, thank you for your patience while I re-settled the Python subcomponent. Reviewed-by: John Snow

Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64

2021-06-08 Thread John Snow
On 6/8/21 11:01 AM, Thomas Huth wrote: On 08/06/2021 16.27, Alex Bennée wrote: Richard Henderson writes: On 6/4/21 8:53 AM, Alex Bennée wrote: The assumption that the qemu-system-aarch64 image can run all 32 bit machines is about to be broken... Um, what? Really what we want is to

Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64

2021-06-08 Thread John Snow
On 6/4/21 11:53 AM, Alex Bennée wrote: The assumption that the qemu-system-aarch64 image can run all 32 bit machines is about to be broken and besides it's not likely this is What's changing? I'm not deeply familiar with aarch64. Why is this assumption about to be broken? improving out

Re: [PATCH RFC 0/3] python/iotests: Run iotest linters during Python CI

2021-06-07 Thread John Snow
On 6/5/21 10:08 AM, Vladimir Sementsov-Ogievskiy wrote: 04.06.2021 19:39, John Snow wrote: Since iotests are such a heavy and prominent user of the Python qemu.qmp and qemu.machine packages, it would be convenient if the Python linting suite also checked this client for any possible regressions

Re: [PATCH RFC 2/3] iotests: split 'linters.py' off from 297

2021-06-07 Thread John Snow
On 6/5/21 10:27 AM, Vladimir Sementsov-Ogievskiy wrote: 04.06.2021 19:39, John Snow wrote: Refactor the core function of the linting configuration out of 297 and into a new file called linters.py. Now, linters.py represents an invocation of the linting scripts that more resembles a "n

[PATCH RFC 3/3] python: Add iotest linters to test suite

2021-06-04 Thread John Snow
As a convenience, since iotests is an extremely prominent user of the qemu.qmp and qemu.machine packages and already implements a linting regime, run those tests as well so that it's very hard to miss regressions caused by changes to the python library. Signed-off-by: John Snow --- python/tests

[PATCH RFC 2/3] iotests: split 'linters.py' off from 297

2021-06-04 Thread John Snow
ers and contributors to run in this manner. See the following commit for how this is used from the Python packaging side. Signed-off-by: John Snow --- - It's a big glob of a patch. Sorry. I can work it into smaller pieces if the idea is well received. - I change the invocations of mypy/p

[PATCH RFC 1/3] python: expose typing information via PEP 561

2021-06-04 Thread John Snow
out how to get it to include things from the source root into the package root. I tried!...) https: //www.python.org/dev/peps/pep-0561/#specification Signed-off-by: John Snow --- python/qemu/machine/py.typed | 0 python/qemu/qmp/py.typed | 0 python/qemu/utils/py.typed | 0 python/setup.cfg

[PATCH RFC 0/3] python/iotests: Run iotest linters during Python CI

2021-06-04 Thread John Snow
/job.log (1/5) tests/flake8.sh: PASS (0.27 s) (2/5) tests/iotests.sh: PASS (10.30 s) (3/5) tests/isort.sh: PASS (0.15 s) (4/5) tests/mypy.sh: PASS (0.19 s) (5/5) tests/pylint.sh: PASS (3.40 s) RESULTS: PASS 5 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 14.65 s Jo

Re: [PATCH v4 01/15] python: qemu: add timer parameter for qmp.accept socket

2021-06-03 Thread John Snow
On 6/3/21 4:06 AM, Emanuele Giuseppe Esposito wrote: On 03/06/2021 01:23, John Snow wrote: On 5/20/21 3:52 AM, Emanuele Giuseppe Esposito wrote: Alsp add a new _qmp_timer field to the QEMUMachine class. Let's change the default socket timeout to None, so that if a subclass needs to add

Re: [PATCH v4 26/35] python/qemu/machine: QEMUMachine: improve qmp() method

2021-06-02 Thread John Snow
=qmp_args) With the comment addressed: Reviewed-by: John Snow Thanks, --js

Re: [PATCH v4 25/35] python/qemu/machine.py: refactor _qemu_args()

2021-06-02 Thread John Snow
the response dict. On failure raise an exception. """ -qmp_args = self._qmp_args(conv_keys, **args) +qmp_args = self._qmp_args(conv_keys, args) return self._qmp.command(cmd, **qmp_args) def get_qmp_event(self, wait: bool = False) -> Optional[QMPMessage]: With those items addressed: Reviewed-by: John Snow

Re: [PATCH v4 01/15] python: qemu: add timer parameter for qmp.accept socket

2021-06-02 Thread John Snow
On 5/20/21 3:52 AM, Emanuele Giuseppe Esposito wrote: Alsp add a new _qmp_timer field to the QEMUMachine class. Let's change the default socket timeout to None, so that if a subclass needs to add a timer, it can be done by modifying this private field. At the same time, restore the timer to be

Re: [PULL v2 00/44] Python patches

2021-06-02 Thread John Snow
On 6/2/21 12:07 PM, Peter Maydell wrote: On Wed, 2 Jun 2021 at 00:31, John Snow wrote: The following changes since commit 52848929b70dcf92a68aedcfd90207be81ba3274: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20210528-pull-request' into staging (2021-05-30 20:10:30 +0100

Re: [PULL 00/44] Python patches

2021-06-01 Thread John Snow
On 6/1/21 6:36 AM, Peter Maydell wrote: On Sun, 30 May 2021 at 20:22, John Snow wrote: On 5/30/21 3:09 PM, Peter Maydell wrote: Fails to build on my machine that runs the BSD VMs, apparently before it gets to the point of launching the VM: When I have seen this error message in the past

[PULL v2 04/44] Python: add utility function for retrieving port redirection

2021-06-01 Thread John Snow
le to host the utility function and a test. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Eric Auger Reviewed-by: Willian Rampazzo Message-Id: <20210412044644.55083-4-cr...@redhat.com> Signed-off-by: John Snow [Squashed in below fix. --js] Signed-o

[PULL v2 00/44] Python patches

2021-06-01 Thread John Snow
/virtiofs_submounts.py: fix setup of SSH pubkey John Snow (31): python/console_socket: avoid one-letter variable python/machine: use subprocess.DEVNULL instead of open(os.path.devnull) python/machine: use subprocess.run instead of subprocess.Popen python/console_socket: Add a pylint ignore

Re: [PULL 00/44] Python patches

2021-05-30 Thread John Snow
On 5/30/21 3:09 PM, Peter Maydell wrote: On Fri, 28 May 2021 at 03:32, John Snow wrote: The following changes since commit c8616fc7670b884de5f74d2767aade224c1c5c3a: Merge remote-tracking branch 'remotes/philmd/tags/gitlab-ci-20210527' into staging (2021-05-27 16:32:57 +0100

[PULL 41/44] python: add Makefile for some common tasks

2021-05-27 Thread John Snow
elete miscellaneous python packaging output possibly created by pipenv, pip, or other python packaging utilities make distclean: delete the above, the .venv, and the editable "qemu" package forwarder (qemu.egg-info) if there is one. Signed-off-by: John Snow Reviewed-by: Cleber

[PULL 42/44] python: add .gitignore

2021-05-27 Thread John Snow
) Ignore .idea (pycharm) .vscode, and .venv (pipenv et al). Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-30-js...@redhat.com Signed-off-by: John Snow --- python/.gitignore | 15 +++ 1 file changed, 15

[PULL 40/44] python: add avocado-framework and tests

2021-05-27 Thread John Snow
ect arguments. (A forthcoming commit adds the much easier 'make check'.) Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-id: 20210527211715.394144-28-js...@redhat.com Signed-off-by: John Snow --- python/README.rst | 2 ++ python/Pipfile.lock| 8 pytho

[PULL 38/44] python/qemu: add qemu package itself to pipenv

2021-05-27 Thread John Snow
are installed in 'editable' mode; all changes made to the python package inside the git tree will be reflected in the installed package without reinstallation. This includes changes made via git pull and so on. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-id

[PULL 43/44] python: add tox support

2021-05-27 Thread John Snow
e code should be amended to work around the issue. With confidence that the tests pass on 3.6 through 3.10 inclusive, add the appropriate classifiers to setup.cfg to indicate which versions we claim to support. Tox 3.18.0 or above is required to use the 'allowlist_externals' option. Signed-off-by: John S

[PULL 33/44] python: Add flake8 to pipenv

2021-05-27 Thread John Snow
flake8 3.5.x does not support the --extend-ignore syntax used in the .flake8 file to gracefully extend default ignores, so 3.6.x is our minimum requirement. There is no known upper bound. flake8 can be run from the python/ directory with no arguments. Signed-off-by: John Snow Reviewed

[PULL 31/44] python: move flake8 config to setup.cfg

2021-05-27 Thread John Snow
Update the comment concerning the flake8 exception to match commit 42c0dd12, whose commit message stated: A note on the flake8 exception: flake8 will warn on *any* bare except, but pylint's is context-aware and will suppress the warning if you re-raise the exception. Signed-off-by: John Snow

[PULL 32/44] python: add excluded dirs to flake8 config

2021-05-27 Thread John Snow
e excluded anyway. A forthcoming commit canonizes this with a "make venv" command. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-20-js...@redhat.com Signed-off-by: John Snow --- python/setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PULL 34/44] python: move mypy.ini into setup.cfg

2021-05-27 Thread John Snow
mypy supports reading its configuration values from a central project configuration file; do so. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-22-js...@redhat.com Signed-off-by: John Snow --- python/mypy.ini | 4 python/setup.cfg | 5 + 2 files

[PULL 37/44] python/qemu: add isort to pipenv

2021-05-27 Thread John Snow
t; mode) with 'isort -c qemu' from the python root. isort can also be used to fix/rewrite import order automatically by using 'isort qemu'. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-25-js...@redhat.com Signed-off-by: John Snow --- python/Pipfile | 1

[PULL 35/44] python: add mypy to pipenv

2021-05-27 Thread John Snow
mechanisms in mypy slightly, and it will fail. See https://github.com/python/mypy/issues/8584 for a decent entry point with more breadcrumbs on the various behaviors that contribute to this subtle difference. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa

[PULL 30/44] python: add pylint to pipenv

2021-05-27 Thread John Snow
onsider-using-with' warning that must be disabled in some cases. These pragmas cause warnings themselves in 2.7.x. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-id: 20210527211715.394144-18-js...@redhat.com Signed

[PULL 28/44] python: add pylint import exceptions

2021-05-27 Thread John Snow
that are too old for features we want in isort and mypy. Oh well. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-16-js...@redhat.com Signed-off-by: John Snow --- python/qemu/machine/__init__.py | 3 +++ python/qemu/machine/machine.py | 2 +- python/qemu

[PULL 26/44] python: add MANIFEST.in

2021-05-27 Thread John Snow
as by the tooling needed to upload packages to PyPI. Exclude the 'README.rst' file -- that's intended as a guidebook to our source tree, not a file that needs to be distributed. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa Message-id

[PULL 24/44] python: add VERSION file

2021-05-27 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-12-js...@redhat.com Signed-off-by: John Snow --- python/VERSION | 1 + python/setup.cfg | 1 + 2 files changed, 2 insertions(+) create mode 100644 python/VERSION diff --git a/python/VERSION b/python/VERSION new

[PULL 22/44] python: create qemu packages

2021-05-27 Thread John Snow
ry classes are available directly from "qemu.qmp" instead of "qemu.qmp.qmp". Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-10-js...@redhat.com Signed-off-by: John Snow --- python/{qemu => }/.isort.cfg

[PULL 27/44] python: Add pipenv support

2021-05-27 Thread John Snow
t of packages that were known to operate correctly. This latter file provides the real value for easy setup of container images and CI environments. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-15-js...@redhat.com Signed-off-by: John Snow --- python/RE

[PULL 23/44] python: add qemu package installer

2021-05-27 Thread John Snow
his matter: https://github.com/pypa/packaging-problems/issues/256 https://github.com/pypa/pip/issues/6334 https://github.com/pypa/pip/issues/6375 https://github.com/pypa/pip/issues/6434 https://github.com/pypa/pip/issues/6438 Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy

[PULL 44/44] gitlab: add python linters to CI

2021-05-27 Thread John Snow
with a warning. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alex Bennée Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-32-js...@redhat.com [Fix rebase conflict over .gitlab-ci.yml --js] Signed-off-by: John Snow --- .gitlab-ci.d/containers.yml

[PULL 20/44] python/machine: Trim line length to below 80 chars

2021-05-27 Thread John Snow
One more little delinting fix that snuck in. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-8-js...@redhat.com Signed-off-by: John Snow --- python/qemu/machine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PULL 19/44] python/machine: disable warning for Popen in _launch()

2021-05-27 Thread John Snow
We handle this resource rather meticulously in shutdown/kill/wait/__exit__ et al, through the laborious mechanisms in _do_shutdown(). Quiet this pylint warning here. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-7-js...@redhat.com Message-id

[PULL 21/44] iotests/297: add --namespace-packages to mypy arguments

2021-05-27 Thread John Snow
mypy is kind of weird about how it handles imports. For legacy reasons, it won't load PEP 420 namespaces, because of logic implemented prior to that becoming a standard. So, if you plan on using any, you have to pass --namespace-packages. Alright, fine. Signed-off-by: John Snow Reviewed

[PULL 17/44] python/console_socket: Add a pylint ignore

2021-05-27 Thread John Snow
We manage cleaning up this resource ourselves. Pylint should shush. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-5-js...@redhat.com Message-id: 20210517184808.3562549-5-js...@redhat.com Signed-off-by: John Snow --- python/qemu/console_socket.py | 1 + 1

[PULL 18/44] python/machine: Disable pylint warning for open() in _pre_launch

2021-05-27 Thread John Snow
call to shutdown(), and therefore also on __exit__. Signed-off-by: John Snow Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-6-js...@redhat.com Message-id: 20210517184808.3562549-6-js...@redhat.com Signed-off-by: John Snow --- python/qemu

[PULL 16/44] python/machine: use subprocess.run instead of subprocess.Popen

2021-05-27 Thread John Snow
use run() instead of Popen() -- to assert to pylint that we are not forgetting to close a long-running program. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-id: 20210527211715.394144-4-js...@redhat.com Message-id: 20210517184808.3562549-4-js...@redhat.com

[PULL 39/44] python: add devel package requirements to setuptools

2021-05-27 Thread John Snow
lopment dependencies are not already met. This can be useful for automated build scripts where fetching network packages may be undesirable. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-27-js...@redhat.com Signed-off-by: John Snow --- python/PACKAGE.rs

[PULL 36/44] python: move .isort.cfg into setup.cfg

2021-05-27 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-24-js...@redhat.com Signed-off-by: John Snow --- python/.isort.cfg | 7 --- python/setup.cfg | 8 2 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 python/.isort.cfg diff --git

[PULL 29/44] python: move pylintrc into setup.cfg

2021-05-27 Thread John Snow
Delete the empty settings now that it's sharing a home with settings for other tools. pylint can now be run from this folder as "pylint qemu". Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-id: 20210527211715.394144-17-js...@redhat.com Signed-of

[PULL 15/44] python/machine: use subprocess.DEVNULL instead of open(os.path.devnull)

2021-05-27 Thread John Snow
One less file resource to manage, and it helps quiet some pylint >= 2.8.0 warnings about not using a with-context manager for the open call. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-3-js...@redhat.com Message

[PULL 09/44] tests/acceptance/virtiofs_submounts.py: remove launch_vm()

2021-05-27 Thread John Snow
Message-Id: <20210412044644.55083-9-cr...@redhat.com> Signed-off-by: John Snow --- tests/acceptance/virtiofs_submounts.py | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py index e019d

[PULL 07/44] Acceptance Tests: make username/password configurable

2021-05-27 Thread John Snow
-by: Eric Auger Reviewed-by: Willian Rampazzo Message-Id: <20210412044644.55083-7-cr...@redhat.com> Signed-off-by: John Snow --- tests/acceptance/avocado_qemu/__init__.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b

[PULL 25/44] python: add directory structure README.rst files

2021-05-27 Thread John Snow
. They are not designed for inclusion in a published manual. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210527211715.394144-13-js...@redhat.com Signed-off-by: John Snow --- python/README.rst | 41 ++ python/qemu/README.rst

[PULL 13/44] acceptance tests: bump Avocado version to 88.1

2021-05-27 Thread John Snow
e 'encode'". The release notes are available at https://avocado-framework.readthedocs.io/en/latest/releases/88_0.html. Signed-off-by: Willian Rampazzo Message-Id: <20210520204747.210764-2-willi...@redhat.com> Acked-by: Cleber Rosa Signed-off-by: John Snow --- tests/requirements.txt

[PULL 14/44] python/console_socket: avoid one-letter variable

2021-05-27 Thread John Snow
Fixes pylint warnings. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210527211715.394144-2-js...@redhat.com Message-id: 20210517184808.3562549-2-js...@redhat.com Signed-off-by: John Snow --- python/qemu/console_socket.py | 10

[PULL 12/44] tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkey

2021-05-27 Thread John Snow
chetta Signed-off-by: John Snow --- tests/acceptance/virtiofs_submounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py index d77ee356740..21ad7d792e7 100644 --- a/tests/acce

[PULL 11/44] Acceptance Tests: introduce CPU hotplug test

2021-05-27 Thread John Snow
qmp) and with the Linux guest via SSH. Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Willian Rampazzo Reviewed-by: Eric Auger Message-Id: <20210412044644.55083-11-cr...@redhat.com> Signed-off-by: John Snow --- tests/acceptance/hotplug_cpu.p

[PULL 08/44] Acceptance Tests: set up SSH connection by default after boot for LinuxTest

2021-05-27 Thread John Snow
Message-Id: <20210412044644.55083-8-cr...@redhat.com> Signed-off-by: John Snow --- tests/acceptance/avocado_qemu/__init__.py | 5 - tests/acceptance/boot_linux.py| 18 +- tests/acceptance/virtiofs_submounts.py| 1 - 3 files changed, 13 insertions(+), 11 del

[PULL 10/44] Acceptance Tests: add basic documentation on LinuxTest base class

2021-05-27 Thread John Snow
From: Cleber Rosa Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Willian Rampazzo Reviewed-by: Eric Auger Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20210412044644.55083-10-cr...@redhat.com> Signed-off-by: John Snow --- docs/devel/testing.rs

[PULL 06/44] Acceptance Tests: add port redirection for ssh by default

2021-05-27 Thread John Snow
-by: Eric Auger Reviewed-by: Willian Rampazzo Message-Id: <20210412044644.55083-6-cr...@redhat.com> Signed-off-by: John Snow --- tests/acceptance/avocado_qemu/__init__.py | 5 - tests/acceptance/virtiofs_submounts.py| 4 2 files changed, 4 insertions(+), 5 deletions(-) diff

[PULL 05/44] Acceptance Tests: move useful ssh methods to base class

2021-05-27 Thread John Snow
083-5-cr...@redhat.com> Signed-off-by: John Snow --- tests/acceptance/avocado_qemu/__init__.py | 48 ++- tests/acceptance/linux_ssh_mips_malta.py | 40 ++- tests/acceptance/virtiofs_submounts.py| 37 - 3 files changed, 50 insertions(

[PULL 04/44] Python: add utility function for retrieving port redirection

2021-05-27 Thread John Snow
le to host the utility function and a test. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Eric Auger Reviewed-by: Willian Rampazzo Message-Id: <20210412044644.55083-4-cr...@redhat.com> Signed-off-by: John Snow --- python/qemu/utils.py

[PULL 01/44] Python: expose QEMUMachine's temporary directory

2021-05-27 Thread John Snow
-off-by: Cleber Rosa Message-Id: <20210211220146.2525771-3-cr...@redhat.com> Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Cleber Rosa Signed-off-by: John Snow --- python/qemu/machine.py| 24 python/qemu/qtest.py | 6 +++--- tests/qemu-iot

[PULL 03/44] tests/acceptance/virtiofs_submounts.py: evaluate string not length

2021-05-27 Thread John Snow
readability a bit. Signed-off-by: Cleber Rosa Reviewed-by: Beraldo Leal Reviewed-by: Eric Auger Reviewed-by: Willian Rampazzo Message-Id: <20210412044644.55083-3-cr...@redhat.com> Signed-off-by: John Snow --- tests/acceptance/virtiofs_submounts.py | 2 +- 1 file changed, 1 insertion(+), 1 de

[PULL 02/44] tests/acceptance/virtiofs_submounts.py: add missing accel tag

2021-05-27 Thread John Snow
From: Cleber Rosa The tag is useful to select tests that depend/use a particular feature. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Reviewed-by: Eric Auger Message-Id: <20210412044644.55083-2-cr...@redhat.com> Signed-off-by: Joh

[PULL 00/44] Python patches

2021-05-27 Thread John Snow
tion by default after boot for LinuxTest tests/acceptance/virtiofs_submounts.py: remove launch_vm() Acceptance Tests: add basic documentation on LinuxTest base class Acceptance Tests: introduce CPU hotplug test tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkey John Snow (31): py

[PATCH v8 30/31] python: add tox support

2021-05-27 Thread John Snow
e code should be amended to work around the issue. With confidence that the tests pass on 3.6 through 3.10 inclusive, add the appropriate classifiers to setup.cfg to indicate which versions we claim to support. Tox 3.18.0 or above is required to use the 'allowlist_externals' option. Signed-off-by: John S

[PATCH v8 28/31] python: add Makefile for some common tasks

2021-05-27 Thread John Snow
elete miscellaneous python packaging output possibly created by pipenv, pip, or other python packaging utilities make distclean: delete the above, the .venv, and the editable "qemu" package forwarder (qemu.egg-info) if there is one. Signed-off-by: John Snow Reviewed-by: Cleber Ros

[PATCH v8 26/31] python: add devel package requirements to setuptools

2021-05-27 Thread John Snow
lopment dependencies are not already met. This can be useful for automated build scripts where fetching network packages may be undesirable. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/PACKAGE.rst | 4 python/README.rst | 4 python/Pipfile | 5 + pyth

[PATCH v8 29/31] python: add .gitignore

2021-05-27 Thread John Snow
) Ignore .idea (pycharm) .vscode, and .venv (pipenv et al). Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa --- python/.gitignore | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 python/.gitignore diff --git a/python

[PATCH v8 23/31] python: move .isort.cfg into setup.cfg

2021-05-27 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/.isort.cfg | 7 --- python/setup.cfg | 8 2 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 python/.isort.cfg diff --git a/python/.isort.cfg b/python/.isort.cfg deleted file mode 100644 index

[PATCH v8 31/31] gitlab: add python linters to CI

2021-05-27 Thread John Snow
with a warning. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alex Bennée Reviewed-by: Cleber Rosa --- .gitlab-ci.d/containers.yml| 5 + .gitlab-ci.yml | 24 tests/docker/dockerfiles/python.docker

[PATCH v8 25/31] python/qemu: add qemu package itself to pipenv

2021-05-27 Thread John Snow
are installed in 'editable' mode; all changes made to the python package inside the git tree will be reflected in the installed package without reinstallation. This includes changes made via git pull and so on. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python

[PATCH v8 27/31] python: add avocado-framework and tests

2021-05-27 Thread John Snow
ect arguments. (A forthcoming commit adds the much easier 'make check'.) Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/README.rst | 2 ++ python/Pipfile.lock| 8 python/avocado.cfg | 10 ++ python/setup.cfg | 1 + python/tests/f

[PATCH v8 17/31] python: add pylint to pipenv

2021-05-27 Thread John Snow
onsider-using-with' warning that must be disabled in some cases. These pragmas cause warnings themselves in 2.7.x. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfi

[PATCH v8 22/31] python: add mypy to pipenv

2021-05-27 Thread John Snow
mechanisms in mypy slightly, and it will fail. See https://github.com/python/mypy/issues/8584 for a decent entry point with more breadcrumbs on the various behaviors that contribute to this subtle difference. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile

[PATCH v8 20/31] python: Add flake8 to pipenv

2021-05-27 Thread John Snow
flake8 3.5.x does not support the --extend-ignore syntax used in the .flake8 file to gracefully extend default ignores, so 3.6.x is our minimum requirement. There is no known upper bound. flake8 can be run from the python/ directory with no arguments. Signed-off-by: John Snow Reviewed

[PATCH v8 19/31] python: add excluded dirs to flake8 config

2021-05-27 Thread John Snow
e excluded anyway. A forthcoming commit canonizes this with a "make venv" command. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/setup.cfg b/python/setup.cfg index 52a89a0a290..9aeab2bb0d3 100644 --

[PATCH v8 21/31] python: move mypy.ini into setup.cfg

2021-05-27 Thread John Snow
mypy supports reading its configuration values from a central project configuration file; do so. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/mypy.ini | 4 python/setup.cfg | 5 + 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 python/mypy.ini

[PATCH v8 15/31] python: add pylint import exceptions

2021-05-27 Thread John Snow
that are too old for features we want in isort and mypy. Oh well. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/qemu/machine/__init__.py | 3 +++ python/qemu/machine/machine.py | 2 +- python/qemu/machine/qtest.py| 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff

[PATCH v8 24/31] python/qemu: add isort to pipenv

2021-05-27 Thread John Snow
t; mode) with 'isort -c qemu' from the python root. isort can also be used to fix/rewrite import order automatically by using 'isort qemu'. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(

[PATCH v8 18/31] python: move flake8 config to setup.cfg

2021-05-27 Thread John Snow
Update the comment concerning the flake8 exception to match commit 42c0dd12, whose commit message stated: A note on the flake8 exception: flake8 will warn on *any* bare except, but pylint's is context-aware and will suppress the warning if you re-raise the exception. Signed-off-by: John Snow

[PATCH v8 11/31] python: add VERSION file

2021-05-27 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/VERSION | 1 + python/setup.cfg | 1 + 2 files changed, 2 insertions(+) create mode 100644 python/VERSION diff --git a/python/VERSION b/python/VERSION new file mode 100644 index 000..c19f3b832b7 --- /dev/null +++ b/python/VERSION

[PATCH v8 10/31] python: add qemu package installer

2021-05-27 Thread John Snow
his matter: https://github.com/pypa/packaging-problems/issues/256 https://github.com/pypa/pip/issues/6334 https://github.com/pypa/pip/issues/6375 https://github.com/pypa/pip/issues/6434 https://github.com/pypa/pip/issues/6438 Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v8 06/31] python/machine: disable warning for Popen in _launch()

2021-05-27 Thread John Snow
We handle this resource rather meticulously in shutdown/kill/wait/__exit__ et al, through the laborious mechanisms in _do_shutdown(). Quiet this pylint warning here. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210517184808.3562549-7-js...@redhat.com Signed-off-by: John Snow

[PATCH v8 16/31] python: move pylintrc into setup.cfg

2021-05-27 Thread John Snow
Delete the empty settings now that it's sharing a home with settings for other tools. pylint can now be run from this folder as "pylint qemu". Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/qemu/machine/pyl

[PATCH v8 13/31] python: add MANIFEST.in

2021-05-27 Thread John Snow
as by the tooling needed to upload packages to PyPI. Exclude the 'README.rst' file -- that's intended as a guidebook to our source tree, not a file that needs to be distributed. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa --- python/README.rst | 2

[PATCH v8 04/31] python/console_socket: Add a pylint ignore

2021-05-27 Thread John Snow
We manage cleaning up this resource ourselves. Pylint should shush. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Message-id: 20210517184808.3562549-5-js...@redhat.com Signed-off-by: John Snow --- python/qemu/console_socket.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python

[PATCH v8 14/31] python: Add pipenv support

2021-05-27 Thread John Snow
t of packages that were known to operate correctly. This latter file provides the real value for easy setup of container images and CI environments. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/README.rst | 3 +++ python/Pipfile| 11 +++ 2 files changed, 14 insertio

[PATCH v8 12/31] python: add directory structure README.rst files

2021-05-27 Thread John Snow
. They are not designed for inclusion in a published manual. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/README.rst | 41 ++ python/qemu/README.rst | 8 +++ python/qemu/machine/README.rst | 9 python/qemu/qmp

[PATCH v8 09/31] python: create qemu packages

2021-05-27 Thread John Snow
ry classes are available directly from "qemu.qmp" instead of "qemu.qmp.qmp". Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa --- python/{qemu => }/.isort.cfg| 0 python/qemu/__init__.py | 11 ---

[PATCH v8 05/31] python/machine: Disable pylint warning for open() in _pre_launch

2021-05-27 Thread John Snow
call to shutdown(), and therefore also on __exit__. Signed-off-by: John Snow Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Message-id: 20210517184808.3562549-6-js...@redhat.com Signed-off-by: John Snow --- python/qemu/machine.py | 6 +- 1 file changed, 5 insertions(+), 1

[PATCH v8 08/31] iotests/297: add --namespace-packages to mypy arguments

2021-05-27 Thread John Snow
mypy is kind of weird about how it handles imports. For legacy reasons, it won't load PEP 420 namespaces, because of logic implemented prior to that becoming a standard. So, if you plan on using any, you have to pass --namespace-packages. Alright, fine. Signed-off-by: John Snow Reviewed

[PATCH v8 07/31] python/machine: Trim line length to below 80 chars

2021-05-27 Thread John Snow
One more little delinting fix that snuck in. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cleber Rosa --- python/qemu/machine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index

[PATCH v8 03/31] python/machine: use subprocess.run instead of subprocess.Popen

2021-05-27 Thread John Snow
use run() instead of Popen() -- to assert to pylint that we are not forgetting to close a long-running program. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-id: 20210517184808.3562549-4-js...@redhat.com Signed-off-by: John Snow --- python/qemu/machine.py

[PATCH v8 01/31] python/console_socket: avoid one-letter variable

2021-05-27 Thread John Snow
Fixes pylint warnings. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210517184808.3562549-2-js...@redhat.com Signed-off-by: John Snow --- python/qemu/console_socket.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[PATCH v8 02/31] python/machine: use subprocess.DEVNULL instead of open(os.path.devnull)

2021-05-27 Thread John Snow
One less file resource to manage, and it helps quiet some pylint >= 2.8.0 warnings about not using a with-context manager for the open call. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cleber Rosa Message-id: 20210517184808.3562549-3-js...@redhat.com Signed-

[PATCH v8 00/31] python: create installable package

2021-05-27 Thread John Snow
hon-add-avocado-framework# [RB] CR [TB] CR [SOB] JS [28] python-add-makefile-for-some# [RB] CR [TB] CR [SOB] JS [29] python-add-gitignore# [RB] CR,VS [SOB] JS [30] python-add-tox-support # [RB] CR [TB] CR [SOB] JS [31] gitlab-add-python-linters-to# [RB] AB,CR,VS [SOB] JS `

<    8   9   10   11   12   13   14   15   16   17   >