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

2021-05-25 Thread Cleber Rosa
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 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 deletions(-)

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 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
gt; 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: ... package init file 'qemu/

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

2021-05-24 Thread Cleber Rosa
on/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: [RFC 1/1] acceptance tests: bump Avocado version to 88.1

2021-05-24 Thread Cleber Rosa
line, to be installed > # in the tests/venv Python virtual environment. For more info, > # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 > -avocado-framework==85.0 > +avocado-framework==88.1 > pycdlib==1.11.0 > -- > 2.31.1 > I'll be including that bump (and discarding the previous one) on my upcoming PR. Acked-by: Cleber Rosa signature.asc Description: PGP signature

Re: [RFC 0/1] acceptance tests: bump Avocado version to 88.1

2021-05-24 Thread Cleber Rosa
On Thu, May 20, 2021 at 05:47:46PM -0300, Willian Rampazzo wrote: > CI pipeline: https://gitlab.com/willianrampazzo/qemu/-/pipelines/306904401 > While not related to change in Avocado version (I've verified the same behavior with 85.0), we need to investigate (further) one of the jobs getting

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

2021-05-20 Thread Cleber Rosa
ython 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
4vm.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 patch not

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

2021-05-18 Thread Cleber Rosa
e}/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 v2 4/6] python/console_socket: Add a pylint ignore

2021-05-17 Thread Cleber Rosa
On Mon, May 17, 2021 at 02:48:06PM -0400, John Snow wrote: > We manage cleaning up this resource ourselves. Pylint should shush. > > Signed-off-by: John Snow > --- > python/qemu/console_socket.py | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Cleber Rosa sign

Re: [PATCH v2 6/6] python/machine: disable warning for Popen in _launch()

2021-05-17 Thread Cleber Rosa
gt; python/qemu/machine.py | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 2/6] python/machine: use subprocess.DEVNULL instead of open(os.path.devnull)

2021-05-17 Thread Cleber Rosa
t; --- > python/qemu/machine.py | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 3/6] python/machine: use subprocess.run instead of subprocess.Popen

2021-05-17 Thread Cleber Rosa
d, 9 insertions(+), 6 deletions(-) > Reviewed-by: Cleber Rosa qemu-iotests 045 and 147 are happy, so: Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 5/6] python/machine: Disable pylint warning for open() in _pre_launch

2021-05-17 Thread Cleber Rosa
le changed, 5 insertions(+), 1 deletion(-) > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 0/1] Acceptance Tests: bump Avocado version requirement to 87.0

2021-05-02 Thread Cleber Rosa
- Original Message - > From: "Philippe Mathieu-Daudé" > To: "Cleber Rosa" , qemu-devel@nongnu.org > Cc: "Thomas Huth" , "Beraldo Leal" , > "Wainer dos Santos Moschetta" > , "Alex Bennée" , "Willian >

Re: [PATCH v2 5/7] python/qemu: Add args property to the QEMUMachine class

2021-04-22 Thread Cleber Rosa
> --- > python/qemu/machine.py | 5 + > 1 file changed, 5 insertions(+) > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 4/7] tests/acceptance: Tagging tests with "cpu:VALUE"

2021-04-22 Thread Cleber Rosa
| 4 ++-- > 4 files changed, 18 insertions(+), 13 deletions(-) > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 7/7] tests/acceptance: Handle cpu tag on x86_cpu_model_versions tests

2021-04-22 Thread Cleber Rosa
On Thu, Apr 08, 2021 at 04:52:37PM -0300, Wainer dos Santos Moschetta wrote: > Some test cases on x86_cpu_model_versions.py are corner cases because they > need to pass extra options to the -cpu argument. Once the avocado_qemu > framework will set -cpu automatically, the value should be reset.

Re: [PATCH v2 6/7] tests/acceptance: Add set_vm_arg() to the Test class

2021-04-22 Thread Cleber Rosa
On Thu, Apr 08, 2021 at 04:52:36PM -0300, Wainer dos Santos Moschetta wrote: > The set_vm_arg method is added to avocado_qemu.Test class on this > change. Use that method to set (or replace) an argument to the list of > arguments given to the QEMU binary. > > Suggested-by: Cleber

