[PATCH v2 1/1] Jobs based on custom runners: add CentOS Stream 8

2021-11-11 Thread Cleber Rosa
built with the given configuration (point II) under the given OS build environment (point I) should be subjected to. IV) Job definition: GitLab CI jobs that will dispatch the build/test jobs (see points #II and #III) to the machine specifically configured according to #I. Signed-off

[PATCH v2 0/1] Jobs based on custom runners: add CentOS Stream 8

2021-11-11 Thread Cleber Rosa
D of c8s-stream-rhel branch) from CentOS repo at https://git.centos.org/rpms/qemu-kvm/. * Further separated distribution version and architecture specific files into separate sub directories. * Added a gitlab CI rule and variable to allow other repos/users who have a CentOS Stream 8 x86_

Re: [PATCH 4/9] tests/acceptance: Extract image_expand() helper

2021-07-13 Thread Cleber Rosa
Philippe Mathieu-Daudé writes: > To be able to expand an image to a non-power-of-2 value, > extract image_expand() from image_pow2ceil_expand(). > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/acceptance/boot_linux_console.py | 14 +- > 1 file changed, 9 insertions(+), 5 de

Re: [PATCH 3/9] tests/acceptance: Tag NetBSD tests as 'os:netbsd'

2021-07-13 Thread Cleber Rosa
é > --- > tests/acceptance/boot_linux_console.py | 1 + > tests/acceptance/ppc_prep_40p.py | 2 ++ > 2 files changed, 3 insertions(+) Reviewed-by: Cleber Rosa Phil, I can ammend the commit message and queue this one if you think it's a good idea. Cheers, - Cleber.

Re: [PATCH 4/4] Jobs based on custom runners: add CentOS Stream 8

2021-06-09 Thread Cleber Rosa Junior
On Tue, Jun 8, 2021 at 10:10 AM Cleber Rosa wrote: > > This introduces three different parts of a job designed to run > on a custom runner managed by Red Hat. The goals include: > > a) serve as a model for other organizations that want to onboard > their own runners, w

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

2021-06-08 Thread Cleber Rosa Junior
On Tue, Jun 8, 2021 at 5:42 PM Wainer dos Santos Moschetta < waine...@redhat.com> wrote: > Hi, > > On 6/8/21 11:09 AM, Cleber Rosa wrote: > > Which can be used to check for any "feature" that is available as a > > QEMU command line option, and that will ret

[PATCH 4/4] Jobs based on custom runners: add CentOS Stream 8

2021-06-08 Thread Cleber Rosa
to #1. Signed-off-by: Cleber Rosa --- .gitlab-ci.d/custom-runners.yml| 29 scripts/ci/org.centos/stream/README| 2 + scripts/ci/org.centos/stream/configure | 190 + scripts/ci/setup/build-environment.yml | 38 + 4 files changed, 259 insertions(

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

2021-06-08 Thread Cleber Rosa
ned-off-by: Cleber Rosa --- python/qemu/utils/__init__.py | 2 ++ python/qemu/utils/accel.py| 15 ++-- python/qemu/utils/feature.py | 44 +++ 3 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 python/qemu/utils/feature.py diff --git a/p

[PATCH 3/4] Acceptance Tests: introduce method to require a feature and option

2021-06-08 Thread Cleber Rosa
remote" (option) machine type (feature). This example is actually applied here to the reespective test, given that the option is conditionally built, and the test will ERROR without it. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 29 +

[PATCH 1/4] block.c: fix compilation error on possible unitialized variable

2021-06-08 Thread Cleber Rosa
GCC from CentOS Stream 8 is erroring out on a possibily unitialized varible. Full version info for the compiler used: gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-1) Signed-off-by: Cleber Rosa --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index

[PATCH 0/4] Jobs based on custom runners: add CentOS Stream 8

2021-06-08 Thread Cleber Rosa
e. Once its reliability is proved (rules and service levels are to be determined), that can be reverted. Even though the formal method of tracking machine/job maintainers have not been formalized, it should be known that the contacts/admins for this machine and job are: - Cleber Rosa

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

2021-05-27 Thread Cleber Rosa
gt; b/tests/docker/dockerfiles/python.docker > new file mode 100644 > index 000..56d88417df4 > --- /dev/null > +++ b/tests/docker/dockerfiles/python.docker > @@ -0,0 +1,18 @@ > +# Python library testing environment > + > +FROM fedora:latest > +MAINTAINER John Snow > + > +# Please keep this list sorted alphabetically > +ENV PACKAGES \ > +gcc \ Now with this question answered, with or without the suggestion above: Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

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

