Re: [PATCH] tests/qemu_iotests: Minimize usage of used ports

2020-02-06 Thread Lukáš Doktor
Dne 06. 02. 20 v 16:03 Max Reitz napsal(a): > On 03.02.20 08:59, Lukáš Doktor wrote: >> Using a range of ports from 32768 to 65538 is dangerous as some >> application might already be listening there and interfere with the >> testing. There is no way to reserve ports, but let&

Re: [PATCH] tests/qemu_iotests: Minimize usage of used ports

2020-02-06 Thread Lukáš Doktor
Dne 06. 02. 20 v 17:59 Max Reitz napsal(a): > On 06.02.20 17:48, Eric Blake wrote: >> On 2/6/20 10:37 AM, Max Reitz wrote: >> thank you and I am sorry for not digging deep enough. This week my CI failed with: 01:24:06 DEBUG| [stdout] +ERROR: test_inet (__main__.QemuNBD) >>>

Performance improvement with 58a2e3f5c37be02dac3086b81bdda9414b931edf

2023-05-16 Thread Lukáš Doktor
Hello Stefan, folks, the perf-ci detected and bisected the 58a2e3f5c37 - block: compile out assert_bdrv_graph_readable() by default - as a performance improvement especially with 4K reads with multiple jobs (but minor improvements were observed in other variants) https://ldoktor.github.io/

Re: Performance improvement with 58a2e3f5c37be02dac3086b81bdda9414b931edf

2023-05-16 Thread Lukáš Doktor
Dne 16. 05. 23 v 15:19 Stefan Hajnoczi napsal(a): > On Tue, 16 May 2023 at 08:56, Lukáš Doktor wrote: >> >> Hello Stefan, folks, >> >> the perf-ci detected and bisected the 58a2e3f5c37 - block: compile out >> assert_bdrv_graph_readable() by default - as a perfo

Re: qemu-nbd performance regression in bd2cd4a4

2023-04-12 Thread Lukáš Doktor
I see, let me mark it as "expected" regression and hopefully I'll detect the optimization if they are ever implemented. Thank you for the explanation. Regards, Lukáš Dne 06. 04. 23 v 17:07 Eric Blake napsal(a): > On Thu, Apr 06, 2023 at 12:55:38PM +0200, Lukáš Doktor wrote

Performance improvement with 81f730d4

2023-04-18 Thread Lukáš Doktor
Hello Paolo, the perf-ci detected and bisected the 81f730d4 - block, block-backend: write some hot coroutine wrappers by hand - as a performance improvement with 4K read/writes across various profiles. Without pinning it was about 10%, with pinned qemu about 15%. https://ldoktor.github.io/

Re: Performance improvement with 81f730d4

2023-04-19 Thread Lukáš Doktor
Hello Kevin Dne 19. 04. 23 v 10:16 Kevin Wolf napsal(a): > Hi Lukáš, > > Am 19.04.2023 um 08:02 hat Lukáš Doktor geschrieben: >> Hello Paolo, >> >> the perf-ci detected and bisected the 81f730d4 - block, block-backend: >> write some hot coroutine wr

Performance improvement with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-25 Thread Lukáš Doktor
Hello Stefan, folks, the perf-ci detected and bisected the 6d740fb - aio-posix: do not nest poll handlers - as a performance improvement when using multiple concurrent jobs and 4k (22%) as well as 1024k (63%) blocks on aarch64 (on a slow rotational disk). https://ldoktor.github.io/tmp/RedH