Re: [PATCH v2 3/7] tests/acceptance: Let the framework handle "cpu:VALUE" tagged tests

2021-04-22 Thread Cleber Rosa
ests/acceptance/tcg_plugins.py| 9 - > 5 files changed, 8 insertions(+), 15 deletions(-) > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 2/7] tests/acceptance: Fix mismatch on cpu tagged tests

2021-04-22 Thread Cleber Rosa
hine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_7cores: PASS (16.54 s) (3/6) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_8cores: PASS (17.95 s) (4/6) tests/acceptance/tcg_plugins.py:PluginKernelNormal.test_aarch64_vir

Re: [PATCH v2 0/7] tests/acceptance: Handle tests with "cpu" tag

2021-04-22 Thread Cleber Rosa
On Thu, Apr 08, 2021 at 04:52:30PM -0300, Wainer dos Santos Moschetta wrote: > Currently the acceptance tests tagged with "machine" have the "-M TYPE" > automatically added to the list of arguments of the QEMUMachine object. > In other words, that option is passed to the launched QEMU. On this >

Re: [PATCH v2 1/7] tests/acceptance: Automatic set -cpu to the test vm

2021-04-22 Thread Cleber Rosa
ould not ignore a 174 character line :). > > Signed-off-by: Wainer dos Santos Moschetta > --- > docs/devel/testing.rst| 17 + > tests/acceptance/avocado_qemu/__init__.py | 5 + > 2 files changed, 22 insertions(+) With the line bro

Re: [PATCH 2/3] Acceptance Tests: move definition of distro checksums to the framework

2021-04-19 Thread Cleber Rosa
On Mon, Apr 19, 2021 at 12:25:44PM -0300, Wainer dos Santos Moschetta wrote: > Hi, > > On 4/14/21 7:14 PM, Cleber Rosa wrote: > > Instead of having, by default, the checksum in the tests, and the > > definition of tests in the framework, let's keep them together. > >

Re: [PATCH 0/8] Tests: introduce custom jobs

2021-04-16 Thread Cleber Rosa
On Fri, Apr 16, 2021 at 06:22:12PM +0200, Paolo Bonzini wrote: > On 15/04/21 23:51, Cleber Rosa wrote: > > Different users (or even companies) have different interests, and > > may want to run a reduced set of tests during development, or a > > larger set of tests during

Re: [PATCH 8/8] Tests: add custom test jobs

2021-04-16 Thread Cleber Rosa
On Fri, Apr 16, 2021 at 07:23:14AM +0200, Philippe Mathieu-Daudé wrote: > Hi Cleber, > > On 4/15/21 11:51 PM, Cleber Rosa wrote: > > Different users (or even companies) have different interests, and > > may want to run a reduced set of tests during development, or a > >

Re: [PATCH 5/8] tests/acceptance/cpu_queries.py: use the proper logging channels

2021-04-16 Thread Cleber Rosa
On Fri, Apr 16, 2021 at 07:15:07AM +0200, Philippe Mathieu-Daudé wrote: > On 4/15/21 11:51 PM, Cleber Rosa wrote: > > The test contains methods for the proper log of test related > > "The Test class ..."? > Yes, good catch! > > information. Let's use that a

Re: [PATCH 3/8] tests/acceptance/linux_ssh_mips_malta.py: drop identical setUp

2021-04-16 Thread Cleber Rosa
On Fri, Apr 16, 2021 at 07:26:05AM +0200, Philippe Mathieu-Daudé wrote: > On 4/15/21 11:51 PM, Cleber Rosa wrote: > > These tests' setUp do not do anything beyong what their base class do. > > And while they do decorate the setUp() we can decorate the classes > > instead

Re: [PATCH 1/8] Acceptance Jobs: preserve the cache for pip on GitLab CI

2021-04-16 Thread Cleber Rosa
On Fri, Apr 16, 2021 at 05:56:10AM +0200, Thomas Huth wrote: > On 15/04/2021 23.51, Cleber Rosa wrote: > > The acceptance jobs (via `make check-venv`) will setup a virtual > > environment, and after that install packages defined in > > tests/requirements.txt via pip. > &

Re: [PATCH 4/8] tests/acceptance/migration.py: cancel test if migration is not supported

