[Qemu-block] [PATCH 0/1] qemu-iotests/109: Fix lock race condition

2017-08-01 Thread Cleber Rosa
A race condition is currently present between the clean up attempt of the QEMU process and the execution of qemu-img. Cleber Rosa(1): qemu-iotests/109: Fix lock/race condition tests/qemu-iotests/109 | 3 ++- tests/qemu-iotests/109.out | 56

[Qemu-block] [PATCH 1/1] qemu-iotests/109: Fix lock race condition

2017-08-01 Thread Cleber Rosa
and waits for the QEMU process to exit. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/109 | 3 ++- tests/qemu-iotests/109.out | 56 ++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-07-21 Thread Cleber Rosa
On 07/21/2017 10:01 AM, Daniel P. Berrange wrote: > On Fri, Jul 21, 2017 at 01:33:25PM +0100, Stefan Hajnoczi wrote: >> On Thu, Jul 20, 2017 at 11:47:27PM -0400, Cleber Rosa wrote: >>> This is a follow up to a previous discussion about reported failures when >>> runnin

[Qemu-block] [PATCH 1/3] scripts: introduce buildconf.py

2017-07-21 Thread Cleber Rosa
Signed-off-by: Cleber Rosa <cr...@redhat.com> --- scripts/buildconf.py | 278 +++ 1 file changed, 278 insertions(+) create mode 100755 scripts/buildconf.py diff --git a/scripts/buildconf.py b/scripts/buildconf.py new file mode 100755 index 000..

[Qemu-block] [PATCH 2/3] qemu-iotests: add _require_feature() function

2017-07-21 Thread Cleber Rosa
from the _supported_* family of functions, was chosen to match the style of _require_command(), which seems pretty similar. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/check | 2 ++ tests/qemu-iotests/common.rc | 7 +++ 2 files changed, 9 insertions(+) diff

[Qemu-block] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-07-21 Thread Cleber Rosa
configurations. On top of that, it adds a function to to be used on qemu-iotests. Finally, as an example, it sets a test to be skipped if the required feature is not enable on the host build configuration. Cleber Rosa (3): scripts: introduce buildconf.py qemu-iotests: add _require_feature

[Qemu-block] [PATCH 3/3] qemu-iotests: require CONFIG_LINUX_AIO for test 087

2017-07-21 Thread Cleber Rosa
One of the "sub-"tests of test 087 requires CONFIG_LINUX_AIO. As a PoC/RFC, this goes the easy route and skips the test as a whole when that feature is missing. Other approaches include splitting the test and adding extra filtering. Signed-off-by: Cleber Rosa <cr...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-07-21 Thread Cleber Rosa
On 07/21/2017 08:33 AM, Stefan Hajnoczi wrote: > On Thu, Jul 20, 2017 at 11:47:27PM -0400, Cleber Rosa wrote: >> This is a follow up to a previous discussion about reported failures when >> running some qemu-iotests. Turns out the failures were due to missing >> lib

Re: [Qemu-block] [PATCH 1/3] scripts: introduce buildconf.py

2017-07-21 Thread Cleber Rosa
On 07/21/2017 10:00 AM, Eric Blake wrote: > On 07/20/2017 10:47 PM, Cleber Rosa wrote: >> scripts/buildconf.py is a command line utility (but also can be used >> as a Python module) that introspects the build configuration. >> >> It uses the generated host leve

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-07-25 Thread Cleber Rosa
un tests that are expected to PASS within the given feature list. The test runner (run-test-suite.sh) would select only tests that match the features given. No SKIPs would be expected as the outcome of *any test*. The other approach is to let the feature match to the test, and SKIPs would then be

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-07-25 Thread Cleber Rosa
On 07/25/2017 11:49 AM, Stefan Hajnoczi wrote: > On Fri, Jul 21, 2017 at 10:21:24AM -0400, Cleber Rosa wrote: >> On 07/21/2017 10:01 AM, Daniel P. Berrange wrote: >>> On Fri, Jul 21, 2017 at 01:33:25PM +0100, Stefan Hajnoczi wrote: >>>> On Thu, Jul 20, 2017 at 11:47

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-07-26 Thread Cleber Rosa
On 07/26/2017 01:58 PM, Stefan Hajnoczi wrote: > On Tue, Jul 25, 2017 at 12:16:13PM -0400, Cleber Rosa wrote: >> On 07/25/2017 11:49 AM, Stefan Hajnoczi wrote: >>> On Fri, Jul 21, 2017 at 10:21:24AM -0400, Cleber Rosa wrote: >>>> On 07/21/2017 10:01 AM, Daniel P

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] qemu-iotests: turn owner variable into a comment