Re: Performance improvement with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-26 Thread Lukáš Doktor
Dne 25. 05. 23 v 17:21 Stefan Hajnoczi napsal(a): > On Thu, 25 May 2023 at 06:18, Lukáš Doktor wrote: >> the perf-ci detected and bisected the 6d740fb - aio-posix: do not nest poll >> handlers - as a performance improvement when using multiple concurrent jobs >> and 4k (

Qemu-storage-daemon crash with 8ab8140 or later

2023-03-13 Thread Lukáš Doktor
ne (qemu-storage-daemon + 0x1a9bcb) #11 0x7f89c222a360 n/a (libc.so.6 + 0x2a360) ELF object binary architecture: AMD x86-64 Regards, Lukáš Doktor OpenPGP_0x26B362E47FCF22C1.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Fio regression caused by f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94

2022-05-03 Thread Lukáš Doktor
Hello Mike, Paolo, others, in my perf pipeline I noticed a regression bisected to the f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94 - "thread-posix: remove the posix semaphore support" commit and I'd like to ask you to verify it might have caused that and eventually consider fixing it. The regressio

Re: Fio regression caused by f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94

2022-05-05 Thread Lukáš Doktor
Hello all, thank you for the responses, I ran 3 runs per each commit using 5 iteration of fio-nbd using f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94 f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94 + Stefan's commit d7482ffe9756919531307330fd1c6dbec66e8c32 using the regressed f9fc8932b11f3bcf2a2626f567cb6

Re: [PATCH 0/2] thread-pool: fix performance regression

2022-05-06 Thread Lukáš Doktor
Hello Paolo, folks, I gave it a try (on top of the f9fc8932) and it's better than the f9fc8932, better than the previous patch by Stefan, but still I'm not reaching the performance of d7482ffe97 (before the f9fc8932 commit): f9f| 0.0 | -2.8 | 0.6 stefan | -3.1 | -1.2 | -2.2 paolo | 5.3 |

Re: [PATCH 0/2] thread-pool: fix performance regression

2022-05-08 Thread Lukáš Doktor
Dne 06. 05. 22 v 20:55 Lukáš Doktor napsal(a): > Hello Paolo, folks, I gave it a try (on top of the f9fc8932) and it's better > than the f9fc8932, better than the previous patch by Stefan, but still I'm > not reaching the performance of d7482ffe97 (before the f9fc8932 commit):

Re: [PATCH] virtio-blk: add missing AioContext lock

2023-02-08 Thread Lukáš Doktor
quire(ctx); > > blk_get_geometry(s->blk, &capacity); > memset(&blkcfg, 0, sizeof(blkcfg)); > @@ -917,6 +921,7 @@ static void virtio_blk_update_config(VirtIODevice *vdev, > uint8_t *config) > * per track (cylinder). > */ > length = blk_getlength(s->blk); > +aio_context_release(ctx); > if (length > 0 && length / conf->heads / conf->secs % blk_size) { > blkcfg.geometry.sectors = conf->secs & ~s->sector_mask; > } else { Thanks, I can't talk about the correctness of the code but function-wise it addresses the issue. Tested-by: Lukáš Doktor OpenPGP_0x26B362E47FCF22C1.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: Proposal for a regular upstream performance testing

2022-03-21 Thread Lukáš Doktor
. It should not replace thorough release testing or low-level performance tests. Regards, Lukáš Dne 26. 11. 20 v 9:10 Lukáš Doktor napsal(a): > Hello guys, > > I had been around qemu on the Avocado-vt side for quite some time and a while > ago I shifted my focus on performance t

Re: Proposal for a regular upstream performance testing

2022-03-21 Thread Lukáš Doktor
Hello Stefan, Dne 21. 03. 22 v 10:42 Stefan Hajnoczi napsal(a): > On Mon, Mar 21, 2022 at 09:46:12AM +0100, Lukáš Doktor wrote: >> Dear qemu developers, >> >> you might remember the "replied to" email from a bit over year ago to raise >> a discussion about

Re: Proposal for a regular upstream performance testing

2022-03-27 Thread Lukáš Doktor
. 03. 22 v 16:05 Stefan Hajnoczi napsal(a): > On Mon, Mar 21, 2022 at 11:29:42AM +0100, Lukáš Doktor wrote: >> Hello Stefan, >> >> Dne 21. 03. 22 v 10:42 Stefan Hajnoczi napsal(a): >>> On Mon, Mar 21, 2022 at 09:46:12AM +0100, Lukáš Doktor wrote: >>>> Dear qem

Re: Proposal for a regular upstream performance testing

2022-03-28 Thread Lukáš Doktor
Dne 28. 03. 22 v 11:57 Stefan Hajnoczi napsal(a): > On Mon, Mar 28, 2022 at 08:18:43AM +0200, Lukáš Doktor wrote: >> Hello Stefan, folks, >> >> I seem to have another hit, an improvement actually and it seems to be >> bisected all the way to you, Stefan. Let me use

Re: [PATCH] virtio-blk: fix host notifier issues during dataplane start/stop

2023-07-10 Thread Lukáš Doktor
00% CPU consumption in the main loop thread and > correctly moves host notifier processing to the IOThread. > > Fixes: 1665d9326fd2 ("virtio-blk: implement BlockDevOps->drained_begin()") > Reported-by: Lukáš Doktor > Signed-off-by: Stefan Hajnoczi > --- > hw/b

Re: [PATCH] block/nvme: invoke blk_io_plug_call() outside q->lock

2023-07-17 Thread Lukáš Doktor
startup while opening the NVMe drive. > > Fix this by moving the blk_io_plug_call() outside q->lock. This is safe > because no other thread runs code related to this queue and > blk_io_plug_call()'s internal state is immune to thread safety issues > since it is thread-local

Re: Performance improvement with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-31 Thread Lukáš Doktor
Dne 26. 05. 23 v 12:56 Stefan Hajnoczi napsal(a): > On Fri, 26 May 2023 at 04:07, Lukáš Doktor wrote: >> >> Dne 25. 05. 23 v 17:21 Stefan Hajnoczi napsal(a): >>> On Thu, 25 May 2023 at 06:18, Lukáš Doktor wrote: >>>> the perf-ci detected and bisected

Re: Performance improvement and regression with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-31 Thread Lukáš Doktor
Dne 31. 05. 23 v 19:14 Stefan Hajnoczi napsal(a): > On Wed, 31 May 2023 at 12:50, Lukáš Doktor wrote: >> >> Dne 26. 05. 23 v 12:56 Stefan Hajnoczi napsal(a): >>> On Fri, 26 May 2023 at 04:07, Lukáš Doktor wrote: >>>> >>>> Dne 25. 05. 23 v 17:21

[Qemu-devel] [PATCH v5 09/10] qmp.py: Avoid overriding a builtin object

2017-08-15 Thread Lukáš Doktor
The "id" is a builtin method to get object's identity and should not be overridden. This might bring some issues in case someone was directly calling "cmd(..., id=id)" but I haven't found such usage on brief search for "cmd\(.*id=". Signed-off-by: Lu

[Qemu-devel] [PATCH v5 06/10] qmp.py: Couple of pylint/style fixes

2017-08-15 Thread Lukáš Doktor
No actual code changes, just initializing attributes earlier to avoid AttributeError on early introspection, a few pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qmp.py | 37

[Qemu-devel] [PATCH v5 10/10] qtest.py: Few pylint/style fixes

2017-08-15 Thread Lukáš Doktor
No actual code changes, just few pylint/style fixes. Signed-off-by: Lukáš Doktor Reviewed-by: John Snow --- scripts/qtest.py | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/qtest.py b/scripts/qtest.py index ab183c0..df0daf2 100644 --- a/scripts/qtest.py

[Qemu-devel] [PATCH v5 08/10] qmp.py: Avoid "has_key" usage

2017-08-15 Thread Lukáš Doktor
The "has_key" is deprecated in favor of "__in__" operator. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp.py b/scri

[Qemu-devel] [PATCH v5 00/10] qemu.py: Pylint/style fixes

2017-08-15 Thread Lukáš Doktor
- Avoid bool comparison - Change report to return in one docstring - Removed the unnecessary spaces around single-line docstring Lukáš Doktor (10): qemu.py: Pylint/style fixes qemu|qtest: Avoid dangerous arguments qemu.py: Use iteritems rather than keys() qemu.py: Simplify QMP key-conversio

[Qemu-devel] [PATCH v5 01/10] qemu.py: Pylint/style fixes

2017-08-15 Thread Lukáš Doktor
No actual code changes, just several pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor --- scripts/qemu.py | 76 - 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py

[Qemu-devel] [PATCH v5 02/10] qemu|qtest: Avoid dangerous arguments

2017-08-15 Thread Lukáš Doktor
uot;) >>> print vm2._wrapper ['foo'] In this case the `args` is actually copied so it would be safe to keep it, but it's not a good practice to keep it. The same issue applies in inherited qtest module. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Revi

[Qemu-devel] [PATCH v5 03/10] qemu.py: Use iteritems rather than keys()

2017-08-15 Thread Lukáš Doktor
Let's avoid creating an in-memory list of keys and query for each value and use `iteritems` which is an iterator of key-value pairs. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé --- scripts/qemu.py | 6 +++--- 1 file changed, 3 insertions(

Re: [Qemu-devel] [PATCH v5 01/10] qemu.py: Pylint/style fixes

2017-08-16 Thread Lukáš Doktor
Dne 15.8.2017 v 14:31 Markus Armbruster napsal(a): > Lukáš Doktor writes: > >> No actual code changes, just several pylint/style fixes and docstring >> clarifications. >> >> Signed-off-by: Lukáš Doktor &

Re: [Qemu-devel] [PATCH v5 01/10] qemu.py: Pylint/style fixes

2017-08-16 Thread Lukáš Doktor
Dne 16.8.2017 v 18:58 Markus Armbruster napsal(a): > Lukáš Doktor writes: > >> Dne 15.8.2017 v 14:31 Markus Armbruster napsal(a): >>> Lukáš Doktor writes: >>> >>>> No actual code changes, just several pylint/style fixes and docstring >>>>

Re: [Qemu-devel] [PATCH v5 01/10] qemu.py: Pylint/style fixes

2017-08-17 Thread Lukáš Doktor
Dne 17.8.2017 v 07:24 Markus Armbruster napsal(a): > Lukáš Doktor writes: > >> Dne 16.8.2017 v 18:58 Markus Armbruster napsal(a): >>> Lukáš Doktor writes: >>> >>>> Dne 15.8.2017 v 14:31 Markus Armbruster napsal(a): >>>>> Lukáš Doktor

[Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes

2017-08-18 Thread Lukáš Doktor
- Avoid bool comparison - Change report to return in one docstring - Removed the unnecessary spaces around single-line docstring Changes in v6 - Bunch of docstring tweaks by Markus Armbruster - Line break in <80 chars - result dict => response dict - Removed the "event_match" rename Luk

[Qemu-devel] [PATCH v6 02/10] qemu|qtest: Avoid dangerous arguments

2017-08-18 Thread Lukáš Doktor
uot;) >>> print vm2._wrapper ['foo'] In this case the `args` is actually copied so it would be safe to keep it, but it's not a good practice to keep it. The same issue applies in inherited qtest module. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Revi

[Qemu-devel] [PATCH v6 01/10] qemu.py: Pylint/style fixes

2017-08-18 Thread Lukáš Doktor
No actual code changes, just several pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor Reviewed-by: Stefan Hajnoczi --- scripts/qemu.py | 73 +++-- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a

[Qemu-devel] [PATCH v6 06/10] qmp.py: Couple of pylint/style fixes

2017-08-18 Thread Lukáš Doktor
No actual code changes, just initializing attributes earlier to avoid AttributeError on early introspection, a few pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qmp.py | 37

[Qemu-devel] [PATCH v6 03/10] qemu.py: Use iteritems rather than keys()

2017-08-18 Thread Lukáš Doktor
Let's avoid creating an in-memory list of keys and query for each value and use `iteritems` which is an iterator of key-value pairs. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé --- scripts/qemu.py | 6 +++--- 1 file changed, 3 insertions(

[Qemu-devel] [PATCH v6 04/10] qemu.py: Simplify QMP key-conversion

2017-08-18 Thread Lukáš Doktor
The QMP key conversion consist of '_'s to be replaced with '-'s, which can easily be done by a single `str.replace` method which is faster and does not require `string` module import. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost --- scripts/qemu.py | 5 +---

[Qemu-devel] [PATCH v6 07/10] qmp.py: Use object-based class for QEMUMonitorProtocol

2017-08-18 Thread Lukáš Doktor
There is no need to define QEMUMonitorProtocol as old-style class. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost --- scripts/qmp/qmp-shell | 4 ++-- scripts/qmp/qmp.py| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp

[Qemu-devel] [PATCH v6 05/10] qemu.py: Use custom exceptions rather than Exception

2017-08-18 Thread Lukáš Doktor
The naked Exception should not be widely used. It makes sense to be a bit more specific and use better-suited custom exceptions. As a benefit we can store the full reply in the exception in case someone needs it when catching the exception. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo

[Qemu-devel] [PATCH v6 08/10] qmp.py: Avoid "has_key" usage

2017-08-18 Thread Lukáš Doktor
The "has_key" is deprecated in favor of "__in__" operator. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp.py b/scri

[Qemu-devel] [PATCH v6 09/10] qmp.py: Avoid overriding a builtin object

2017-08-18 Thread Lukáš Doktor
The "id" is a builtin method to get object's identity and should not be overridden. This might bring some issues in case someone was directly calling "cmd(..., id=id)" but I haven't found such usage on brief search for "cmd\(.*id=". Signed-off-by: Lu

[Qemu-devel] [PATCH v6 10/10] qtest.py: Few pylint/style fixes

2017-08-18 Thread Lukáš Doktor
No actual code changes, just few pylint/style fixes. Signed-off-by: Lukáš Doktor Reviewed-by: John Snow --- scripts/qtest.py | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/qtest.py b/scripts/qtest.py index ab183c0..df0daf2 100644 --- a/scripts/qtest.py

Re: [Qemu-devel] make check speed

2017-08-23 Thread Lukáš Doktor
Dne 23.8.2017 v 10:35 Thomas Huth napsal(a): > On 23.08.2017 10:01, Paolo Bonzini wrote: >> On 23/08/2017 09:49, Thomas Huth wrote: >>> While we're at it: I'd like to have a "make check-fast", too. Sometimes >>> the normal "make check" is already too slow, e.g. while developing new >>> patches, I s

Re: [Qemu-devel] make check speed

2017-08-23 Thread Lukáš Doktor
Dne 23.8.2017 v 14:01 Thomas Huth napsal(a): > On 23.08.2017 13:51, Lukáš Doktor wrote: >> Dne 23.8.2017 v 10:35 Thomas Huth napsal(a): >>> On 23.08.2017 10:01, Paolo Bonzini wrote: >>>> On 23/08/2017 09:49, Thomas Huth wrote: >>>>> While we'r

Re: [Qemu-devel] make check speed

2017-08-23 Thread Lukáš Doktor
Dne 23.8.2017 v 14:35 Thomas Huth napsal(a): > On 23.08.2017 13:51, Lukáš Doktor wrote: > [...] >> and all ERROR lines: >> >> ERROR:tests/prom-env-test.c:42:check_guest_memory: assertion failed >> (signature == MAGIC): (0x == 0xcafec0de) > > Th

[Qemu-devel] [PATCH 04/11] qemu.py: Simplify QMP key-conversion

2017-07-20 Thread Lukáš Doktor
The QMP key conversion consist of '_'s to be replaced with '-'s, which can easily be done by a single `str.replace` method which is faster and does not require `string` module import. Signed-off-by: Lukáš Doktor --- scripts/qemu.py | 5 + 1 file changed, 1 insertion(+),

[Qemu-devel] [PATCH 11/11] qtest.py: Avoid using mutable list as default argument

2017-07-20 Thread Lukáš Doktor
The list is a mutable object and is dangerous to use it. Recently the QEMUMachine was adjusted to allow None as default, let's use it here as well. Signed-off-by: Lukáš Doktor --- scripts/qtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qtest.py b/sc

[Qemu-devel] [PATCH 02/11] qemu.py: Avoid dangerous arguments

2017-07-20 Thread Lukáš Doktor
uot;) >>> print vm2._wrapper ['foo'] In this case the `args` is actually copied so it would be safe to keep it, but it's not a good practice to keep it. Signed-off-by: Lukáš Doktor --- scripts/qemu.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH 03/11] qemu.py: Use iteritems rather than keys()