2021-04-16 Thread Cleber Rosa
On Fri, Apr 16, 2021 at 07:11:04AM +0200, Philippe Mathieu-Daudé wrote: > On 4/15/21 11:51 PM, Cleber Rosa wrote: > > FIXME: check if there's a way to query migration support before > > actually requesting migration. > > > > Some targets/machines contain devices th

[PATCH 8/8] Tests: add custom test jobs

2021-04-15 Thread Cleber Rosa
-framework.readthedocs.io/en/87.0/api/core/avocado.core.html#avocado.core.job.Job Signed-off-by: Cleber Rosa --- configure| 2 +- tests/Makefile.include | 8 tests/jobs/acceptance-all-targets.py | 67 tests/jobs/acceptance-kvm

[PATCH 6/8] Acceptance tests: prevent shutdown on non-specific target tests

2021-04-15 Thread Cleber Rosa
* will be generated. For some QMP commands, such as "query-migrate", a proper response ("guest-panicked" for the s390x target) will still be given. Signed-off-by: Cleber Rosa --- tests/acceptance/migration.py | 4 ++-- tests/acceptance/version.py | 2 +- 2 files changed, 3 insertions(+),

[PATCH 7/8] tests/acceptance/migration.py: cancel test on s390x

2021-04-15 Thread Cleber Rosa
Because s390x targets it can not currently migrate without a guest running. Future work may provide a proper guest, but for now, it's safer to cancel the test. Signed-off-by: Cleber Rosa --- tests/acceptance/migration.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests

[PATCH 4/8] tests/acceptance/migration.py: cancel test if migration is not supported

2021-04-15 Thread Cleber Rosa
FIXME: check if there's a way to query migration support before actually requesting migration. Some targets/machines contain devices that do not support migration. Let's acknowledge that and cancel the test as early as possible. Signed-off-by: Cleber Rosa --- tests/acceptance/migration.py | 6

[PATCH 5/8] tests/acceptance/cpu_queries.py: use the proper logging channels

2021-04-15 Thread Cleber Rosa
The test contains methods for the proper log of test related information. Let's use that and remove the print and the unused logging import. Reference: https://avocado-framework.readthedocs.io/en/87.0/api/test/avocado.html#avocado.Test.log Signed-off-by: Cleber Rosa --- tests/acceptance

[PATCH 1/8] Acceptance Jobs: preserve the cache for pip on GitLab CI

2021-04-15 Thread Cleber Rosa
The acceptance jobs (via `make check-venv`) will setup a virtual environment, and after that install packages defined in tests/requirements.txt via pip. Let's enable pip's default cache directory, so that we can save a bit on time/bandwidth. Signed-off-by: Cleber Rosa --- .gitlab-ci.yml | 1

[PATCH 0/8] Tests: introduce custom jobs

2021-04-15 Thread Cleber Rosa
/html/qemu-devel/2021-04/msg02391.html Based-On: <20210414161144.1598980-1-cr...@redhat.com> Cleber Rosa (8): Acceptance Jobs: preserve the cache for pip on GitLab CI Acceptance tests: do not try to reuse packages from the system tests/acceptance/linux_ssh_mips_malta.py: drop identic

[PATCH 3/8] tests/acceptance/linux_ssh_mips_malta.py: drop identical setUp

2021-04-15 Thread Cleber Rosa
These tests' setUp do not do anything beyong what their base class do. And while they do decorate the setUp() we can decorate the classes instead, so no functionality is lost here. Signed-off-by: Cleber Rosa --- tests/acceptance/linux_ssh_mips_malta.py | 7 ++- 1 file changed, 2 insertions

[PATCH 2/8] Acceptance tests: do not try to reuse packages from the system

2021-04-15 Thread Cleber Rosa
tests run on different machines; With regards to downloads, pip already caches the downloaded wheels and tarballs under ~/.cache/pip, so there should not be more than one download even if the venv is destroyed and recreated. Signed-off-by: Cleber Rosa --- tests/Makefile.include | 2 +- 1

[Bug 1922611] Re: Acceptance Tests: migration fails on sparc target

