Re: [PATCH v5 06/12] python/machine.py: Add a configurable timeout to shutdown()

2020-07-13 Thread Cleber Rosa
> 1 file changed, 5 insertions(+), 3 deletions(-) Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v5 07/12] python/machine.py: Make wait() call shutdown()

2020-07-13 Thread Cleber Rosa
Snow > --- > python/qemu/machine.py | 17 + > 1 file changed, 9 insertions(+), 8 deletions(-) > Reviewed-by: Cleber Rosa Tested-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 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 v5 08/12] tests/acceptance: wait() instead of shutdown() where appropriate

2020-07-13 Thread Cleber Rosa
iles changed, 12 insertions(+) > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v5 09/12] tests/acceptance: Don't test reboot on cubieboard

2020-07-13 Thread Cleber Rosa
down will do > the right thing. > > Signed-off-by: John Snow > --- > tests/acceptance/boot_linux_console.py | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v5 10/12] python/machine.py: split shutdown into hard and soft flavors

2020-07-13 Thread Cleber Rosa
rrent* type of cleanup done is needed on a scenario like this... > +self._popen.kill() ... as I don't remember QEMU's SIGKILL handler to be susceptible to the race condition that motivated the closing of the console file in the first place. But, I also can not prove it's no

Re: [PATCH v5 11/12] python/machine.py: re-add sigkill warning suppression

2020-07-13 Thread Cleber Rosa
insertions(+), 1 deletion(-) > Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v5 12/12] python/machine.py: change default wait timeout to 3 seconds

2020-07-13 Thread Cleber Rosa
> Signed-off-by: John Snow > --- > python/qemu/machine.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Well, for the acceptance tests, there's usually a test wide timeout, but this is indeed a good idea! Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 1/1] python: add check-python target

2020-07-13 Thread Cleber Rosa
On Mon, Jul 13, 2020 at 09:30:26PM -0400, John Snow wrote: > Move pylintrc and flake8 up to the root of the python folder where > they're the most useful. Add a requirements.cqa.txt file to house > the requirements necessary to build a venv sufficient for running > code quality analysis on the pyth

Re: [PATCH v2 0/2] QEMU Gating CI

2020-07-20 Thread Cleber Rosa
On Mon, Jul 20, 2020 at 05:18:54PM +0100, Peter Maydell wrote: > On Thu, 9 Jul 2020 at 03:47, Cleber Rosa wrote: > > > > The idea about a public facing Gating CI for QEMU was summarized in an > > RFC[1]. Since then, it was decided that a simpler version should be > >

Re: [PATCH 1/1] MAINTAINERS: Add Python library stanza