2017-11-17 Thread Cleber Rosa
On 11/17/2017 02:19 AM, Paolo Bonzini wrote: > On 16/11/2017 18:38, Cleber Rosa wrote: >> This variables has no real use. To avoid pretending it does, while >> still keeping the information, let's turn it into a comment. >> >> The format chosen is the one already bein

Re: [Qemu-block] [Qemu-devel] [PATCH 01/10] qemu-iotests: make execution of tests agnostic to test type

2017-11-17 Thread Cleber Rosa
On 11/17/2017 02:25 AM, Paolo Bonzini wrote: > On 16/11/2017 18:38, Cleber Rosa wrote: >> check makes a distinction on how it runs Python based tests. The >> current approach is inconsistent because: >> >> 1) a large number of Python tests are already set as execut

[Qemu-block] [PATCH 05/10] qemu-iotests: define functions used in _cleanup() before its use

2017-11-16 Thread Cleber Rosa
some tabs versus spaces indentation in _cleanup() in a few tests. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/001 | 6 +++--- tests/qemu-iotests/002 | 6 +++--- tests/qemu-iotests/003 | 6 +++--- tests/qemu-iotests/004 | 6 +++--- tests/qemu-iotests/00

[Qemu-block] [PATCH 08/10] qemu-iotests: clean up double comment characters

2017-11-16 Thread Cleber Rosa
This is a syntactic only change, just to make it consistent with the style used on all other tests. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/048 | 37 ++--- tests/qemu-iotests/074 | 40 2

[Qemu-block] [PATCH 01/10] qemu-iotests: make execution of tests agnostic to test type

2017-11-16 Thread Cleber Rosa
it with "$SHELL $test_file", but it'd be pointless IMO, there's no value in the distinction that check makes. Dropping this distinction makes the interface simpler: check requires an executable file. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/096 | 0 tests/

[Qemu-block] [PATCH 03/10] qemu-iotests: be strict with expected output

2017-11-16 Thread Cleber Rosa
ot similar) to the recorded expected output. Let's drop this exception and make things more predictable. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/026.out | 92 +++--- tests/qemu-iotests/049.out | 4 +- tests/qemu-iote

[Qemu-block] [PATCH 00/10] I/O tests cleanups