2021-04-14 Thread Cleber Rosa
I can confirm this bug has been fixed. Relevant test output: VM launch command: './qemu-system-sparc -display none -vga none -chardev socket,id=mon,path=/tmp/avo_qemu_sock_g0w15g26/qemu-1672256-monitor.sock -mon chardev=mon,mode=control -incoming tcp:localhost:53800 -nodefaults' >>>

[PATCH 1/3] Acceptance Tests: rename attribute holding the distro image checksum

2021-04-14 Thread Cleber Rosa
the naming of those more uniform. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 4 ++-- tests/acceptance/boot_linux.py| 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests

[PATCH 0/3] Acceptance Tests: support choosing specific distro and version

2021-04-14 Thread Cleber Rosa
discussion. Based-On: <20210412044644.55083-1-cr...@redhat.com> Cleber Rosa (3): Acceptance Tests: rename attribute holding the distro image checksum Acceptance Tests: move definition of distro checksums to the framework Acceptance Tests: support choosing specific distro and version docs

[PATCH 2/3] Acceptance Tests: move definition of distro checksums to the framework

2021-04-14 Thread Cleber Rosa
can still define a distro_checksum value if for some reason they want to override the known distribution information. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 34 +-- tests/acceptance/boot_linux.py| 8 -- 2 files changed, 32

[PATCH 3/3] Acceptance Tests: support choosing specific distro and version

2021-04-14 Thread Cleber Rosa
-caching of the Fedora 31 images done during the early stages of `make check-acceptance` (before the tests are actually executed) are not expanded here to cover every new image added. But, the tests will download other needed images (and cache them) during the first execution. Signed-off-by: Cleber Rosa

[PATCH 0/1] Acceptance Tests: bump Avocado version requirement to 87.0

2021-04-14 Thread Cleber Rosa
QEMU use cases, including: * Fix to the error message given when downloading assets * Asset listing/purging capabilities Cleber Rosa (1): Acceptance Tests: bump Avocado version requirement to 87.0 tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.4

[PATCH 1/1] Acceptance Tests: bump Avocado version requirement to 87.0

2021-04-14 Thread Cleber Rosa
This version (and 86.0) contain improvements that address specific QEMU use cases, including: * Fix to the error message given when downloading assets * Asset listing/purging capabilities Signed-off-by: Cleber Rosa --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 09/11] Acceptance Tests: add basic documentation on LinuxTest base class

2021-04-11 Thread 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 --- docs/devel/testing.rst | 26 ++ 1 file changed, 26 insertions(+) diff --git a/docs/devel/testing.rst b/docs

[PATCH v3 07/11] Acceptance Tests: set up SSH connection by default after boot for LinuxTest

2021-04-11 Thread Cleber Rosa
The LinuxTest specifically targets users that need to interact with Linux guests. So, it makes sense to give a connection by default, and avoid requiring it as boiler-plate code. Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Willian Rampazzo --- tests/acceptance

[PATCH v3 04/11] Acceptance Tests: move useful ssh methods to base class

2021-04-11 Thread Cleber Rosa
connection will now support both key and password based authentication, defaulting to key based. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Reviewed-by: Eric Auger Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 48

[PATCH v3 11/11] tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkey

2021-04-11 Thread Cleber Rosa
The public key argument should be a path to a file, and not the public key data. Reported-by: Wainer dos Santos Moschetta Signed-off-by: Cleber Rosa --- tests/acceptance/virtiofs_submounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance

[PATCH v3 10/11] Acceptance Tests: introduce CPU hotplug test

2021-04-11 Thread Cleber Rosa
) 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 --- tests/acceptance/hotplug_cpu.py | 37 + 1 file changed, 37 insertions(+) create mode 100644 tests/acceptance/hotplug_cpu.py

[PATCH v3 06/11] Acceptance Tests: make username/password configurable

2021-04-11 Thread Cleber Rosa
This makes the username/password used for authentication configurable, because some guest operating systems may have restrictions on accounts to be used for logins, and it just makes it better documented. Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Eric Auger

[PATCH v3 02/11] tests/acceptance/virtiofs_submounts.py: evaluate string not length