2017-07-20 Thread Lukáš Doktor
Let's avoid creating an in-memory list of keys and query for each value and use `iteritems` which is an iterator of key-value pairs. Signed-off-by: Lukáš Doktor --- scripts/qemu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py

[Qemu-devel] [PATCH 08/11] qmp.py: Avoid "has_key" usage

2017-07-20 Thread Lukáš Doktor
The "has_key" is deprecated in favor of "__in__" operator. Signed-off-by: Lukáš Doktor --- scripts/qmp/qmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp.py b/scripts/qmp/qmp.py index 68f3420..a14b001 100644 --- a/scripts/qmp/qmp.

[Qemu-devel] [PATCH 05/11] qemu.py: Use custom exceptions rather than Exception

2017-07-20 Thread Lukáš Doktor
The naked Exception should not be widely used. It makes sense to be a bit more specific and use better-suited custom exceptions. As a benefit we can store the full reply in the exception in case someone needs it when catching the exception. Signed-off-by: Lukáš Doktor --- scripts/qemu.py | 17

[Qemu-devel] [PATCH 09/11] qmp.py: Avoid overriding a builtin object

2017-07-20 Thread Lukáš Doktor
The "id" is a builtin method to get object's identity and should not be overridden. This might bring some issues in case someone was directly calling "cmd(..., id=id)" but I haven't found such usage on brief search for "cmd\(.*id=". Signed-off-by: L