2021-05-27 Thread Cleber Rosa
On Thu, May 27, 2021 at 12:17:36PM -0400, Cleber Rosa wrote: > On Wed, May 26, 2021 at 03:56:31PM -0400, John Snow wrote: > > On 5/26/21 2:47 PM, Vladimir Sementsov-Ogievskiy wrote: > > > > build requisite for PyPI packages in the event that PyPI only has a > > >

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

2021-05-27 Thread Cleber Rosa
(default, Aug 19 2020, 00:00:00) [GCC 9.3.1 20200408 (Red Hat 9.3.1-2)] Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

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

2021-05-27 Thread Cleber Rosa
hat needs to be distributed. > > Signed-off-by: John Snow > --- > python/README.rst | 2 ++ > python/MANIFEST.in | 3 +++ > 2 files changed, 5 insertions(+) > create mode 100644 python/MANIFEST.in > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v7 09/31] python: create qemu packages

2021-05-27 Thread Cleber Rosa
rename python/qemu/{ => machine}/qtest.py (99%) > rename python/qemu/{qmp.py => qmp/__init__.py} (96%) > rename python/qemu/{utils.py => utils/__init__.py} (66%) > rename python/qemu/{ => utils}/accel.py (100%) > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

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

2021-05-27 Thread Cleber Rosa
ongnu.org > +url = https://www.qemu.org/ > +download_url = https://www.qemu.org/download/ > +description = QEMU Python Build, Debug and SDK tooling. > +long_description = file:PACKAGE.rst > +long_description_content_type = text/x-rst > +classifiers = > +Development Stat

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

2021-05-27 Thread Cleber Rosa
On Wed, May 26, 2021 at 03:56:31PM -0400, John Snow wrote: > On 5/26/21 2:47 PM, Vladimir Sementsov-Ogievskiy wrote: > > > build requisite for PyPI packages in the event that PyPI only has a > > > sdist and not a bdist for a given dependency during installation. > > > > i.e. some packages are comp

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

2021-05-27 Thread Cleber Rosa
On Tue, May 25, 2021 at 08:24:30PM -0400, John Snow wrote: > One more little delinting fix that snuck in. > > Signed-off-by: John Snow > --- > python/qemu/machine.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v7 29/31] python: add .gitignore

2021-05-27 Thread Cleber Rosa
> > Signed-off-by: John Snow > > --- > > python/.gitignore | 15 +++ > > 1 file changed, 15 insertions(+) > > create mode 100644 python/.gitignore Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 23/25] python: add .gitignore

2021-05-25 Thread Cleber Rosa
On Tue, May 25, 2021 at 04:10:55PM -0400, John Snow wrote: > On 5/25/21 3:36 PM, Cleber Rosa wrote: > > On Wed, May 12, 2021 at 07:12:39PM -0400, John Snow wrote: > > > Ignore *Python* build and package output (build, dist, qemu.egg-info); > > > these files are not crea

Re: [PATCH v6 25/25] python: add tox support

2021-05-25 Thread Cleber Rosa
On Tue, May 25, 2021 at 04:25:37PM -0400, John Snow wrote: > On 5/25/21 4:15 PM, Cleber Rosa wrote: > > On Wed, May 12, 2021 at 07:12:41PM -0400, John Snow wrote: > > > This is intended to be a manually run, non-CI script. > > > > > > Use tox to test the lint

Re: [PATCH v6 22/25] python: add Makefile for some common tasks

2021-05-25 Thread Cleber Rosa
On Tue, May 25, 2021 at 03:45:26PM -0400, John Snow wrote: > On 5/25/21 3:24 PM, Cleber Rosa wrote: > > On Wed, May 12, 2021 at 07:12:38PM -0400, John Snow wrote: > > > Add "make venv" to create the pipenv-managed virtual environment that > > > contai

Re: [PATCH v6 20/25] python: add devel package requirements to setuptools

2021-05-25 Thread Cleber Rosa
On Tue, May 25, 2021 at 01:43:42PM -0400, John Snow wrote: > On 5/25/21 12:13 PM, Cleber Rosa wrote: > > On Wed, May 12, 2021 at 07:12:36PM -0400, John Snow wrote: > > > setuptools doesn't have a formal understanding of development requires, > > > but it has an

Re: [PATCH v6 18/25] python/qemu: add isort to pipenv