2021-04-11 Thread Cleber Rosa
-off-by: Cleber Rosa Reviewed-by: Beraldo Leal Reviewed-by: Eric Auger Reviewed-by: Willian Rampazzo --- 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

[PATCH v3 08/11] tests/acceptance/virtiofs_submounts.py: remove launch_vm()

2021-04-11 Thread Cleber Rosa
The LinuxTest class' launch_and_wait() method now behaves the same way as this test's custom launch_vm(), so let's just use the upper layer (common) method. Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Eric Auger Reviewed-by: Willian Rampazzo --- tests/acceptance

[PATCH v3 05/11] Acceptance Tests: add port redirection for ssh by default

2021-04-11 Thread Cleber Rosa
For users of the LinuxTest class, let's set up the VM with the port redirection for SSH, instead of requiring each test to set the same arguments. It also sets the network device, by default, to virtio-net. Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Eric Auger

[PATCH v3 03/11] Python: add utility function for retrieving port redirection

2021-04-11 Thread Cleber Rosa
he utility function and a test. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Eric Auger Reviewed-by: Willian Rampazzo --- python/qemu/utils.py | 33 tests/acceptance/info_usernet.py | 29 ++

[PATCH v3 00/11] Acceptance Test: introduce base class for Linux based tests

2021-04-11 Thread Cleber Rosa
ceptance/virtiofs_submounts.py: remove launch_vm() * Allowed for the configuration of the network device type (defaulting to virtio-net) [Phil] * Fix module name typo (s/qemu.util/qemu.utils/) in the commit message [John] * Tests based on LinuxTest will have the SSH connection already prepa

[PATCH v3 01/11] tests/acceptance/virtiofs_submounts.py: add missing accel tag

2021-04-11 Thread 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 --- tests/acceptance/virtiofs_submounts.py | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v2 00/10] Acceptance Test: introduce base class for Linux based tests

2021-04-11 Thread Cleber Rosa
On Thu, Mar 25, 2021 at 04:45:51PM -0300, Wainer dos Santos Moschetta wrote: > Hi, > > On 3/23/21 7:15 PM, Cleber Rosa wrote: > > This introduces a base class for tests that need to interact with a > > Linux guest. It generalizes the "boot_linux.py&qu

Re: [PATCH v2 09/10] Acceptance Tests: add basic documentation on LinuxTest base class

2021-04-11 Thread Cleber Rosa
On Thu, Mar 25, 2021 at 03:14:58PM -0300, Wainer dos Santos Moschetta wrote: > Hi, > > On 3/23/21 7:15 PM, Cleber Rosa wrote: > > Signed-off-by: Cleber Rosa > > Reviewed-by: Marc-André Lureau > > Reviewed-by: Willian Rampazzo > > ---

Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-04-11 Thread Cleber Rosa
On Thu, Mar 25, 2021 at 02:57:48PM -0300, Wainer dos Santos Moschetta wrote: > Hi, > > On 3/24/21 6:10 AM, Auger Eric wrote: > > Hi Cleber, > > > > On 3/23/21 11:15 PM, Cleber Rosa wrote: > > > For users of the LinuxTest class, let's set up the VM with the por

Re: [PATCH v2 04/10] Acceptance Tests: move useful ssh methods to base class

2021-04-11 Thread Cleber Rosa
On Wed, Mar 24, 2021 at 10:07:31AM +0100, Auger Eric wrote: > Hi Cleber, > > On 3/23/21 11:15 PM, Cleber Rosa wrote: > > Both the virtiofs submounts and the linux ssh mips malta tests > > contains useful methods related to ssh that deserve to be made > > available to ot

Re: [PATCH v2 03/10] Python: add utility function for retrieving port redirection

2021-04-11 Thread Cleber Rosa
On Thu, Mar 25, 2021 at 02:10:19PM -0400, John Snow wrote: > On 3/23/21 6:15 PM, Cleber Rosa wrote: > > Slightly different versions for the same utility code are currently > > present on different locations. This unifies them all, giving > > preference to the version from

[Bug 1922611] [NEW] Acceptance Tests: migration fails on sparc target

2021-04-05 Thread Cleber Rosa
Public bug reported: QEMU fails migration when using a sparc target. This cab be verified/reproduced with the `tests/acceptance/migration.py` test. Running it with: $ make check-venv $ ./tests/venv/bin/avocado --show=test run -p qemu_bin=./qemu-system-sparc