2017-11-16 Thread Cleber Rosa
ges to how tests are executed and verified. Thanks! --- Cleber Rosa (10): qemu-iotests: add section on how to write a new I/O test qemu-iotests: remove unused "here" variable qemu-iotests: clean up double comment characters qemu-iotests: remove the concept of $seq.full (a

[Qemu-block] [PATCH 02/10] qemu-iotests: fix filename containing checks

2017-11-16 Thread Cleber Rosa
Commit cce293a2945 moved some functions from common.config to common.rc, but the error messages still reference the old file location. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/common.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test

[Qemu-block] [PATCH 09/10] qemu-iotests: remove unused "here" variable

2017-11-16 Thread Cleber Rosa
Another legacy variable that did not convince me it has any purpose whatsoever. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/001 | 1 - tests/qemu-iotests/002 | 1 - tests/qemu-iotests/003 | 1 - tests/qemu-iotests/004 | 1 - tests/qemu-iotests/005 | 1 - test

[Qemu-block] [PATCH 07/10] qemu-iotests: remove the concept of $seq.full (and boiler plate code)

2017-11-16 Thread Cleber Rosa
this function. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/001 | 1 - tests/qemu-iotests/002 | 1 - tests/qemu-iotests/003 | 1 - tests/qemu-iotests/004 | 1 - tests/qemu-iotests/005 | 1 - tests/qemu-iotests/007 | 1 - tests/qemu-iotests/008 | 1 - tests/qemu-iotes

[Qemu-block] [PATCH 04/10] qemu-iotests: include (source) filters from common.rc

2017-11-16 Thread Cleber Rosa
the amount of boiler plate code (while still making the comment found on almost every test "get standard environment, filters and checks" accurate. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/001 | 1 - tests/qemu-iotests/002 | 1 - tests/qemu-iotes

[Qemu-block] [PATCH 06/10] qemu-iotests: turn owner variable into a comment

2017-11-16 Thread Cleber Rosa
This variables has no real use. To avoid pretending it does, while still keeping the information, let's turn it into a comment. The format chosen is the one already being used on tests 149 and 194. Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/001 | 5 ++--- test

[Qemu-block] [PATCH 10/10] qemu-iotests: add section on how to write a new I/O test

2017-11-16 Thread Cleber Rosa
, general workflow proposed for writing a new test, etc. After feedback is received, I can go over and sync both sides (wiki and README). Signed-off-by: Cleber Rosa <cr...@redhat.com> --- tests/qemu-iotests/README | 44 ++-- tests/qemu-iotests/sample_test_tem

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 2/7] avocado: Update python scripts to upstream codebase

2018-04-30 Thread Cleber Rosa
On 04/19/2018 12:46 PM, Philippe Mathieu-Daudé wrote: > QEMUMachine arguments member is called '_args'. > > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/qemu.py| 14 +++--- > tests/avocado/avocado_qemu/test.py | 12 ++-- >

Re: [Qemu-block] [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-05 Thread Cleber Rosa
On 10/5/18 9:36 AM, Philippe Mathieu-Daudé wrote: > On 04/10/2018 18:18, Cleber Rosa wrote: >> Commit 990dc39c made all tests executable at the time, but 218 came in >> later, and missing those permissions. >> >> Signed-off-by: Cleber Rosa >> --- >>

Re: [Qemu-block] [Qemu-devel] [PATCH 1/9] iotests: Make nbd-fault-injector flush

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > When closing a connection, make the nbd-fault-injector flush the socket. > Without this, the output is a bit unreliable with Python 3. > > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

[Qemu-block] [RFC PATCH] iotests: make 083 specific to raw

2018-10-15 Thread Cleber Rosa
foo: Image not in qcow format I'm not aware if there's a quick fix, so, for the time being, it looks like the honest approach is to make the test known to work on raw only. Signed-off-by: Cleber Rosa --- tests/qemu-iotests/083 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: [Qemu-block] [Qemu-devel] [PATCH 2/9] iotests: Flush in iotests.py's QemuIoInteractive

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > After issuing a command, flush the pipe. This does not change anything > in Python 2, but it makes a difference in Python 3. > > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

Re: [Qemu-block] [PATCH 8/9] iotests: Modify imports for Python 3

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > There are two imports that need to be modified when running the iotests > under Python 3: One is StringIO, which no longer exists; instead, the > StringIO class comes from the io module, so import it from there. The > other is the ConfigParser, which

Re: [Qemu-block] [Qemu-devel] [PATCH 4/9] iotests: Use // for Python integer division

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > In Python 3, / is always a floating-point division. We usually do not > want this, and as Python 2.7 understands // as well, change all integer > divisions to use that. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/040| 4 ++-- >

Re: [Qemu-block] [Qemu-devel] [PATCH 6/9] iotests: Explicitly inherit FDs in Python

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > Python 3.2 introduced the inheritable attribute for FDs. At the same > time, it changed the default so that all FDs are not inheritable by > default, that only inheritable FDs are inherited to subprocesses, and > only if close_fds is explicitly set to

Re: [Qemu-block] [Qemu-devel] [PATCH 7/9] iotests: 'new' module replacement in 169

2018-10-15 Thread Cleber Rosa
On 10/15/18 7:57 PM, Eduardo Habkost wrote: > On Mon, Oct 15, 2018 at 07:38:45PM -0400, Cleber Rosa wrote: >> >> >> On 10/15/18 10:14 AM, Max Reitz wrote: >>> iotest 169 uses the 'new' module to add methods to a class. This module >>> no longer exists in

Re: [Qemu-block] [PATCH 8/9] iotests: Modify imports for Python 3

2018-10-15 Thread Cleber Rosa
On 10/15/18 5:17 PM, Eduardo Habkost wrote: > On Mon, Oct 15, 2018 at 04:14:52PM +0200, Max Reitz wrote: >> There are two imports that need to be modified when running the iotests >> under Python 3: One is StringIO, which no longer exists; instead, the >> StringIO class comes from the io

Re: [Qemu-block] [Qemu-devel] [PATCH 5/9] iotests: Different iterator behavior in Python 3

2018-10-15 Thread Cleber Rosa
jor == 2: range = xrange Defaulting to the Python 3 names, but behaving the same across Python 2 and 3. To do the same for dict.iteritems() => dict.items() requires a lot more code, so I'd stay away from it for now. Also, it looks like most of those dicts are small in size (**kwargs and the like). Other than that suggestion, Reviewed-by: Cleber Rosa

Re: [Qemu-block] [PATCH 7/9] iotests: 'new' module replacement in 169

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > iotest 169 uses the 'new' module to add methods to a class. This module > no longer exists in Python 3. Instead, we can use a lambda. Best of > all, this works in 2.7 just as well. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/169 | 3 +--

Re: [Qemu-block] [PATCH v2 5/9] iotests: Different iterator behavior in Python 3

2018-10-19 Thread Cleber Rosa
instance is changed to use list comprehension with a next() > wrapped around, which works both in 2.7 and 3. > > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

Re: [Qemu-block] [PATCH v2 6/9] iotests: Explicitly inherit FDs in Python

2018-10-19 Thread Cleber Rosa
plicitly set to False. > > Adhere to this by setting close_fds to False when working with > subprocesses that may want to inherit FDs, and by trying to > set_inheritable() on FDs that we do want to bequeath to them. > > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

Re: [Qemu-block] [PATCH v2 7/9] iotests: 'new' module replacement in 169

2018-10-19 Thread Cleber Rosa
y: Eduardo Habkost Reviewed-by: Cleber Rosa

Re: [Qemu-block] [Qemu-devel] [PATCH v2 4/9] iotests: Use // for Python integer division

2018-10-19 Thread Cleber Rosa
On 10/19/18 3:15 PM, Max Reitz wrote: > In Python 3, / is always a floating-point division. We usually do not > want this, and as Python 2.7 understands // as well, change all integer > divisions to use that. > > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

Re: [Qemu-block] [PATCH v2 8/9] iotests: Modify imports for Python 3

2018-10-19 Thread Cleber Rosa
for Python 2). The other is the ConfigParser, > which has just been renamed to configparser. > > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

Re: [Qemu-block] [PATCH v2 9/9] iotests: Unify log outputs between Python 2 and 3

2018-10-19 Thread Cleber Rosa
fix of large integers is > dropped, and "true" and "false" are now in lower case). > The quote change necessitates a small change to a filter used in test > 207. > > Suggested-by: Eduardo Habkost > Signed-off-by: Max Reitz Reviewed-by: Cleber Rosa