2021-05-25 Thread Cleber Rosa
On Tue, May 25, 2021 at 01:21:25PM -0400, John Snow wrote: > On 5/25/21 11:56 AM, Cleber Rosa wrote: > > On Wed, May 12, 2021 at 07:12:34PM -0400, John Snow wrote: > > > isort 5.0.0 through 5.0.4 has a bug that causes it to misinterpret > > > certain "from ...&

Re: [PATCH v6 06/25] python: add directory structure README.rst files

2021-05-25 Thread Cleber Rosa
On Tue, May 25, 2021 at 01:14:50PM -0400, John Snow wrote: > On 5/24/21 10:33 PM, Cleber Rosa wrote: > > On Wed, May 12, 2021 at 07:12:22PM -0400, John Snow wrote: > > > Add short readmes to python/, python/qemu/, python/qemu/machine, > > > python/qemu/qmp, and python/

Re: [PATCH v6 25/25] python: add tox support

2021-05-25 Thread Cleber Rosa
ot;allow_failure" tox based CI job. Other than those suggestions, this LGTM! Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 24/25] gitlab: add python linters to CI

2021-05-25 Thread Cleber Rosa
prefer having a different container image for this job. Because it would: 1. Be super simple (FROM fedora:33 / dnf -y install python3.6 pipenv) 2. Not carry all this unnecessary baggage 3. Not risk building QEMU with Python 3.6 (suppose the ./configure probe changes unintentionally) But, AFA

Re: [PATCH v6 23/25] python: add .gitignore

2021-05-25 Thread Cleber Rosa
On Wed, May 12, 2021 at 07:12:39PM -0400, John Snow wrote: > Ignore *Python* build and package output (build, dist, qemu.egg-info); > these files are not created as part of a QEMU build. > > Ignore miscellaneous cached python confetti (__pycache__, *.pyc, > .mypy_cache). > > Ignore .idea (pycharm

Re: [PATCH v6 22/25] python: add Makefile for some common tasks

2021-05-25 Thread Cleber Rosa
t; +.venv: Pipfile.lock > + @PIPENV_VENV_IN_PROJECT=1 pipenv sync --dev --keep-outdated > + @touch .venv > + > +venv-check: venv > + @pipenv run make check > + > +develop: > + pip3 install -e .[devel] > + > +check: > + @avocado --config avocado.cfg run tests/ > + > +clean: > + rm -rf build/ dist/ > + Usually `python3 setup.py clean --all` would be the better choice here, but, it doesn't clean `dist/`, so I'm OK with this. > +distclean: clean > + rm -rf qemu.egg-info/ .venv/ > -- > 2.30.2 > > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 21/25] python: add avocado-framework and tests

2021-05-25 Thread Cleber Rosa
sults/job-2021-05-25T14.56-b27b48e/job.log (1/4) tests/flake8.sh: PASS (0.67 s) (2/4) tests/isort.sh: PASS (0.37 s) (3/4) tests/mypy.sh: PASS (0.39 s) (4/4) tests/pylint.sh: PASS (4.85 s) RESULTS: PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 6.75 s Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 15/25] python: move mypy.ini into setup.cfg

2021-05-25 Thread Cleber Rosa
nged, 5 insertions(+), 4 deletions(-) > delete mode 100644 python/mypy.ini Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 13/25] python: add excluded dirs to flake8 config

2021-05-25 Thread Cleber Rosa
pt checks to flake8's > +exclude = __pycache__, > + .venv, > Given that the default set of exclusions (version control system files) are not expected here, it LGTM to reset it with these. Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 20/25] python: add devel package requirements to setuptools

2021-05-25 Thread Cleber Rosa
ntation section perhaps). > Signed-off-by: John Snow > --- > python/Pipfile | 5 + > python/Pipfile.lock | 14 +- > python/setup.cfg| 9 +++++ > 3 files changed, 19 insertions(+), 9 deletions(-) > Either way, Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 18/25] python/qemu: add isort to pipenv

2021-05-25 Thread Cleber Rosa
rt > statements correctly. > > Require 5.1.2 or greater. > > isort can be run with 'isort -c qemu' from the python root. > > Signed-off-by: John Snow > --- > python/Pipfile | 1 + > python/Pipfile.lock | 4 ++-- > 2 files changed, 3 insertions(+), 2 dele

Re: [PATCH v6 11/25] python: add pylint to pipenv

2021-05-24 Thread Cleber Rosa
Works as expected: $ pipenv run pylint --version pylint 2.7.2 astroid 2.5.2 Python 3.6.13 (default, Feb 25 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 07/25] python: add MANIFEST.in