Re: [PATCH 1/1] avocado_qemu: Add SMMUv3 tests

2021-03-25 Thread Cleber Rosa
On Thu, Mar 25, 2021 at 10:57:12AM +0100, Eric Auger wrote: > Add new tests checking the good behavior of the SMMUv3 protecting > 2 virtio pci devices (block and net). We check the guest boots and > we are able to install a package. Different guest configs are tested: > standard, passthrough an

Re: [PATCH v2 03/10] Python: add utility function for retrieving port redirection

2021-03-24 Thread Cleber Rosa
On Wed, Mar 24, 2021 at 05:35:07PM -0300, Willian Rampazzo wrote: > On Tue, Mar 23, 2021 at 7:16 PM Cleber Rosa wrote: > > > > Slightly different versions for the same utility code are currently > > present on different locations. This unifies them all, giving > > pre

Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-03-24 Thread Cleber Rosa
On Wed, Mar 24, 2021 at 11:36:53AM +0100, Auger Eric wrote: > Hi Cleber, > On 3/23/21 11:15 PM, Cleber Rosa wrote: > > For users of the LinuxTest class, let's set up the VM with the port > > redirection for SSH, instead of requiring each test to set the same > > argume

Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-03-24 Thread Cleber Rosa
On Wed, Mar 24, 2021 at 10:10:50AM +0100, Auger Eric wrote: > Hi Cleber, > > On 3/23/21 11:15 PM, Cleber Rosa wrote: > > For users of the LinuxTest class, let's set up the VM with the port > > redirection for SSH, instead of requiring each test to set the same > also

Re: gitlab-ci: Only build /staging branch?

2021-03-24 Thread Cleber Rosa
On Wed, Mar 24, 2021 at 07:01:12PM +0100, Philippe Mathieu-Daudé wrote: > Hi, > > Peter's current workflow is push to /staging and if his > testing succeeds, he pushes the same commit as /master. > > IMO there is no point in building /master branch, as it > has already been built earlier as

Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-03-24 Thread Cleber Rosa
On Wed, Mar 24, 2021 at 12:30:18PM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Mar 24, 2021 at 2:23 AM Cleber Rosa wrote: > > > For users of the LinuxTest class, let's set up the VM with the port > > redirection for SSH, instead of requiring each test to se

Re: [PATCH v2 04/10] Acceptance Tests: move useful ssh methods to base class

2021-03-24 Thread Cleber Rosa
On Wed, Mar 24, 2021 at 10:07:31AM +0100, Auger Eric wrote: > Hi Cleber, > > On 3/23/21 11:15 PM, Cleber Rosa wrote: > > Both the virtiofs submounts and the linux ssh mips malta tests > > contains useful methods related to ssh that deserve to be made > > available to ot

Re: [PATCH v2 07/10] Acceptance Tests: set up SSH connection by default after boot for LinuxTest

2021-03-24 Thread Cleber Rosa
On Wed, Mar 24, 2021 at 10:22:47AM +0100, Auger Eric wrote: > Hi Cleber, > > On 3/23/21 11:15 PM, Cleber Rosa wrote: > > The LinuxTest specifically targets users that need to interact with Linux > > guests. So, it makes sense to give a connection by default, and avoid >

[PATCH v2 07/10] Acceptance Tests: set up SSH connection by default after boot for LinuxTest

2021-03-23 Thread Cleber Rosa
The LinuxTest specifically targets users that need to interact with Linux guests. So, it makes sense to give a connection by default, and avoid requiring it as boiler-plate code. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 5 - tests/acceptance

[PATCH v2 08/10] tests/acceptance/virtiofs_submounts.py: remove launch_vm()

2021-03-23 Thread Cleber Rosa
The LinuxTest class' launch_and_wait() method now behaves the same way as this test's custom launch_vm(), so let's just use the upper layer (common) method. Signed-off-by: Cleber Rosa --- tests/acceptance/virtiofs_submounts.py | 13 + 1 file changed, 5 insertions(+), 8 deletions

[PATCH v2 04/10] Acceptance Tests: move useful ssh methods to base class