[Qemu-devel] [PATCH 00/11] qemu.py: Pylint/style fixes

2017-07-20 Thread Lukáš Doktor
hem. Kind regards, Lukáš Lukáš Doktor (11): qemu.py: Pylint/style fixes qemu.py: Avoid dangerous arguments qemu.py: Use iteritems rather than keys() qemu.py: Simplify QMP key-conversion qemu.py: Use custom exceptions rather than Exception qmp.py: Couple of pylint/style fixes qmp.py:

[Qemu-devel] [PATCH 01/11] qemu.py: Pylint/style fixes

2017-07-20 Thread Lukáš Doktor
No actual code changes, just several pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor --- scripts/qemu.py | 76 - 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py

[Qemu-devel] [PATCH 07/11] qmp.py: Use object-based class for QEMUMonitorProtocol

2017-07-20 Thread Lukáš Doktor
There is no need to define QEMUMonitorProtocol as old-style class. Signed-off-by: Lukáš Doktor --- scripts/qmp/qmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp.py b/scripts/qmp/qmp.py index bb4d614..68f3420 100644 --- a/scripts/qmp/qmp.py +++ b/scripts

[Qemu-devel] [PATCH 10/11] qtest.py: Few pylint/style fixes

2017-07-20 Thread Lukáš Doktor
No actual code changes, just few pylint/style fixes. Signed-off-by: Lukáš Doktor --- scripts/qtest.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/qtest.py b/scripts/qtest.py index d5aecb5..e4b5788 100644 --- a/scripts/qtest.py +++ b/scripts/qtest.py