2021-05-24 Thread Cleber Rosa
les changed, 4 insertions(+) > create mode 100644 python/MANIFEST.in > I was about to propose mypy.ini to be included here, but given that it's merged into setup.cfg later in this series: Reviewed-by: Cleber Rosa --- Note to self (and to you) when generating the sdist, I get:

Re: [PATCH v6 06/25] python: add directory structure README.rst files

2021-05-24 Thread Cleber Rosa
/python/qemu/utils/README.rst > @@ -0,0 +1,7 @@ > +qemu.utils package > +====== > + > +This package provides miscellaneous utilities used for testing and > +debugging QEMU. It is used primarily by the vm and acceptance tests. > + > +See the documentation in ``__init__.py`` for more information. > -- > 2.30.2 > > With the ``setup.py`` and ``setuptools`` for consistency sake mentioned in my first comment, all other comments are suggestions, so: Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 04/25] python: add qemu package installer

2021-05-20 Thread Cleber Rosa
itable mode: /home/cleber/src/qemu/python On pip 21.1.1: $ pip install -e . Obtaining file:///home/cleber/src/qemu/python Installing collected packages: qemu Running setup.py develop for qemu Successfully installed qemu-0.0.0 Side note: The "Running setup.py ..." message given by pip 21.1.1, even though there is *not* a "setup.py" is rather confusing. Anyway, we may be able to drop setup.py either when we find pip 21.1.1 or later in our "common build environments", or if we require people hacking on the Python module to "pip install --upgrade pip". I'll be repeating myself here, but I believe you made the right choices at this time, and based on my testing I can successfully install/develop using "python setup.py" and "pip", so: Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v6 03/25] python: create utils sub-package

2021-05-18 Thread Cleber Rosa
arch64vm.py | 2 +- > tests/vm/basevm.py| 3 ++- > 7 files changed, 29 insertions(+), 13 deletions(-) > create mode 100644 python/qemu/utils/__init__.py > rename python/qemu/{machine => utils}/accel.py (100%) > As you mentioned in the previous patc

Re: [PATCH v6 02/25] python: create qemu packages

2021-05-18 Thread Cleber Rosa
/qemu/{ => machine}/pylintrc (100%) > rename python/qemu/{ => machine}/qtest.py (99%) > rename python/qemu/{qmp.py => qmp/__init__.py} (96%) > Hi John, Thanks for this! I went through it and it LGTM. I've tested it with iotests, acceptance and with a vm-build-fedora. Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 08/24] python: Add pipenv support

2021-02-17 Thread Cleber Rosa
On Wed, Feb 17, 2021 at 12:28:22PM -0500, John Snow wrote: > On 2/16/21 10:02 PM, Cleber Rosa wrote: > > On Tue, Feb 16, 2021 at 09:59:47PM -0500, Cleber Rosa wrote: > > > On Thu, Feb 11, 2021 at 01:58:40PM -0500, John Snow wrote: > > > > pipenv is a tool used for

Re: [PATCH v4 18/24] python/qemu: add qemu package itself to pipenv

2021-02-16 Thread Cleber Rosa
changes made > via git pull and so on. > > Signed-off-by: John Snow > --- > python/Pipfile | 1 + > python/Pipfile.lock | 9 +++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 17/24] python/qemu: add isort to pipenv

2021-02-16 Thread Cleber Rosa
x27; from the python root. > > Signed-off-by: John Snow > Reviewed-by: Philippe Mathieu-Daudé > --- > python/Pipfile | 1 + > python/Pipfile.lock | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 16/24] python: move .isort.cfg into setup.cfg

2021-02-16 Thread Cleber Rosa
On Thu, Feb 11, 2021 at 01:58:48PM -0500, John Snow wrote: > 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 > Reviewed-by: Cleber

Re: [PATCH v4 15/24] python: add mypy to pipenv

2021-02-16 Thread Cleber Rosa
Signed-off-by: John Snow > --- > python/Pipfile | 1 + > python/Pipfile.lock | 37 - > python/setup.cfg| 1 + > 3 files changed, 38 insertions(+), 1 deletion(-) > With that change, Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 13/24] python: Add flake8 to pipenv

2021-02-16 Thread Cleber Rosa
from the python/ directory with no arguments. > > Signed-off-by: John Snow > --- > python/Pipfile | 1 + > python/Pipfile.lock | 51 - > 2 files changed, 51 insertions(+), 1 deletion(-) > Reviewed-by: Cleber Rosa Tested-by: Cleb