2021-03-23 Thread Cleber Rosa
based authentication, defaulting to key based. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo --- tests/acceptance/avocado_qemu/__init__.py | 48 ++- tests/acceptance/linux_ssh_mips_malta.py | 38 ++ tests

[PATCH v2 03/10] Python: add utility function for retrieving port redirection

2021-03-23 Thread Cleber Rosa
he utility function and a test. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta --- python/qemu/utils.py | 35 tests/acceptance/info_usernet.py | 29 tests/acceptance/linux_ssh_mips_malta.py | 16 +---

[PATCH v2 00/10] Acceptance Test: introduce base class for Linux based tests

2021-03-23 Thread Cleber Rosa
/virtiofs_submounts.py: remove launch_vm() * Allowed for the configuration of the network device type (defaulting to virtio-net) [Phil] * Fix module name typo (s/qemu.util/qemu.utils/) in the commit message [John] * Tests based on LinuxTest will have the SSH connection already prepared Cleber

[PATCH v2 10/10] Acceptance Tests: introduce CPU hotplug test

2021-03-23 Thread Cleber Rosa
) and with the Linux guest via SSH. Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Willian Rampazzo --- tests/acceptance/hotplug_cpu.py | 37 + 1 file changed, 37 insertions(+) create mode 100644 tests/acceptance/hotplug_cpu.py diff --git a/tests

[PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-03-23 Thread Cleber Rosa
For users of the LinuxTest class, let's set up the VM with the port redirection for SSH, instead of requiring each test to set the same arguments. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 4 +++- tests/acceptance/virtiofs_submounts.py| 4 2 files

[PATCH v2 09/10] Acceptance Tests: add basic documentation on LinuxTest base class

2021-03-23 Thread Cleber Rosa
Signed-off-by: Cleber Rosa Reviewed-by: Marc-André Lureau Reviewed-by: Willian Rampazzo --- docs/devel/testing.rst | 25 + 1 file changed, 25 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 1da4c4e4c4..ed2a06db28 100644 --- a/docs/devel

[PATCH v2 06/10] Acceptance Tests: make username/password configurable

2021-03-23 Thread Cleber Rosa
This makes the username/password used for authentication configurable, because some guest operating systems may have restrictions on accounts to be used for logins, and it just makes it better documented. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 6 -- 1

[PATCH v2 01/10] tests/acceptance/virtiofs_submounts.py: add missing accel tag

2021-03-23 Thread 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 --- tests/acceptance/virtiofs_submounts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance

[PATCH v2 02/10] tests/acceptance/virtiofs_submounts.py: evaluate string not length

2021-03-23 Thread Cleber Rosa
-off-by: Cleber Rosa Reviewed-by: Beraldo Leal --- 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 5b74ce2929..ca64b76301 100644 --- a/tests/acceptance

Re: [PATCH 19/22] Acceptance Tests: add port redirection for ssh by default

2021-03-23 Thread Cleber Rosa
On Wed, Feb 03, 2021 at 06:51:42PM +0100, Philippe Mathieu-Daudé wrote: > On 2/3/21 6:46 PM, Philippe Mathieu-Daudé wrote: > > On 2/3/21 6:23 PM, Cleber Rosa wrote: > >> For users of the LinuxTest class, let's set up the VM with the port > >> redirection for SSH, ins

Re: [PATCH 10/22] Python: add utility function for retrieving port redirection

2021-03-23 Thread Cleber Rosa
On Thu, Feb 04, 2021 at 07:25:52PM -0500, John Snow wrote: > On 2/3/21 12:23 PM, Cleber Rosa wrote: > > Slightly different versions for the same utility code are currently > > present on different locations. This unifies them all, giving > > preference to the version from

Re: 'make check-acceptance' odd error: "'bytes' object has no attribute 'encode'"

2021-03-23 Thread Cleber Rosa
- Original Message - > From: "Peter Maydell" > To: "QEMU Developers" > Cc: "Cleber Rosa" > Sent: Tuesday, March 23, 2021 11:23:30 AM > Subject: 'make check-acceptance' odd error: "'bytes' object has no attribute > 'encode'"

[PULL 3/5] avocado_qemu: add exec_command function

2021-03-16 Thread Cleber Rosa
the test to send a command to the console without the need to match a pattern produced as a result. Signed-off-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-Id: <20210303205320.146047-2-wi

[PULL 4/5] tests: Add functional test for out-of-process device emulation

2021-03-16 Thread Cleber Rosa
[WR: Refactored code] Signed-off-by: Willian Rampazzo Tested-by: Wainer dos Santos Moschetta Reviewed-by: Stefan Hajnoczi Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-Id: <20210303205320.146047-3-willi...@redhat.com> Signed-off-by: Cleber Rosa --- tests/acceptance/multiproc

[PULL 2/5] tests/migration: fix unix socket batch migration

2021-03-16 Thread Cleber Rosa
eviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cleber Rosa --- tests/migration/guestperf/engine.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py index 83bfc3b6bb8..5189cf96775 100644 --- a/tests/migration

[PULL 1/5] tests/acceptance: Print expected message on wait_for_console_pattern

2021-03-16 Thread Cleber Rosa
: <20210309153507.1905682-1-waine...@redhat.com> Reviewed-by: Joel Stanley Reviewed-by: Willian Rampazzo Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/acce

[PULL 5/5] tests/acceptance: linux-related tests fix

2021-03-16 Thread Cleber Rosa
From: Pavel Dovgalyuk This patch allows cloudinit images download when ssh key is not specified. Signed-off-by: Pavel Dovgalyuk Message-Id: <161373266228.1608713.7614311331725780044.stgit@pasha-ThinkPad-X280> Reviewed-by: Willian Rampazzo Signed-off-by: Cleber Rosa --- tests/acce

[PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16

2021-03-16 Thread Cleber Rosa
The following changes since commit 5b7f5586d182b0cafb1f8d558992a14763e2953e: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20210315-pull-request= ' into staging (2021-03-16 13:17:54 +) are available in the Git repository at: https://gitlab.com/cleber.gnu/qemu.git/

Re: [PATCH v2 1/2] tests/acceptance: Test ast2400 and ast2500 machines

2021-03-16 Thread Cleber Rosa
.html JOB TIME : 61.04 s Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH] tests/acceptance: Print expected message on wait_for_console_pattern

2021-03-16 Thread Cleber Rosa
. > > tests/acceptance/avocado_qemu/__init__.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 0/3] tests/acceptance: Handle tests with "cpu" tag