[Qemu-devel] [PATCH 06/11] qmp.py: Couple of pylint/style fixes

2017-07-20 Thread Lukáš Doktor
No actual code changes, just a few pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor --- scripts/qmp/qmp.py | 37 - 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/scripts/qmp/qmp.py b/scripts/qmp/qmp.py index

Re: [Qemu-devel] [PATCH 05/11] qemu.py: Use custom exceptions rather than Exception

2017-07-20 Thread Lukáš Doktor
Dne 20.7.2017 v 20:27 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:09PM +0200, Lukáš Doktor wrote: >> The naked Exception should not be widely used. It makes sense to be a >> bit more specific and use better-suited custom exceptions. As a benefit >> we can store

Re: [Qemu-devel] [PATCH 07/11] qmp.py: Use object-based class for QEMUMonitorProtocol

2017-07-20 Thread Lukáš Doktor
Dne 20.7.2017 v 20:35 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:11PM +0200, Lukáš Doktor wrote: >> There is no need to define QEMUMonitorProtocol as old-style class. >> >> Signed-off-by: Lukáš Doktor >> --- >> scripts/qmp/qmp.py | 2 +- >

Re: [Qemu-devel] [PATCH 09/11] qmp.py: Avoid overriding a builtin object

2017-07-20 Thread Lukáš Doktor
Dne 20.7.2017 v 20:38 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:13PM +0200, Lukáš Doktor wrote: >> The "id" is a builtin method to get object's identity and should not be >> overridden. This might bring some issues in case someone was directly >

Re: [Qemu-devel] [PATCH 10/11] qtest.py: Few pylint/style fixes