Re: [PATCH v4 12/24] python: move flake8 config to setup.cfg

2021-02-16 Thread Cleber Rosa
nd will suppress the warning if you > re-raise the exception. > > Signed-off-by: John Snow > --- > python/qemu/machine/.flake8 | 2 -- > python/setup.cfg| 3 +++ > 2 files changed, 3 insertions(+), 2 deletions(-) > delete mode 100644 python/qemu

Re: [PATCH v4 11/24] python: add pylint to pipenv

2021-02-16 Thread Cleber Rosa
n pip freeze astroid==2.4.2 isort==5.7.0 lazy-object-proxy==1.4.3 mccabe==0.6.1 pylint==2.6.0 six==1.15.0 toml==0.10.2 typed-ast==1.4.2 wrapt==1.12.1 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 00/24] python: create installable package

2021-02-16 Thread Cleber Rosa
On Mon, Feb 15, 2021 at 04:32:29PM -0500, John Snow wrote: > On 2/11/21 9:52 PM, Cleber Rosa wrote: > > On Thu, Feb 11, 2021 at 01:58:32PM -0500, John Snow wrote: > > > This series factors the python/qemu directory as an installable > > > package. It does not yet actua

Re: [PATCH v4 10/24] python: move pylintrc into setup.cfg

2021-02-16 Thread Cleber Rosa
> python/qemu/machine/pylintrc | 58 > python/setup.cfg | 29 ++ > 2 files changed, 29 insertions(+), 58 deletions(-) > delete mode 100644 python/qemu/machine/pylintrc > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 09/24] python: add pylint import exceptions

2021-02-16 Thread Cleber Rosa
ne.py | 2 +- > python/qemu/machine/qtest.py| 2 +- > 3 files changed, 5 insertions(+), 2 deletions(-) > I can see your struggle on those issues, so I choose not to punish myself attempting to replicate them. I'll forever trust you in these matters. Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 08/24] python: Add pipenv support

2021-02-16 Thread Cleber Rosa
On Tue, Feb 16, 2021 at 09:59:47PM -0500, Cleber Rosa wrote: > On Thu, Feb 11, 2021 at 01:58:40PM -0500, John Snow wrote: > > pipenv is a tool used for managing virtual environments with pinned, > > explicit dependencies. It is used for precisely recreating python > >

Re: [PATCH v4 08/24] python: Add pipenv support

2021-02-16 Thread Cleber Rosa
e real value for easy setup of container images > and CI environments. > > Signed-off-by: John Snow > --- > python/Pipfile | 11 +++ > 1 file changed, 11 insertions(+) > create mode 100644 python/Pipfile > Other than that, Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 07/24] python: add directory structure README.rst files

2021-02-16 Thread Cleber Rosa
On Thu, Feb 11, 2021 at 01:58:39PM -0500, John Snow wrote: > Add short readmes to python/, python/qemu/, python/qemu/machine, > python/qemu/qmp, and python/qemu/utils that explain the directory > hierarchy. These readmes are visible when browsing the source on > e.g. gitlab/github and are designed

Re: [PATCH v4 06/24] python: add VERSION file

2021-02-16 Thread Cleber Rosa
hn Snow > --- > python/VERSION | 1 + > python/setup.cfg | 1 + > 2 files changed, 2 insertions(+) > create mode 100644 python/VERSION > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 05/24] python: add qemu package installer

2021-02-16 Thread Cleber Rosa
On Thu, Feb 11, 2021 at 01:58:37PM -0500, John Snow wrote: > Add setup.cfg and setup.py, necessary for installing a package via > pip. Add a rst document explaining the basics of what this package is Nitpick 1: setup.cfg and setup.py are indeed used by pip, your statement is correct. But, it hide

Re: [PATCH v4 04/24] python: create utils sub-package

2021-02-16 Thread Cleber Rosa
d185..824cf03d5f4 100644 > --- a/tests/acceptance/boot_linux.py > +++ b/tests/acceptance/boot_linux.py > @@ -12,7 +12,7 @@ > > from avocado_qemu import Test, BUILD_DIR > > -from qemu.machine import kvm_available, tcg_available > +from qemu.utils import kvm_available, tcg_available > With the latest changes merged earlier Today, this won't be necessary anymore on boot_linux.py, but the equivalent change will be necessary on tests/acceptance/avocado_qemu/__init__.py. With the change mentioned above (which you would catch on a rebase): Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 1/6] Python: close the log file kept by QEMUMachine before reading it