2020-07-20 Thread Cleber Rosa
gt; F: include/sysemu/cryptodev*.h > F: backends/cryptodev*.c > > +Python library > +M: John Snow > +M: Cleber Rosa > +R: Eduardo Habkost > +S: Maintained > +F: python/* > +T: git https://gitlab.com/jsnow/qemu.git python > + Thanks for this, and for that will come next! :) Ack-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 3/4] tests/acceptance: Disable the rx sash and arm cubieboard replay test on Gitlab

2020-07-23 Thread Cleber Rosa
it's better to disable these and re-enable them after a proper investigation (I'll follow up with that). Reviewed-by: Cleber Rosa > Debian: > https://gitlab.com/huth/qemu/-/jobs/651179296 > > ... might be a cache issue, indeed. > > Thomas

Re: [PATCH v2 0/2] QEMU Gating CI

2020-07-28 Thread Cleber Rosa
On Tue, Jul 28, 2020 at 03:48:38PM +0100, Peter Maydell wrote: > On Mon, 20 Jul 2020 at 18:22, Cleber Rosa wrote: > > Sure. It's important that PATCH 2/2 in this series is included in a > > branch that you need to push to the "staging" branch on the > > https

Re: [PATCH v2 0/2] QEMU Gating CI

2020-07-28 Thread Cleber Rosa
On Tue, Jul 28, 2020 at 03:51:34PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 28, 2020 at 03:48:38PM +0100, Peter Maydell wrote: > > On Mon, 20 Jul 2020 at 18:22, Cleber Rosa wrote: > > > Sure. It's important that PATCH 2/2 in this series is included in a > > &

Re: [PATCH v2 0/2] QEMU Gating CI

2020-07-28 Thread Cleber Rosa
On Tue, Jul 28, 2020 at 05:15:17PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 28, 2020 at 12:13:06PM -0400, Cleber Rosa wrote: > > On Tue, Jul 28, 2020 at 03:51:34PM +0100, Daniel P. Berrangé wrote: > > > On Tue, Jul 28, 2020 at 03:48:38PM +0100, Peter Maydell wrote: >

Re: [PATCH v2 0/2] QEMU Gating CI

2020-07-28 Thread Cleber Rosa
On Tue, Jul 28, 2020 at 05:08:50PM +0100, Peter Maydell wrote: > On Tue, 28 Jul 2020 at 16:51, Cleber Rosa wrote: > > > > On Tue, Jul 28, 2020 at 03:48:38PM +0100, Peter Maydell wrote: > > > On Mon, 20 Jul 2020 at 18:22, Cleber Rosa wrote: > > > > Sure. I

Acceptance Test BootLinuxAarch64.test_virt_tcg execution times

2020-08-06 Thread Cleber Rosa
TL;DR: This is a followup from an IRC chat about the tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_tcg test taking many orders of magnitute longer than other acceptance (and even similar boot) tests. I could not find an easy way for this specific test (aarch64+tcg) to have a significan

[PATCH 1/3] Acceptance test x86_cpu_model_versions: use default vm

2019-09-24 Thread Cleber Rosa
The default vm provided by the test, available as self.vm, serves the same purpose of the one obtained by self.get_vm(), but saves a line and matches the style of other tests. Signed-off-by: Cleber Rosa --- tests/acceptance/x86_cpu_model_versions.py | 100 ++--- 1 file changed

[PATCH 2/3] Acceptance tests: introduce utility method for tags unique vals

2019-09-24 Thread Cleber Rosa
nto a utility method. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index bd41e0443c..02775bafcf 1

[PATCH 3/3] Acceptance Tests: use avocado tags for machine type

2019-09-24 Thread Cleber Rosa
The same way the arch tag is being used as a fallback for the arch parameter, let's do the same for QEMU's machine and avoid some boiler plate code. This requires a bump in the Avocado version, as starting with 72.0, the characters supported in tags are less strict. Signed-off-by: C

[PATCH 0/3] Acceptance tests: make better use of machine tags

2019-09-24 Thread Cleber Rosa
agged with "machine", its value will be set on the QEMUMachine instances created/managed by the test. Hopefully this will eliminate boiler plate code, and make writing tests more straightforward. Cleber Rosa (3): Acceptance test x86_cpu_model_versions: use default vm Acceptance test

[PATCH 0/4] iotests: trivial cleanups

2019-09-27 Thread Cleber Rosa
The most trivial set of cleanups to iotests common libraries and the 044 test. Cleber Rosa (4): qemu-iotests: remove bash shebang from library files qemu-iotests: remove forceful execution success from library files qemu-iotests: 044: pass is actually a noop, so remove it qemu-iotests

[PATCH 1/4] qemu-iotests: remove bash shebang from library files

2019-09-27 Thread Cleber Rosa
Due to not being able to find a reason to have shebangs on files that are not executable. Signed-off-by: Cleber Rosa --- tests/qemu-iotests/common.config | 2 -- tests/qemu-iotests/common.filter | 2 -- tests/qemu-iotests/common.nbd | 1 - tests/qemu-iotests/common.pattern | 2 -- tests

[PATCH 4/4] qemu-iotests: 044: remove inaccurate docstring class description

2019-09-27 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- tests/qemu-iotests/044 | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 index eb42df0fe1..0ca4bcfc6d 100755 --- a/tests/qemu-iotests/044 +++ b/tests/qemu-iotests/044 @@ -34,7 +34,6 @@ if sys.version_info.major == 2

[PATCH 3/4] qemu-iotests: 044: pass is actually a noop, so remove it

2019-09-27 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- tests/qemu-iotests/044 | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 index 05ea1f49c5..eb42df0fe1 100755 --- a/tests/qemu-iotests/044 +++ b/tests/qemu-iotests/044 @@ -105,17 +105,14 @@ class

[PATCH 2/4] qemu-iotests: remove forceful execution success from library files

2019-09-27 Thread Cleber Rosa
Should not be necessary on files that are not executed standalone. Signed-off-by: Cleber Rosa --- tests/qemu-iotests/common.config | 3 --- tests/qemu-iotests/common.filter | 3 --- tests/qemu-iotests/common.rc | 3 --- 3 files changed, 9 deletions(-) diff --git a/tests/qemu-iotests

Re: [RFC] QEMU Gating CI

2020-01-21 Thread Cleber Rosa
On Fri, Jan 17, 2020 at 02:33:54PM +, Peter Maydell wrote: > On Mon, 2 Dec 2019 at 14:06, Cleber Rosa wrote: > > > > RFC: QEMU Gating CI > > === > > > > This RFC attempts to address most of the issues described in > > "Requirement

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

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: [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, i

[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

[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 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 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 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

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

2021-03-23 Thread Cleber Rosa
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 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 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 04/10] Acceptance Tests: move useful ssh methods to base class

2021-03-23 Thread Cleber Rosa
sword 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 ++

[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(

[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

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 >

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 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

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 /stag

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 > al

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 > > argu

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 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 str

[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 tests/acceptance/migration.py:Migr

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

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 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 th

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 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" cod

[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 a

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

2021-04-11 Thread Cleber Rosa
- tests/acceptance/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 alr

[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 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

[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 --- t

[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 10/11] Acceptance Tests: introduce CPU hotplug test

2021-04-11 Thread Cleber Rosa
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 04/11] Acceptance Tests: move useful ssh methods to base class

2021-04-11 Thread Cleber Rosa
n ssh 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

[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 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 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 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 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 3/3] Acceptance Tests: support choosing specific distro and version

2021-04-14 Thread Cleber Rosa
e pre-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

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

2021-04-14 Thread Cleber Rosa
tests 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 change

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

2021-04-14 Thread Cleber Rosa
code 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

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

2021-04-14 Thread Cleber Rosa
make 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/

[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' >>> {'execute':

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 v2 1/2] tests/acceptance: Test ast2400 and ast2500 machines

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

[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/ tags/python-nex

[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 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 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 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 3/5] avocado_qemu: add exec_command function

2021-03-16 Thread Cleber Rosa
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

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: [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 stuc

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

2021-05-24 Thread Cleber Rosa
equirements, one per 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: [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 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 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 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 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 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 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 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 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 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 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 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 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 ...&

<    3   4   5   6   7   8   9   10   11   12   >