2017-07-20 Thread Lukáš Doktor
Dne 20.7.2017 v 20:42 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:14PM +0200, Lukáš Doktor wrote: > [...] >> @@ -83,8 +80,11 @@ class QEMUQtestMachine(qemu.QEMUMachine): >> socket_scm_helper=None): >> if name is None: >>

Re: [Qemu-devel] [PATCH 11/11] qtest.py: Avoid using mutable list as default argument

2017-07-21 Thread Lukáš Doktor
Dne 20.7.2017 v 20:44 Eduardo Habkost napsal(a): > On Thu, Jul 20, 2017 at 06:28:15PM +0200, Lukáš Doktor wrote: >> The list is a mutable object and is dangerous to use it. Recently the >> QEMUMachine was adjusted to allow None as default, let's use it here as >> well.

Re: [Qemu-devel] [PATCH v3 1/3] qemu.py: fix is_running()

2017-07-21 Thread Lukáš Doktor
Dne 20.7.2017 v 22:14 Amador Pahim napsal(a): > On Thu, Jul 20, 2017 at 7:49 PM, Eduardo Habkost wrote: >> On Thu, Jul 20, 2017 at 05:09:11PM +0200, Markus Armbruster wrote: >>> Amador Pahim writes: >>> On Thu, Jul 20, 2017 at 1:49 PM, Markus Armbruster wrote: > Amador Pahim writ

Re: [Qemu-devel] [PATCH 05/11] qemu.py: Use custom exceptions rather than Exception

2017-07-24 Thread Lukáš Doktor
Dne 21.7.2017 v 20:42 Eduardo Habkost napsal(a): > On Fri, Jul 21, 2017 at 08:37:34AM +0200, Lukáš Doktor wrote: >> Dne 20.7.2017 v 20:27 Eduardo Habkost napsal(a): >>> On Thu, Jul 20, 2017 at 06:28:09PM +0200, Lukáš Doktor wrote: >>>> The naked Exception should not

Re: [Qemu-devel] [PATCH 06/11] qmp.py: Couple of pylint/style fixes

2017-07-24 Thread Lukáš Doktor
e in mind? This is commit should not bring any code changes, just code reorganization (like including the self.* attributes on top of the file) > On 07/20/2017 01:28 PM, Lukáš Doktor wrote: >> No actual code changes, just a few pylint/style fixes and docstring >> clarifica

Re: [Qemu-devel] [PATCH 09/11] qmp.py: Avoid overriding a builtin object

2017-07-24 Thread Lukáš Doktor
Dne 21.7.2017 v 20:46 Eduardo Habkost napsal(a): > On Fri, Jul 21, 2017 at 08:53:49AM +0200, Lukáš Doktor wrote: >> Dne 20.7.2017 v 20:38 Eduardo Habkost napsal(a): >>> On Thu, Jul 20, 2017 at 06:28:13PM +0200, Lukáš Doktor wrote: >>>> The "id" is a bui

Re: [Qemu-devel] [PATCH 10/11] qtest.py: Few pylint/style fixes

2017-07-24 Thread Lukáš Doktor
Dne 21.7.2017 v 20:56 Eduardo Habkost napsal(a): > On Fri, Jul 21, 2017 at 08:57:34AM +0200, Lukáš Doktor wrote: >> Dne 20.7.2017 v 20:42 Eduardo Habkost napsal(a): >>> On Thu, Jul 20, 2017 at 06:28:14PM +0200, Lukáš Doktor wrote: >>> [...] >>>> @@

Re: [Qemu-devel] [PATCH 05/11] qemu.py: Use custom exceptions rather than Exception

2017-07-24 Thread Lukáš Doktor
Dne 24.7.2017 v 17:32 Eduardo Habkost napsal(a): > On Mon, Jul 24, 2017 at 02:13:09PM +0200, Lukáš Doktor wrote: >> Dne 21.7.2017 v 20:42 Eduardo Habkost napsal(a): >>> On Fri, Jul 21, 2017 at 08:37:34AM +0200, Lukáš Doktor wrote: >>>> Dne 20.7.2017 v 20:27 Eduardo H

Re: [Qemu-devel] [PATCH 06/11] qmp.py: Couple of pylint/style fixes

2017-07-24 Thread Lukáš Doktor
Dne 25.7.2017 v 08:04 Philippe Mathieu-Daudé napsal(a): > Hi Lukáš, > > On 07/24/2017 09:36 AM, Lukáš Doktor wrote: >> Dne 22.7.2017 v 03:30 Philippe Mathieu-Daudé napsal(a): >>> Hi Lukáš, >>> >>> Since comment/indent fixes and code changes are not re

[Qemu-devel] [PATCH v2 01/10] qemu.py: Pylint/style fixes

2017-07-25 Thread Lukáš Doktor
No actual code changes, just several pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor --- scripts/qemu.py | 76 - 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py

[Qemu-devel] [PATCH v2 04/10] qemu.py: Simplify QMP key-conversion

2017-07-25 Thread Lukáš Doktor
The QMP key conversion consist of '_'s to be replaced with '-'s, which can easily be done by a single `str.replace` method which is faster and does not require `string` module import. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost --- scripts/qemu.py | 5 +---