2021-02-15 Thread Cleber Rosa
On Mon, Feb 15, 2021 at 05:04:24PM -0500, John Snow wrote: > On 2/11/21 5:01 PM, Cleber Rosa wrote: > > Closing a file that is open for writing, and then reading from it > > sounds like a better idea than the opposite, given that the content > > will be flushed. >

Re: [PATCH 1/6] Python: close the log file kept by QEMUMachine before reading it

2021-02-15 Thread Cleber Rosa
On Mon, Feb 15, 2021 at 03:30:16PM -0300, Wainer dos Santos Moschetta wrote: > Hi, > > On 2/11/21 7:01 PM, Cleber Rosa wrote: > > Closing a file that is open for writing, and then reading from it > > sounds like a better idea than the opposite, given that the conten

Re: [PATCH v4 03/24] python: create qemu packages

2021-02-11 Thread Cleber Rosa
On Thu, Feb 11, 2021 at 01:58:35PM -0500, John Snow wrote: > move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import > directives across the tree. > > This is done to create a PEP420 namespace package, in which we may > create subpackages. To do this, the namespace directory ("q

Re: [PATCH v4 02/24] iotests/297: add --namespace-packages to mypy arguments

2021-02-11 Thread Cleber Rosa
ny, you have to pass > --namespace-packages. Alright, fine. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/297 | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 01/24] python/console_socket: avoid one-letter variable

2021-02-11 Thread Cleber Rosa
On Thu, Feb 11, 2021 at 01:58:33PM -0500, John Snow wrote: > Fixes pylint warnings. > > Signed-off-by: John Snow > --- > python/qemu/console_socket.py | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v4 00/24] python: create installable package

2021-02-11 Thread Cleber Rosa
On Thu, Feb 11, 2021 at 01:58:32PM -0500, John Snow wrote: > This series factors the python/qemu directory as an installable > package. It does not yet actually change the mechanics of how any other > python source in the tree actually consumes it (yet), beyond the import > path. (some import state

Re: [PATCH 2/6] Python: expose QEMUMachine's temporary directory

2021-02-11 Thread Cleber Rosa
On Fri, Feb 12, 2021 at 12:35:26AM +0100, Philippe Mathieu-Daudé wrote: > On 2/11/21 11:01 PM, Cleber Rosa wrote: > > Each instance of qemu.machine.QEMUMachine currently has a "test > > directory", which may not have any relation to a "test", and it

[PATCH 5/6] Acceptance Tests: distinguish between temp and logs dir

2021-02-11 Thread Cleber Rosa
. Signed-off-by: Cleber Rosa --- python/qemu/machine.py| 16 ++-- tests/acceptance/avocado_qemu/__init__.py | 3 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index b379fcbe72..1f4119e2b4 100644

[PATCH 4/6] Acceptance Tests: log information when creating QEMUMachine

2021-02-11 Thread Cleber Rosa
Including its base temporary directory, given that information useful for debugging can be put there. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b

[PATCH 2/6] Python: expose QEMUMachine's temporary directory

2021-02-11 Thread Cleber Rosa
n* the QEMUMachine unique temporary directory, so that parameter name has been changed from test_dir to base_temp_dir. A property has been added to allow users to access it without using private attributes, and with that, the directory is created on first use of the property. Signed-off-by: Cleb

[PATCH 1/6] Python: close the log file kept by QEMUMachine before reading it

2021-02-11 Thread Cleber Rosa
Closing a file that is open for writing, and then reading from it sounds like a better idea than the opposite, given that the content will be flushed. Reference: https://docs.python.org/3/library/io.html#io.IOBase.close Signed-off-by: Cleber Rosa --- python/qemu/machine.py | 4 ++-- 1 file

[PATCH 0/6] Python / Acceptance Tests: improve logging

2021-02-11 Thread Cleber Rosa
used. Users will be able to find "qemu-$PID.log" files under the test log directories, containing all the stdout/stderr generated by the QEMU binary. Cleber Rosa (6): Python: close the log file kept by QEMUMachine before reading it Python: expose QEMUMachine's temporary director

[PATCH 6/6] tests/acceptance/virtio-gpu.py: preserve virtio-user-gpu log

2021-02-11 Thread Cleber Rosa
At location already prepared for keeping the test's log files. While at it, log info about its location (in the main test log file), instead of printing it out. Reference: https://avocado-framework.readthedocs.io/en/85.0/api/test/avocado.html#avocado.Test.logdir Signed-off-by: Cleber

[PATCH 3/6] Acceptance Tests: use the job work directory for created VMs

2021-02-11 Thread Cleber Rosa
ce: https://avocado-framework.readthedocs.io/en/85.0/api/test/avocado.html#avocado.Test.workdir Reference: https://avocado-framework.readthedocs.io/en/85.0/config/index.html#run-keep-tmp Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PULL 5/7] tests.acceptance: adds simple migration test

2020-11-03 Thread Cleber Rosa
On Tue, Nov 03, 2020 at 11:40:30AM +0100, Philippe Mathieu-Daudé wrote: > Hi, > > On Fri, Feb 22, 2019 at 8:42 PM Cleber Rosa wrote: > > > > From: Caio Carrara > > > > This change adds the simplest possible migration test. Beyond the test > > purpose

Re: [PATCH v3 15/15] python/qemu: add qemu package itself to pipenv

2020-10-28 Thread Cleber Rosa
changes made > via git pull and so on. > > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 14/15] python/qemu: add isort to pipenv