2021-03-09 Thread Cleber Rosa
On Wed, Feb 24, 2021 at 06:26:51PM -0300, Wainer dos Santos Moschetta wrote: > Currently the acceptance tests tagged with "machine" have the "-M TYPE" > automatically added to the list of arguments of the QEMUMachine object. > In other words, that option is passed to the launched QEMU. On this >

Re: [PATCH 1/3] tests/acceptance: Automatic set -cpu to the test vm

2021-03-09 Thread Cleber Rosa
On Wed, Feb 24, 2021 at 06:26:52PM -0300, Wainer dos Santos Moschetta wrote: > This introduces a new feature to the functional tests: automatic setting of > the '-cpu VALUE' option to the created vm if the test is tagged with > 'cpu:VALUE'. The 'cpu' property is made available to the test object

Re: [PATCH 2/3] tests/acceptance: Let the framework handle "cpu:VALUE" tagged tests

2021-03-09 Thread Cleber Rosa
On Wed, Feb 24, 2021 at 06:26:53PM -0300, Wainer dos Santos Moschetta wrote: > The tests that are already tagged with "cpu:VALUE" don't need to add > "-cpu VALUE" to the list of arguments of the vm object because the > avocado_qemu > framework is able to handle it automatically. So this adjust

Re: [PATCH 3/3] tests/acceptance: Tagging tests with "cpu:VALUE"

2021-03-09 Thread Cleber Rosa
On Wed, Feb 24, 2021 at 06:26:54PM -0300, Wainer dos Santos Moschetta wrote: > The existing tests which are passing "-cpu VALUE" argument to the vm object > are now properly "cpu:VALUE" tagged, so letting the avocado_qemu framework to > handle that automatically. > > Signed-off-by: Wainer dos

<    1   2   3   4   5   6   7   8   9   10   >