[Qemu-devel] [PATCH v2 08/10] qmp.py: Avoid "has_key" usage

2017-07-25 Thread Lukáš Doktor
The "has_key" is deprecated in favor of "__in__" operator. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp.py b/scri

[Qemu-devel] [PATCH v2 00/10] qemu.py: Pylint/style fixes

2017-07-25 Thread Lukáš Doktor
r calls (7th patch) - Fixed the accidental rename of qmp `cmd_id` (kept the id->cmd_id patch) - Changed the style of the style-fix in the 10th commit Lukáš Doktor (10): qemu.py: Pylint/style fixes qemu|qtest: Avoid dangerous arguments qemu.py: Use iteritems rather than keys() qemu.py: Simpli

[Qemu-devel] [PATCH v2 02/10] qemu|qtest: Avoid dangerous arguments

2017-07-25 Thread Lukáš Doktor
uot;) >>> print vm2._wrapper ['foo'] In this case the `args` is actually copied so it would be safe to keep it, but it's not a good practice to keep it. The same issue applies in inherited qtest module. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost --- scr

[Qemu-devel] [PATCH v2 10/10] qtest.py: Few pylint/style fixes

2017-07-25 Thread Lukáš Doktor
No actual code changes, just few pylint/style fixes. Signed-off-by: Lukáš Doktor --- scripts/qtest.py | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/qtest.py b/scripts/qtest.py index ab183c0..df0daf2 100644 --- a/scripts/qtest.py +++ b/scripts/qtest.py

[Qemu-devel] [PATCH v2 03/10] qemu.py: Use iteritems rather than keys()

2017-07-25 Thread Lukáš Doktor
Let's avoid creating an in-memory list of keys and query for each value and use `iteritems` which is an iterator of key-value pairs. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé --- scripts/qemu.py | 6 +++--- 1 file changed, 3 insertions(

[Qemu-devel] [PATCH v2 07/10] qmp.py: Use object-based class for QEMUMonitorProtocol

2017-07-25 Thread Lukáš Doktor
There is no need to define QEMUMonitorProtocol as old-style class. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost --- scripts/qmp/qmp-shell | 4 ++-- scripts/qmp/qmp.py| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp

[Qemu-devel] [PATCH v2 05/10] qemu.py: Use custom exceptions rather than Exception

2017-07-25 Thread Lukáš Doktor
The naked Exception should not be widely used. It makes sense to be a bit more specific and use better-suited custom exceptions. As a benefit we can store the full reply in the exception in case someone needs it when catching the exception. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo

[Qemu-devel] [PATCH v2 06/10] qmp.py: Couple of pylint/style fixes

2017-07-25 Thread Lukáš Doktor
No actual code changes, just initializing attributes earlier to avoid AttributeError on early introspection, a few pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor --- scripts/qmp/qmp.py | 37 - 1 file changed, 24 insertions(+), 13

[Qemu-devel] [PATCH v2 09/10] qmp.py: Avoid overriding a builtin object

2017-07-25 Thread Lukáš Doktor
The "id" is a builtin method to get object's identity and should not be overridden. This might bring some issues in case someone was directly calling "cmd(..., id=id)" but I haven't found such usage on brief search for "cmd\(.*id=". Signed-off-by: L

Re: [Qemu-devel] [PATCH v2 05/10] qemu.py: Use custom exceptions rather than Exception

2017-07-25 Thread Lukáš Doktor
Dne 25.7.2017 v 18:06 Eduardo Habkost napsal(a): > On Tue, Jul 25, 2017 at 05:09:46PM +0200, Lukáš Doktor wrote: >> The naked Exception should not be widely used. It makes sense to be a >> bit more specific and use better-suited custom exceptions. As a benefit >> we can store

Re: [Qemu-devel] [PATCH v2 09/10] qmp.py: Avoid overriding a builtin object

2017-07-25 Thread Lukáš Doktor
Dne 25.7.2017 v 21:34 Eduardo Habkost napsal(a): > On Tue, Jul 25, 2017 at 05:09:50PM +0200, Lukáš Doktor wrote: >> The "id" is a builtin method to get object's identity and should not be >> overridden. This might bring some issues in case someone was directly >

[Qemu-devel] [PATCH v3 00/14] qemu.py: Pylint/style fixes

2017-07-26 Thread Lukáš Doktor
ption Kevin Wolf (1): qemu-iotests: Fix reference output for 186 Lukáš Doktor (10): qemu.py: Pylint/style fixes qemu|qtest: Avoid dangerous arguments qemu.py: Use iteritems rather than keys() qemu.py: Simplify QMP key-conversion qemu.py: Use custom exceptions rather than Exception q

[Qemu-devel] [PATCH v3 01/14] qcow: fix memory leaks related to encryption

2017-07-26 Thread Lukáš Doktor
From: "Daniel P. Berrange" Fix leak of the 'encryptopts' string, which was mistakenly declared const. Fix leak of QemuOpts entry which should not have been deleted from the opts array. Reported by: coverity Signed-off-by: Daniel P. Berrange Message-id: 20170714103105.5781-1-berra...@redhat.com