2020-10-28 Thread Cleber Rosa
x27; from the python root. > > Signed-off-by: John Snow > Reviewed-by: Philippe Mathieu-Daudé > --- Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 13/15] python: move .isort.cfg into setup.cfg

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:53PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 10/15] python: Add flake8 to pipenv

2020-10-28 Thread Cleber Rosa
from the python/ directory with no arguments. > > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 12/15] python: add mypy to pipenv

2020-10-28 Thread Cleber Rosa
yping 'mypy qemu'. > > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 11/15] python: move mypy.ini into setup.cfg

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:51PM -0400, John Snow wrote: > mypy supports reading its configuration values from a central project > configuration file; do so. > > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 09/15] python: move flake8 config to setup.cfg

2020-10-28 Thread Cleber Rosa
nd will suppress the warning if you > re-raise the exception. > > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 08/15] python: add pylint to pipenv

2020-10-28 Thread Cleber Rosa
Signed-off-by: John Snow > --- I'm not a huge fan of this level of verbosity that pipenv generates, but at the same time, I've been bitten too many times by not providing the entire dep tree in a "requirements.txt"-like style. And it is what pipenv uses, so there's no w

Re: [PATCH v3 07/15] python: move pylintrc into setup.cfg

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:47PM -0400, John Snow wrote: > 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: Cl

Re: [PATCH v3 06/15] python: add pylint import exceptions

2020-10-28 Thread Cleber Rosa
issues/3651 > Are these whitespaces on purpose? > Pinning to 2.4.4 is worse, because it mandates versions of shared > dependencies that are too old for features we want in isort and mypy. > Oh well. > > Signed-off-by: John Snow Other than that, Reviewed-by: Cleber Ro

Re: [PATCH v3 05/15] python: Add pipenv support

2020-10-28 Thread Cleber Rosa
is added with no dependencies, but specifies > Python 3.6 for the virtual environment. > > Pipfile will specify our version minimums, while Pipfile.lock specifies > an exact loudout of packages that were known to operate correctly. This > latter file provides the real value for easy setup

Re: [PATCH v3 04/15] python: add directory structure README.rst files

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:44PM -0400, John Snow wrote: > Add short readmes to python/, python/qemu/, python/qemu/machine, and > python/qemu/machine that explain the directory hierarchy. These readmes > are visible when browsing the source on e.g. gitlab/github and are > designed to help new dev

Re: [PATCH v3 03/15] python: add VERSION file

2020-10-28 Thread Cleber Rosa
> Signed-off-by: John Snow I'd rather have the version to be sync'd with QEMU, but, I understand this is a more conservative approach that can maybe evolve into that. Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:42PM -0400, John Snow wrote: > Add setup.cfg and setup.py, necessary for installing a package via > pip. Add a rst document explaining the basics of what this package is > for and who to contact for more information. This document will be used > as the landing page for

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread Cleber Rosa
On Wed, Oct 28, 2020 at 01:02:52PM -0400, John Snow wrote: > On 10/28/20 11:10 AM, Cleber Rosa wrote: > > > +mirror <https://gitlab.com/jsnow/qemu/-/tree/python>`_, but > > > +contributions must be sent to the list for inclusion. > > > > IMO it&#x

Re: [PATCH v3 01/15] python: create qemu packages