Re: [Qemu-block] [PATCH v2 0/9] iotests: Make them work for both Python 2 and 3

2018-10-19 Thread Cleber Rosa
'io' for use with the test runner), but most of the > time, it just makes code work for both versions in general. > Tested on both Python 2 and 3. Tested-by: Cleber Rosa

Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-07 Thread Cleber Rosa
On 11/7/18 1:05 AM, Markus Armbruster wrote: > Eduardo Habkost writes: > >> The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis >> seems to provide an older version. Change the existing rules to >> use command output instead of exit code, to make it compatible >> with older GNU

[Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-09 Thread Cleber Rosa
The initial goal of this RFC is to get feedback on tests not specific to the QEMU main binary, but specific to other components such as qemu-img. For this experiment, a small issue with the zero and negative number of I/O operations given to the bench command was chosen. Cleber Rosa (2

[Qemu-block] [RFC PATCH 2/2] qemu-img: consider a zero number of I/O requests an invalid count

2018-11-09 Thread Cleber Rosa
vailable sources. That would make the symlink unnecessary. Reference: https://avocado-framework.readthedocs.io/en/65.0/api/core/avocado.core.html#avocado.core.test.TestData Signed-off-by: Cleber Rosa --- qemu-img.c | 8 ++--- tests/acceptance/q

[Qemu-block] [RFC PATCH 1/2] Acceptance Tests: add QemuImgTest base class

2018-11-09 Thread Cleber Rosa
Testing other utilities such as qemu-img do not require the same infrastructure that testing QEMU itself does. Let's add a base class that just sets the suitable qemu-img binary to be used during test. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 20

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-08 Thread Cleber Rosa
On 11/8/18 1:26 PM, Eduardo Habkost wrote: > On Thu, Nov 08, 2018 at 12:36:37PM -0500, Cleber Rosa wrote: >> >> >> On 11/8/18 11:51 AM, Eduardo Habkost wrote: >> >>> I'm not sure I agree with the "is an important thing to keep >>> track of"

Re: [Qemu-block] [RFC PATCH 2/2] qemu-img: consider a zero number of I/O requests an invalid count

2018-11-12 Thread Cleber Rosa
On 11/12/18 9:38 AM, Philippe Mathieu-Daudé wrote: > On 9/11/18 23:12, Cleber Rosa wrote: >> It's debatable whether it makes sense to consider the bench command >> successful when no I/O requests will be performed.  This changes the >> behavior to consider a zero

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-12 Thread Cleber Rosa
On 11/12/18 5:49 AM, Kevin Wolf wrote: > Am 09.11.2018 um 23:12 hat Cleber Rosa geschrieben: >> The initial goal of this RFC is to get feedback on tests not specific >> to the QEMU main binary, but specific to other components such as >> qemu-img. >> >> F

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Cleber Rosa
On 11/13/18 7:18 AM, Kevin Wolf wrote: > Am 12.11.2018 um 18:36 hat Cleber Rosa geschrieben: >> I hope you don't blame me for trying to have the advantage of the >> counter answer. :) > > Thanks for being so honest, but do you actually need this advantage when >

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Cleber Rosa
On 11/13/18 8:50 AM, Daniel P. Berrangé wrote: > On Tue, Nov 13, 2018 at 10:39:57AM +0100, Markus Armbruster wrote: >> Drive-by comment... >> >> Cleber Rosa writes: >> >> [...] >>> My impression is that the "infrastructure for block tests&quo

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Cleber Rosa
On 11/13/18 8:51 AM, Kevin Wolf wrote: > Am 13.11.2018 um 14:26 hat Eduardo Habkost geschrieben: >> On Tue, Nov 13, 2018 at 01:18:36PM +0100, Kevin Wolf wrote: >> [...] >>> Anyway, one specific concern about the "simple way" I have is that we're >>> adding a hard dependency on an external

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Cleber Rosa
On 11/13/18 9:32 AM, Eduardo Habkost wrote: > On Tue, Nov 13, 2018 at 09:20:11AM -0500, Cleber Rosa wrote: > > With check-venv, we made "installing avocado" a small > implementation detail that people don't need to care about when > running the tests. > > I b

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-08 Thread Cleber Rosa
On 11/8/18 3:45 AM, Markus Armbruster wrote: > Cleber Rosa writes: > >> On 11/7/18 1:05 AM, Markus Armbruster wrote: >>> Eduardo Habkost writes: >>> >>>> The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis >>>> seem

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-08 Thread Cleber Rosa
On 11/8/18 11:51 AM, Eduardo Habkost wrote: > I'm not sure I agree with the "is an important thing to keep > track of" part. I don't think we'll have any need to keep track > of the Python version in shell script or makefiles after we start > requiring Python 3. > Well, "Python 3" is not a

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-12 Thread Cleber Rosa
On 11/12/18 11:00 AM, Kevin Wolf wrote: > Am 12.11.2018 um 15:59 hat Cleber Rosa geschrieben: >> >> On 11/12/18 5:49 AM, Kevin Wolf wrote: >>> Am 09.11.2018 um 23:12 hat Cleber Rosa geschrieben: >>>> The initial goal of this RFC is to get feedback on test

Re: [Qemu-block] [Qemu-devel] [PATCH 01/10] qemu-img.c: comment typo fix

2018-10-04 Thread Cleber Rosa
On 10/4/18 12:48 PM, Eric Blake wrote: > On 10/4/18 11:18 AM, Cleber Rosa wrote: >> A trivial comment typo fix. >> >> Signed-off-by: Cleber Rosa >> --- >>   qemu-img.c | 2 +- >>   1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff

[Qemu-block] [PATCH 07/10] scripts/decodetree.py: remove unused imports

2018-10-04 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- scripts/decodetree.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 277f9a9bba..457cffea90 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -149,12 +149,10 @@ # trans_addl_i(ctx, _opi

[Qemu-block] [PATCH 10/10] scripts/qemu.py: remove trailing quotes on docstring

2018-10-04 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- scripts/qemu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index 7abe26de69..676eb9709a 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -88,7 +88,7 @@ class QEMUMachine(object): @param name

[Qemu-block] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-04 Thread Cleber Rosa
Commit 990dc39c made all tests executable at the time, but 218 came in later, and missing those permissions. Signed-off-by: Cleber Rosa --- tests/qemu-iotests/218 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/qemu-iotests/218 diff --git a/tests/q

[Qemu-block] [PATCH 00/10] Trivial fixes and clean ups

2018-10-04 Thread Cleber Rosa
Just a collection of trivial fixes and clean ups that have been lying around here for some time. Cleber Rosa (10): qemu-img.c: comment typo fix tests/tcg/README: fix location for lm32 tests qemu-iotests: make 218 executable qemu-iotests: fix filename containing checks docs/devel

[Qemu-block] [PATCH 01/10] qemu-img.c: comment typo fix

2018-10-04 Thread Cleber Rosa
A trivial comment typo fix. Signed-off-by: Cleber Rosa --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index b12f4cd19b..a96b76c187 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1085,7 +1085,7 @@ static int64_t find_nonzero(const uint8_t

[Qemu-block] [PATCH 02/10] tests/tcg/README: fix location for lm32 tests

2018-10-04 Thread Cleber Rosa
Point to the right and obvious location for lm32 tests. Signed-off-by: Cleber Rosa --- tests/tcg/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/README b/tests/tcg/README index a5643d33e7..2a58f9a058 100644 --- a/tests/tcg/README +++ b/tests/tcg/README

[Qemu-block] [PATCH 06/10] thunk.c: clean up commented out definition

2018-10-04 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- thunk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/thunk.c b/thunk.c index d5d8645cd4..e351ae53af 100644 --- a/thunk.c +++ b/thunk.c @@ -21,8 +21,6 @@ #include "qemu.h" #include "exec/user/thunk.h" -//#define DEBUG -

[Qemu-block] [PATCH 08/10] scripts/decodetree.py: fix reference to attributes

2018-10-04 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- scripts/decodetree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 457cffea90..37c76b5507 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -298,7 +298,7 @@ class Field

Re: [Qemu-block] [PATCH 06/10] thunk.c: clean up commented out definition

2018-10-04 Thread Cleber Rosa
On 10/4/18 12:24 PM, Laurent Vivier wrote: > Le 04/10/2018 à 18:18, Cleber Rosa a écrit : >> Signed-off-by: Cleber Rosa >> --- >> thunk.c | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/thunk.c b/thunk.c >> index d5d8645cd4..e351ae

[Qemu-block] [PATCH 04/10] qemu-iotests: fix filename containing checks

2018-10-04 Thread Cleber Rosa
Commit cce293a2945 moved some functions from common.config to common.rc, but the error messages still reference the old file location. Signed-off-by: Cleber Rosa --- tests/qemu-iotests/common.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/common.rc

[Qemu-block] [PATCH 09/10] scripts/qemu.py: use a more consistent docstring style

2018-10-04 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- dtc | 2 +- scripts/qemu.py | 65 +++-- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/dtc b/dtc index 88f18909db..e54388015a 16 --- a/dtc +++ b/dtc @@ -1 +1 @@ -Subproject commit

Re: [Qemu-block] [Qemu-devel] [PATCH 09/10] scripts/qemu.py: use a more consistent docstring style

2018-10-04 Thread Cleber Rosa
On 10/4/18 12:50 PM, Eric Blake wrote: > On 10/4/18 11:18 AM, Cleber Rosa wrote: >> Signed-off-by: Cleber Rosa >> --- >>   dtc |  2 +- >>   scripts/qemu.py | 65 +++-- >>   2 files changed, 42 insertio

Re: [Qemu-block] [RFC PATCH] Introduce Python module structure

2018-11-27 Thread Cleber Rosa
On 11/27/18 2:49 PM, Eduardo Habkost wrote: > On Tue, Nov 27, 2018 at 05:00:07PM -0200, Caio Carrara wrote: >> Hi, Cleber. >> >> On Tue, Nov 27, 2018 at 05:50:34AM -0500, Cleber Rosa wrote: >>> This is a simple move of Python code that wraps common QEMU &

Re: [Qemu-block] [RFC PATCH] Introduce Python module structure

2018-11-27 Thread Cleber Rosa
On 11/27/18 2:00 PM, Caio Carrara wrote: > Hi, Cleber. > > On Tue, Nov 27, 2018 at 05:50:34AM -0500, Cleber Rosa wrote: >> This is a simple move of Python code that wraps common QEMU >> functionality, and are used by a number of different tests >> and scripts.

[Qemu-block] [RFC PATCH] Introduce Python module structure

2018-11-27 Thread Cleber Rosa
* generate documentation Signed-off-by: Cleber Rosa --- configure | 1 + scripts/qemu.py => python/qemu/__init__.py | 11 ++- {scripts/qmp => python/qemu}/qmp.py| 0 {scripts => python/qemu}/qtest.py | 5 +++-- scripts/dev

Re: [Qemu-block] [PULL 0/7] Python queue, 2019-02-22

2019-03-06 Thread Cleber Rosa
On Fri, Mar 01, 2019 at 02:38:45PM +, Peter Maydell wrote: > On Fri, 22 Feb 2019 at 19:41, Cleber Rosa wrote: > > > > The following changes since commit 8eb29f1bf5a974dc4c11d2d1f5e7c7f7a62be116: > > > > Merge remote-tracking branch > > 'remotes/awil

Re: [Qemu-block] [Qemu-devel] [PATCH v2] iotests: handle TypeError for Python3 in test 242

2019-02-22 Thread Cleber Rosa
ys.version_info.major == 2: ... Because this is already present on other tests, and IIRC Max mentioned using this as an easy to find flag the moment Python 2 support is to be dropped. But, looking for "sys.version_info.major" is just as effective, so: Reviewed-by: Cleber Rosa > > qemu_img_create('-f', iotests.imgfmt, disk, '1M') >

[Qemu-block] [PULL 2/7] Introduce a Python module structure

2019-02-22 Thread Cleber Rosa
style * generate documentation Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Stefan Hajnoczi Message-Id: <20190206162901.19082-2-cr...@redhat.com> Signed-off-by: Cleber Rosa --- configure | 1 + scripts/qemu.py => python/qemu/__init_

[Qemu-block] [PULL 3/7] scripts/qemu.py: log QEMU launch command line

2019-02-22 Thread Cleber Rosa
Even when the launch of QEMU succeeds, it's useful to have the command line recorded. Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Cleber Rosa Message-Id: <20190202005610.24048-2-cr...@redhat.com> Signed-off-by: Cleber Rosa ---

[Qemu-block] [PULL 5/7] tests.acceptance: adds simple migration test

2019-02-22 Thread Cleber Rosa
From: Caio Carrara This change adds the simplest possible migration test. Beyond the test purpose itself it's also useful to exercise the multi virtual machines capabilities from base avocado qemu test class. Signed-off-by: Cleber Rosa Signed-off-by: Caio Carrara Reviewed-by: Cleber Rosa

[Qemu-block] [PULL 0/7] Python queue, 2019-02-22

2019-02-22 Thread Cleber Rosa
avocado: enable" Caio Carrara (2): tests.acceptance: adds multi vm capability for acceptance tests tests.acceptance: adds simple migration test Cleber Rosa (3): Acceptance tests: drop usage of ":avocado: enable" Introduce a Python module structure scripts/qemu.py: log QEMU l

[Qemu-block] [PULL 1/7] Acceptance tests: drop usage of ":avocado: enable"

2019-02-22 Thread Cleber Rosa
oiler plate statements can now be removed. Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Message-Id: <201902

[Qemu-block] [PULL 7/7] Acceptance tests: expect boot to extract 2GiB+ initrd with linux-v4.16

2019-02-22 Thread Cleber Rosa
: Cleber Rosa CC: Eduardo Habkost CC: Philippe Mathieu-Daudé Signed-off-by: Li Zhijian Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Message-Id: <1548638112-31101-2-git-send-email-lizhij...@cn.fujitsu.com> Signed-off-by: Cleber Rosa --- tests/acceptance/linux_initrd.p

[Qemu-block] [PULL 6/7] Acceptance tests: use linux-3.6 and set vm memory to 4GiB

2019-02-22 Thread Cleber Rosa
Santos Moschetta CC: Caio Carrara CC: Cleber Rosa CC: Eduardo Habkost CC: Philippe Mathieu-Daudé Signed-off-by: Li Zhijian Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Message-Id: <1548638112-31101-1-git-send-email-lizhij...@cn.fujitsu.com> Signed-off-by: Clebe

[Qemu-block] [PULL 4/7] tests.acceptance: adds multi vm capability for acceptance tests

2019-02-22 Thread Cleber Rosa
usage of vm in tests will not be broken by this change since it keeps a property called vm in the base test class. This property only calls the new method `get_vm` with default parameters (no args and 'default' as machine name). Signed-off-by: Caio Carrara Reviewed-by: Cleber Rosa Reviewed

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: handle TypeError for Python3 in test 242

2019-02-21 Thread Cleber Rosa
On 2/18/19 4:25 PM, Philippe Mathieu-Daudé wrote: > On 2/18/19 9:05 PM, Eric Blake wrote: >> [adding Eduardo for some python 2-vs-3 advice] > > And Cleber. > >> >> On 2/18/19 1:59 PM, Andrey Shinkevich wrote: >>> To write one byte to disk, Python2 may use 'chr' type. >>> In Python3,

[Qemu-block] [PATCH 1/1] Introduce a Python module structure

2019-02-06 Thread Cleber Rosa
style * generate documentation Signed-off-by: Cleber Rosa --- configure | 1 + scripts/qemu.py => python/qemu/__init__.py | 11 ++- {scripts/qmp => python/qemu}/qmp.py| 0 {scripts => python/qemu}/qtest.py | 5 +++-- scripts/dev

[Qemu-block] [PATCH 0/1] Introduce a Python module structure

2019-02-06 Thread Cleber Rosa
- Git Info: - URI: https://github.com/clebergnu/qemu/tree/sent/python_module - Remote: https://github.com/clebergnu/qemu - Branch: sent/python_module Travis CI Info: - Job: https://travis-ci.org/clebergnu/qemu/builds/489616874 Cleber Rosa (1): Introduce a Python module s

Re: [Qemu-block] [PATCH 0/2] qemu-iotests: add a Travis job

2019-02-18 Thread Cleber Rosa
On 2/8/19 11:01 PM, Cleber Rosa wrote: > Besides the obvious reasons of testing more, and somewhat for free, > running the qemu-iotests along the other tests on Travis also makes > sure that changes to shared code such as "scripts/qemu.py" and the > like won't break other

[Qemu-block] [PATCH 1/2] qemu-iotests: only enable kvm if the host seems to support it

2019-02-08 Thread Cleber Rosa
There are certainly some improvements to be made with regards to kvm capabilities detection, but this seems good enough for this specific case. Signed-off-by: Cleber Rosa --- tests/qemu-iotests/235 | 5 +++-- tests/qemu-iotests/238 | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions

[Qemu-block] [PATCH 2/2] qemu-iotests: add "make check-block" job to Travis

2019-02-08 Thread Cleber Rosa
e "Unknown driver selected". Signed-off-by: Cleber Rosa --- .travis.yml | 8 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 87d9fa971c..6d60ae9762 100644 --- a/.travis.yml +++ b/.travis.yml @@ -196,6 +196,14 @@ matrix: packages:

[Qemu-block] [PATCH 0/2] qemu-iotests: add a Travis job

2019-02-08 Thread Cleber Rosa
Besides the obvious reasons of testing more, and somewhat for free, running the qemu-iotests along the other tests on Travis also makes sure that changes to shared code such as "scripts/qemu.py" and the like won't break other users of the same code. Cleber Rosa (2): qemu-iotests: o

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/6] Allow Valgrind checking all QEMU processes

2019-08-16 Thread Cleber Rosa
On Fri, Jul 19, 2019 at 07:30:10PM +0300, Andrey Shinkevich wrote: > In the current implementation of the QEMU bash iotests, only qemu-io > processes may be run under the Valgrind, which is a useful tool for > finding memory usage issues. Let's allow the common.rc bash script > runing all the QEMU

Re: [Qemu-block] [PATCH v5 3/6] iotests: Add casenotrun report to bash tests

2019-08-16 Thread Cleber Rosa
e function. > > > > Oh, I assume this is a sub-test granularity; if we need to skip > individual items. > > I'm good with this, but we should CC Cleber Rosa, who has struggled > against this in the past, too. > The discussion I was involved in was not that much a

[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

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

Re: [PATCH v1 4/4] iotests: add test for virtio-scsi and virtio-blk machine type settings

2019-11-07 Thread Cleber Rosa
On Wed, Nov 06, 2019 at 04:26:41PM -0300, Eduardo Habkost wrote: > On Wed, Nov 06, 2019 at 11:04:16AM +0100, Max Reitz wrote: > > On 06.11.19 10:24, Stefan Hajnoczi wrote: > > > On Tue, Nov 05, 2019 at 07:11:05PM +0300, Denis Plotnikov wrote: > > >> It tests proper queue size settings for all

Re: [PATCH v2 0/7] Enable Travis builds on arm64, ppc64le and s390x

2019-12-04 Thread Cleber Rosa
On Wed, Dec 04, 2019 at 04:46:11PM +0100, Thomas Huth wrote: > Travis recently added build hosts for arm64, ppc64le and s390x, so > this is a welcome addition to our Travis testing matrix. > > Unfortunately, the builds are running in quite restricted LXD containers > there, for example it is not

  1   2   3   >