[Qemu-devel] [PATCH v3 02/14] qcow2-bitmap: fix bitmap_free

2017-07-26 Thread Lukáš Doktor
From: Vladimir Sementsov-Ogievskiy Fix possible crash on error path in qcow2_remove_persistent_dirty_bitmap. Although bitmap_free was added in 88ddffae8fc the bug was introduced later in commit 469c71edc72 (when qcow2_remove_persistent_dirty_bitmap was added). Signed-off-by: Vladimir Sementsov-O

[Qemu-devel] [PATCH v3 08/14] qemu.py: Simplify QMP key-conversion

2017-07-26 Thread Lukáš Doktor
The QMP key conversion consist of '_'s to be replaced with '-'s, which can easily be done by a single `str.replace` method which is faster and does not require `string` module import. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost --- scripts/qemu.py | 5 +---

[Qemu-devel] [PATCH v3 04/14] Update version for v2.10.0-rc0 release

2017-07-26 Thread Lukáš Doktor
From: Peter Maydell Signed-off-by: Peter Maydell --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 12ca1d1..a0700e6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.9.50 +2.9.90 -- 2.9.4

[Qemu-devel] [PATCH v3 09/14] qemu.py: Use custom exceptions rather than Exception

2017-07-26 Thread Lukáš Doktor
The naked Exception should not be widely used. It makes sense to be a bit more specific and use better-suited custom exceptions. As a benefit we can store the full reply in the exception in case someone needs it when catching the exception. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo

[Qemu-devel] [PATCH v4 08/10] qmp.py: Avoid "has_key" usage

2017-07-26 Thread Lukáš Doktor
The "has_key" is deprecated in favor of "__in__" operator. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp.py b/scri

[Qemu-devel] [PATCH v3 10/14] qmp.py: Couple of pylint/style fixes

2017-07-26 Thread Lukáš Doktor
No actual code changes, just initializing attributes earlier to avoid AttributeError on early introspection, a few pylint/style fixes and docstring clarifications. Signed-off-by: Lukáš Doktor Reviewed-by: Philippe Mathieu-Daudé --- scripts/qmp/qmp.py | 37

[Qemu-devel] [PATCH v3 03/14] qemu-iotests: Fix reference output for 186

2017-07-26 Thread Lukáš Doktor
From: Kevin Wolf Commits 70f17a1 ('error: Revert unwanted change of warning messages') and e1824e5 ('qemu-iotests: Test 'info block'') had a semantic merge conflict, which results in failure for qemu-iotests case 186. Fix the reference output to consider the changes of 70f17a1. Signed-off-by: Ke

[Qemu-devel] [PATCH v3 07/14] qemu.py: Use iteritems rather than keys()

2017-07-26 Thread Lukáš Doktor
Let's avoid creating an in-memory list of keys and query for each value and use `iteritems` which is an iterator of key-value pairs. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé --- scripts/qemu.py | 6 +++--- 1 file changed, 3 insertions(

[Qemu-devel] [PATCH v3 13/14] qmp.py: Avoid overriding a builtin object

2017-07-26 Thread Lukáš Doktor
The "id" is a builtin method to get object's identity and should not be overridden. This might bring some issues in case someone was directly calling "cmd(..., id=id)" but I haven't found such usage on brief search for "cmd\(.*id=". Signed-off-by: Lu

[Qemu-devel] [PATCH v3 14/14] qtest.py: Few pylint/style fixes

2017-07-26 Thread Lukáš Doktor
No actual code changes, just few pylint/style fixes. Signed-off-by: Lukáš Doktor Reviewed-by: John Snow --- scripts/qtest.py | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/qtest.py b/scripts/qtest.py index ab183c0..df0daf2 100644 --- a/scripts/qtest.py

[Qemu-devel] [PATCH v3 06/14] qemu|qtest: Avoid dangerous arguments

2017-07-26 Thread Lukáš Doktor
uot;) >>> print vm2._wrapper ['foo'] In this case the `args` is actually copied so it would be safe to keep it, but it's not a good practice to keep it. The same issue applies in inherited qtest module. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost Revi

[Qemu-devel] [PATCH v3 11/14] qmp.py: Use object-based class for QEMUMonitorProtocol

2017-07-26 Thread Lukáš Doktor
There is no need to define QEMUMonitorProtocol as old-style class. Signed-off-by: Lukáš Doktor Reviewed-by: Eduardo Habkost --- scripts/qmp/qmp-shell | 4 ++-- scripts/qmp/qmp.py| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp

[Qemu-devel] [PATCH v4 09/10] qmp.py: Avoid overriding a builtin object

2017-07-26 Thread Lukáš Doktor
The "id" is a builtin method to get object's identity and should not be overridden. This might bring some issues in case someone was directly calling "cmd(..., id=id)" but I haven't found such usage on brief search for "cmd\(.*id=". Signed-off-by: Lu

  1   2   >