2020-10-28 Thread Cleber Rosa
On Wed, Oct 28, 2020 at 11:21:19AM -0400, John Snow wrote: > On 10/28/20 10:46 AM, Cleber Rosa wrote: > > On Tue, Oct 20, 2020 at 03:35:41PM -0400, John Snow wrote: > > > move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import > > > directives across

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:42PM -0400, John Snow wrote: > Add setup.cfg and setup.py, necessary for installing a package via > pip. Add a rst document explaining the basics of what this package is > for and who to contact for more information. This document will be used > as the landing page for

Re: [PATCH v3 01/15] python: create qemu packages

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:41PM -0400, John Snow wrote: > move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import > directives across the tree. > > This is done to create a PEP420 namespace package, in which we may > create subpackages. To do this, the namespace directory ("q

Re: [PATCH v2 4/9] tests/acceptance/boot_linux: Expand SD card image to power of 2

2020-07-13 Thread Cleber Rosa
e_aligned = pow2ceil(size) > +if size != size_aligned: > +with open(path, 'ab+') as fd: > + fd.truncate(size_aligned) > + Same nitpick comment about comment -> docstring here. Either way, Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 3/9] tests/acceptance/boot_linux: Tag tests using a SD card with 'device:sd'

2020-07-13 Thread Cleber Rosa
ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | > CANCEL 0 > JOB TIME : 90.02 s > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/acceptance/boot_linux_console.py | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 0/7] python: create installable package

2020-06-17 Thread Cleber Rosa
On Tue, Jun 02, 2020 at 08:15:16PM -0400, John Snow wrote: > Based-on: 20200602214528.12107-1-js...@redhat.com > > This series factors the python/qemu directory as an installable > module. As a developer, you can install this to your virtual environment > and then always have access to the classes

Re: [PATCH for-5.0 v2 0/3] benchmark util

2019-12-06 Thread Cleber Rosa
On Tue, Nov 26, 2019 at 06:48:45PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here is simple benchmarking utility, to generate performance > comparison tables, like the following: > > -- - - - > backup-1 backup-2

Re: [PATCH v2 6/7] configure: allow disable of cross compilation containers

2019-12-05 Thread Cleber Rosa
; container="no" > -if has "docker" || has "podman"; then > - container=$($python $source_path/tests/docker/docker.py probe) > +if test $use_containers = "yes"; then > +if has "docker" || has "podman"; then > +container=$($python $source_path/tests/docker/docker.py probe) > +fi > fi > > # cross compilers defaults, can be overridden with --cross-cc-ARCH > -- > 2.18.1 > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa

Re: [PATCH v2 5/7] tests/test-util-filemonitor: Skip test on non-x86 Travis containers

2019-12-05 Thread Cleber Rosa
travis_arch = getenv("TRAVIS_ARCH"); > +if (travis_arch && !g_str_equal(travis_arch, "x86_64")) { > +g_test_skip("Test does not work on non-x86 Travis containers."); > +return; > +} > + > /* > * The file monitor needs the main loop running in > * order to receive events from inotify. We must > -- > 2.18.1 > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa

Re: [PATCH v2 4/7] tests/hd-geo-test: Skip test when images can not be created

2019-12-05 Thread Cleber Rosa
done; > +} > } else { > img_file_name[i] = NULL; > } > @@ -965,6 +974,7 @@ int main(int argc, char **argv) > "skipping hd-geo/override/* tests"); > } > > +test_add_done: > ret = g_test_run(); > > for (i = 0; i < backend_last; i++) { > -- > 2.18.1 > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa

Re: [PATCH v2 2/7] iotests: Skip test 060 if it is not possible to create large files

2019-12-05 Thread Cleber Rosa
ed properly: - arm64: https://travis-ci.org/clebergnu/qemu/jobs/621248591#L4202 - ppc64le: https://travis-ci.org/clebergnu/qemu/jobs/621248592#L4236 - s390x: https://travis-ci.org/clebergnu/qemu/jobs/621248593#L4250 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa

Re: [PATCH v2 1/7] iotests: Provide a function for checking the creation of huge files

2019-12-04 Thread Cleber Rosa
3,15 @@ _require_drivers() > done > } > > +# Check that we have a file system that allows huge (but very sparse) files > +# > +_require_large_file() > +{ > +if ! truncate --size="$1" "$TEST_IMG"; then > +_notrun "file system on $TEST_DIR does not support large enough > files" > +fi > +rm "$TEST_IMG" > +} > + > # make sure this script returns success > true > -- > 2.18.1 > This is a good refactor even without considering the CI environment issues it will help to address. Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa

  1   2   3   >