[PATCH v2 07/18] iotests: use qemu_img_json() when applicable

2022-02-21 Thread John Snow
These functions should now give better crash information when something unexpected happens. Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

[PATCH v2 04/18] iotests: make qemu_img raise on non-zero rc by default

2022-02-21 Thread John Snow
rom a tool. Signed-off-by: John Snow --- tests/qemu-iotests/257| 8 -- tests/qemu-iotests/iotests.py | 53 +++ 2 files changed, 52 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index fb5359c581e..e7e7a2317e3 1

[PATCH v2 01/18] python/utils: add enboxify() text decoration utility

2022-02-21 Thread John Snow
┃ ┃ and any of the individual glyphs used to draw the box may be┃ ┃ replaced or specified as well. ┃ ┗━━┛ Signed-off-by: John Snow --- python/qemu/uti

[PATCH v2 02/18] iotests: add VerboseProcessError

2022-02-21 Thread John Snow
ff-by: John Snow --- tests/qemu-iotests/iotests.py | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 6ba65eb1ffe..5617f991da7 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-io

[PATCH v2 10/18] iotests: add qemu_img_map() function

2022-02-21 Thread John Snow
By analogy with qemu_img_{measure, check, info}. Replace calls to qemu_img_pipe('map', '--output=json', ...) with the new function. Signed-off-by: John Snow --- tests/qemu-iotests/041 | 5 ++--- tests/qemu-iotests/211 |

[PATCH v2 09/18] iotests: remove-bitmap-from-backing: use qemu_img_info()

2022-02-21 Thread John Snow
Remove two more usages of qemu_img_pipe(). Signed-off-by: John Snow --- tests/qemu-iotests/tests/remove-bitmap-from-backing | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/tests/remove-bitmap-from-backing b/tests/qemu-iotests/tests/remove-bitmap

[PATCH v2 06/18] iotests: add qemu_img_json()

2022-02-21 Thread John Snow
re-raised instead. In the event that the return code is zero but we can't parse valid JSON, allow the JSON deserialization error to be raised. Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 35 +++ 1 file changed, 35 insertions(+) diff --git a/

[PATCH v2 03/18] iotests: Remove explicit checks for qemu_img() == 0

2022-02-21 Thread John Snow
qemu_img() returning zero ought to be the rule, not the exception. Remove all explicit checks against the condition in preparation for making non-zero returns an Exception. Signed-off-by: John Snow Reviewed-by: Eric Blake --- tests/qemu-iotests/163 | 9

[PATCH v2 05/18] iotests: fortify compare_images() against crashes

2022-02-21 Thread John Snow
Make this helper function a little stricter about what it allows by default. If qemu_img returns some exit code that implies it didn't actually perform the comparison, treat that as an exceptional circumstance and force the caller to be aware of the peril. Signed-off-by: John Snow ---

[PATCH v2 00/18] iotests: add detailed tracebacks to qemu_img() failures

2022-02-21 Thread John Snow
nd qemu_tool(). V2: - Ensure *all* calls to qemu-img go through qemu_img() - Raise VerboseProcessError on negative return code, even when check=False - Check logging status for logged variants and revert to Exceptions when logging is off! John Snow (18): python/utils: add enbo

Re: [PATCH] hw/ide: implement ich6 ide controller support

2022-02-17 Thread John Snow
while > >>>> reading it. What machine needs this? In QEMU I think we only have > >>>> piix and ich9 emulated for pc and q35 machines but maybe ich6 is > >>>> also used by some machine I don't know about. Otherwise it looks > >>>&

Re: [PATCH v2] ide: Increment BB in-flight counter for TRIM BH

2022-02-17 Thread John Snow
On Tue, Feb 15, 2022 at 12:14 PM Hanna Reitz wrote: > > Ping > > (I can take it too, if you’d like, John, but you’re listed as the only > maintainer for hw/ide, so... Just say the word, though!) > Sorry, I sent you a mail off-list at the time where I said you were free to take it whenever you li

Re: [PATCH 1/4] python/utils: add enboxify() text decoration utility

2022-02-16 Thread John Snow
On Tue, Feb 15, 2022, 6:57 PM Philippe Mathieu-Daudé wrote: > On 16/2/22 00:53, John Snow wrote: > > On Tue, Feb 15, 2022 at 5:55 PM Eric Blake wrote: > >> > >> On Tue, Feb 15, 2022 at 05:08:50PM -0500, John Snow wrote: > >>>>>> pr

Re: [PATCH 4/4] iotests: make qemu_img raise on non-zero rc by default

2022-02-15 Thread John Snow
On Tue, Feb 15, 2022 at 6:09 PM Eric Blake wrote: > > On Tue, Feb 15, 2022 at 05:08:53PM -0500, John Snow wrote: > > re-configure qemu_img() into a function that will by default raise a > > VerboseProcessException (extended from CalledProcessException) on > > non-zero

Re: [PATCH 3/4] iotests: Remove explicit checks for qemu_img() == 0

2022-02-15 Thread John Snow
On Tue, Feb 15, 2022 at 6:05 PM Eric Blake wrote: > > On Tue, Feb 15, 2022 at 05:08:52PM -0500, John Snow wrote: > > qemu_img() returning zero ought to be the rule, not the > > exception. Remove all explicit checks against the condition in > > preparation for making non-z

Re: [PATCH 2/4] iotests: add VerboseProcessError

2022-02-15 Thread John Snow
On Tue, Feb 15, 2022 at 5:58 PM Eric Blake wrote: > > On Tue, Feb 15, 2022 at 05:08:51PM -0500, John Snow wrote: > > This adds an Exception that extends the garden variety > > subprocess.CalledProcessError. When this exception is raised, it will > > still be caught when

Re: [PATCH 1/4] python/utils: add enboxify() text decoration utility

2022-02-15 Thread John Snow
On Tue, Feb 15, 2022 at 5:55 PM Eric Blake wrote: > > On Tue, Feb 15, 2022 at 05:08:50PM -0500, John Snow wrote: > > >>> print(enboxify(msg, width=72, name="commit message")) > > ┏━ commit message ━┓ >

[PATCH 0/4] iotests: add detailed tracebacks to qemu_img() failures

2022-02-15 Thread John Snow
efault_decoder.decode(s) + File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode +obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + File "/usr/lib64/python3.9/json/decoder.py", line 355, in raw_decode +raise JSONDecodeError("Expecting value", s, er

[PATCH 3/4] iotests: Remove explicit checks for qemu_img() == 0

2022-02-15 Thread John Snow
qemu_img() returning zero ought to be the rule, not the exception. Remove all explicit checks against the condition in preparation for making non-zero returns an Exception. Signed-off-by: John Snow --- tests/qemu-iotests/163 | 9 +++-- tests/qemu-iotests/216

[PATCH 2/4] iotests: add VerboseProcessError

2022-02-15 Thread John Snow
ff-by: John Snow --- tests/qemu-iotests/iotests.py | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 6ba65eb1ffe..7df393df2c3 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-io

[PATCH 4/4] iotests: make qemu_img raise on non-zero rc by default

2022-02-15 Thread John Snow
something more flexible (There appears to be only one) can use check=False and manage the return themselves. Signed-off-by: John Snow --- tests/qemu-iotests/257| 8 -- tests/qemu-iotests/iotests.py | 53 +++ 2 files changed, 53 insertions(+), 8 deletions

[PATCH 1/4] python/utils: add enboxify() text decoration utility

2022-02-15 Thread John Snow
┃ ┃ and any of the individual glyphs used to draw the box may be┃ ┃ replaced or specified as well. ┃ ┗━━┛ Signed-off-by: John Snow --- python/qemu/uti

Re: [PULL 0/4] Python patches

2022-02-15 Thread John Snow
On Tue, Feb 15, 2022 at 1:01 PM Peter Maydell wrote: > > On Tue, 15 Feb 2022 at 17:46, John Snow wrote: > > Just so I don't leave this thread hanging, I filed a GitLab issue and > > I'm working on it, but this one isn't as quick to solve as the other. > > &

Re: [PULL 0/4] Python patches

2022-02-15 Thread John Snow
On Tue, Feb 8, 2022 at 9:40 AM Peter Maydell wrote: > > On Thu, 3 Feb 2022 at 23:22, John Snow wrote: > > > > On Thu, Feb 3, 2022 at 11:52 AM Peter Maydell > > wrote: > > > > > > On Thu, 3 Feb 2022 at 16:38, John Snow wrote: > > >

Re: [PATCH 0/4] iotests: finalize switch to async QMP

2022-02-08 Thread John Snow
Squeak Squeak... ...Any objections to me staging this? (This patchset removes the accommodations in iotests for allowing either library to run and always forces the new one. Point of no return for iotests.) --js On Wed, Feb 2, 2022 at 9:24 PM John Snow wrote: > > Ba

Re: [PATCH-for-6.2 0/2] hw/block/fdc: Fix CVE-2021-3507

2022-02-04 Thread John Snow
On Thu, Jan 27, 2022 at 3:11 PM Jon Maloy wrote: > > > On 11/18/21 06:57, Philippe Mathieu-Daudé wrote: > > Trivial fix for CVE-2021-3507. > > > > Philippe Mathieu-Daudé (2): > >hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507) > >tests/qtest/fdc-test: Add a regression test for CV

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-04 Thread John Snow
On Thu, Feb 3, 2022 at 4:19 AM Kevin Wolf wrote: > > Am 02.02.2022 um 20:08 hat John Snow geschrieben: > > > I guess the relevant question in the context of this patch is whether > > > sync.py will need a similar two-phase setup as legacy.py. Do you think > > > yo

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-03 Thread John Snow
On Thu, Feb 3, 2022 at 4:38 AM Daniel P. Berrangé wrote: > > On Wed, Feb 02, 2022 at 02:08:59PM -0500, John Snow wrote: > > On Tue, Feb 1, 2022 at 2:46 PM Kevin Wolf wrote: > > > > > > Am 01.02.2022 um 19:32 hat John Snow geschrieben: > > > > On Tue

Re: [PULL 0/4] Python patches

2022-02-03 Thread John Snow
On Thu, Feb 3, 2022 at 11:52 AM Peter Maydell wrote: > > On Thu, 3 Feb 2022 at 16:38, John Snow wrote: > > > On Thu, Feb 3, 2022, 11:20 AM Peter Maydell > > wrote: > >> Summary of Failures: > >> > >> 1/1 qemu:block / qemu-iotests qcow2 ERR

Re: [PULL 0/4] Python patches

2022-02-03 Thread John Snow
On Thu, Feb 3, 2022, 11:20 AM Peter Maydell wrote: > On Thu, 3 Feb 2022 at 01:59, John Snow wrote: > > > > The following changes since commit > 47cc1a3655135b89fa75c2824fbddd29df874612: > > > > Merge remote-tracking branch 'remotes/kwolf-gitlab/tags/for-upst

[PATCH 4/4] iotests: switch to AQMP

2022-02-02 Thread John Snow
All that's left is to import type definitions from the new library instead. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- tests/qemu-iotests/iotests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-io

[PATCH 3/4] iotests/mirror-top-perms: switch to AQMP

2022-02-02 Thread John Snow
t to begin with. Ultimately, I decided it's fine to just suppress the logger temporarily.) Signed-off-by: John Snow --- tests/qemu-iotests/tests/mirror-top-perms | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/tests/mirror-top-perms b/tests/qemu-iote

[PATCH 2/4] scripts/bench-block-job: switch to AQMP

2022-02-02 Thread John Snow
For this commit, we only need to remove accommodations for the synchronous QMP library. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- scripts/simplebench/bench_block_job.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH 1/4] python/machine: permanently switch to AQMP

2022-02-02 Thread John Snow
Remove the QEMU_PYTHON_LEGACY_QMP environment variable, making the switch permanent. Update Exceptions and import paths as necessary. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/machine/machine.py | 18 +++--- python

[PATCH 0/4] iotests: finalize switch to async QMP

2022-02-02 Thread John Snow
;ll avoid cluttering up qemu-block list with those. (Just be aware that I plan to finalize the switch soon!) John Snow (4): python/machine: permanently switch to AQMP scripts/bench-block-job: switch to AQMP iotests/mirror-top-perms: switch to AQMP iotests: switch to AQMP python/qemu/machi

[PULL 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-02 Thread John Snow
vance, guaranteeing that there will be a UNIX socket in the filesystem ready for the QEMU client to connect to without a race condition. (Yes, it's a bit ugly. Fixing it more nicely will have to wait until our minimum Python version is 3.7+.) Signed-off-by: John Snow Reviewed-by: Kevin Wolf

[PULL 3/4] python: upgrade mypy to 0.780

2022-02-02 Thread John Snow
related to the mypy upgrade are simply beyond my control. It's on my list to take care of soon.) Signed-off-by: John Snow Reviewed-by: Kevin Wolf Message-id: 20220201041134.1237016-4-js...@redhat.com Signed-off-by: John Snow --- python/Pipfile.lock

[PULL 0/4] Python patches

2022-02-02 Thread John Snow
ilures you observed on NetBSD. If it doesn't, let me know. ---- John Snow (4): python/aqmp: Fix negotiation with pre-"oob" QEMU python/machine: raise VMLaunchFailure exception from launch() python: upgrade mypy to 0.780

[PULL 2/4] python/machine: raise VMLaunchFailure exception from launch()

2022-02-02 Thread John Snow
ase, so catch on the broadest scope and wrap-and-re-raise only in the more targeted scope.) Signed-off-by: John Snow Reviewed-by: Hanna Reitz Reviewed-by: Kevin Wolf Message-id: 20220201041134.1237016-3-js...@redhat.com Signed-off-by: John Snow --- python/qemu/machine/machin

[PULL 1/4] python/aqmp: Fix negotiation with pre-"oob" QEMU

2022-02-02 Thread John Snow
QEMU versions prior to the "oob" capability *also* can't accept the "enable" keyword argument at all. Fix the handshake process with older QEMU versions. Signed-off-by: John Snow Reviewed-by: Hanna Reitz Reviewed-by: Kevin Wolf Message-id: 20220201041134.1237016-2-js

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-02 Thread John Snow
On Tue, Feb 1, 2022 at 2:46 PM Kevin Wolf wrote: > > Am 01.02.2022 um 19:32 hat John Snow geschrieben: > > On Tue, Feb 1, 2022 at 8:21 AM Kevin Wolf wrote: > > > > > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > > > The synchronous QMP libra

Re: [PATCH v4 1/4] python/aqmp: Fix negotiation with pre-"oob" QEMU

2022-02-01 Thread John Snow
On Tue, Feb 1, 2022 at 7:59 AM Kevin Wolf wrote: > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > QEMU versions prior to the "oob" capability *also* can't accept the > > "enable" keyword argument at all. Fix the handshake process with older >

Re: [PATCH v4 0/4] Python: Improvements for iotest 040,041

2022-02-01 Thread John Snow
On Tue, Feb 1, 2022 at 8:28 AM Kevin Wolf wrote: > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-fixes > > CI: https://gitlab.com/jsnow/qemu/-/pipelines/455146881 > > > > Fixes and improvements a

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-01 Thread John Snow
On Tue, Feb 1, 2022 at 8:21 AM Kevin Wolf wrote: > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > The synchronous QMP library would bind to the server address during > > __init__(). The new library delays this to the accept() call, because > > binding occurs insi

[PATCH v4 2/4] python/machine: raise VMLaunchFailure exception from launch()

2022-01-31 Thread John Snow
ase, so catch on the broadest scope and wrap-and-re-raise only in the more targeted scope.) Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- python/qemu/machine/machine.py| 45 --- tests/qemu-iotests/tests/mirror-top-perms | 3 +- 2 files changed, 40 insertions(+),

[PATCH v4 1/4] python/aqmp: Fix negotiation with pre-"oob" QEMU

2022-01-31 Thread John Snow
QEMU versions prior to the "oob" capability *also* can't accept the "enable" keyword argument at all. Fix the handshake process with older QEMU versions. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- python/qemu/aqmp/qmp_client.py | 4 ++-- 1 file changed, 2 i

[PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-01-31 Thread John Snow
vance, guaranteeing that there will be a UNIX socket in the filesystem ready for the QEMU client to connect to without a race condition. (Yes, it's a bit ugly. Fixing it more nicely will have to wait until our minimum Python version is 3.7+.) Signed-off-by: John Snow --- python/qemu/aqmp/legacy

[PATCH v4 3/4] python: upgrade mypy to 0.780

2022-01-31 Thread John Snow
related to the mypy upgrade are simply beyond my control. It's on my list to take care of soon.) Signed-off-by: John Snow --- python/Pipfile.lock | 66 ++--- python/setup.cfg| 2 +- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/p

[PATCH v4 0/4] Python: Improvements for iotest 040,041

2022-01-31 Thread John Snow
each patch for details. V4: - Just commit message changes, and applying Hanna's RBs. V3: - Retitled series - Dropped patch that was already merged - Reworded some comments, docstrings, etc. John Snow (4): python/aqmp: Fix negotiation with pre-"oob" QEMU python/machi

Re: [PATCH v3 4/4] python/aqmp: add socket bind step to legacy.py

2022-01-31 Thread John Snow
On Thu, Jan 27, 2022 at 10:50 AM Hanna Reitz wrote: > > On 24.01.22 19:06, John Snow wrote: > > The synchronous QMP library would bind to the server address during > > __init__(). The new library delays this to the accept() call, because > > binding occurs inside of

Re: [PATCH v3 2/4] python/machine: raise VMLaunchFailure exception from launch()

2022-01-31 Thread John Snow
On Thu, Jan 27, 2022 at 9:22 AM Hanna Reitz wrote: > > On 24.01.22 19:06, John Snow wrote: > > This allows us to pack in some extra information about the failure, > > which guarantees that if the caller did not *intentionally* cause a > > failure (by capturing this Exce

Re: [PATCH v2] ide: Increment BB in-flight counter for TRIM BH

2022-01-24 Thread John Snow
On Mon, Jan 24, 2022 at 4:06 AM Hanna Reitz wrote: > > On 21.01.22 19:47, John Snow wrote: > > > > There's no regression test, but I will trust you (and Paolo) that this > > solves the bug you were seeing. It makes sense. > > There is one in the BZ linked, but

[PATCH v3 0/4] Python: Improvements for iotest 040,041

2022-01-24 Thread John Snow
each patch for details. V3: - Retitled series - Dropped patch that was already merged - Reworded some comments, docstrings, etc. John Snow (4): python/aqmp: Fix negotiation with pre-"oob" QEMU python/machine: raise VMLaunchFailure exception from launch() python: upgrade mypy to

[PATCH v3 4/4] python/aqmp: add socket bind step to legacy.py

2022-01-24 Thread John Snow
vance, guaranteeing that there will be a UNIX socket in the filesystem ready for the QEMU client to connect to without a race condition. (Yes, it's a bit ugly. Fixing it more nicely will have to wait until our minimum Python version is 3.7+.) Signed-off-by: John Snow --- python/qemu/aqmp/legacy

[PATCH v3 2/4] python/machine: raise VMLaunchFailure exception from launch()

2022-01-24 Thread John Snow
will run as long as Python itself doesn't crash. KeyboardInterrupt and several other "strong" events in Python are a BaseException. These events should generally not be suppressed, but occasionally we want to perform some cleanup in response to one.) Signed-off-by: John Snow -

[PATCH v3 3/4] python: upgrade mypy to 0.780

2022-01-24 Thread John Snow
related to the mypy upgrade are simply beyond my control. It's on my list to take care of soon.) Signed-off-by: John Snow --- python/Pipfile.lock | 66 ++--- python/setup.cfg| 2 +- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/p

[PATCH v3 1/4] python/aqmp: Fix negotiation with pre-"oob" QEMU

2022-01-24 Thread John Snow
QEMU versions prior to the "oob" capability *also* can't accept the "enable" keyword argument at all. Fix the handshake process with older QEMU versions. Signed-off-by: John Snow --- python/qemu/aqmp/qmp_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

Re: [PATCH v2] ide: Increment BB in-flight counter for TRIM BH

2022-01-21 Thread John Snow
cb, cb_opaque); > iocb->s = s; > iocb->bh = qemu_bh_new(ide_trim_bh_cb, iocb); > -- > 2.34.1 > Oh, this *wasn't* the same bug I thought it was. There's no regression test, but I will trust you (and Paolo) that this solves the bug you were seeing. It makes sense. Reviewed-by: John Snow Tested-by: John Snow

Re: [PATCH] tests/qtest/ide-test: Remove bad retry_isa test

2022-01-21 Thread John Snow
7;s simply drop the retry_isa test for now. > > Signed-off-by: Thomas Huth I assume I had patches to make this make sense at some point, but they're probably long lost to time by now. Please pardon my dust. 🙇 Reviewed-by: John Snow > --- > tests/qtest/ide-test.c | 13 +

Re: [PATCH v3 00/31] Python: delete synchronous qemu.qmp package

2022-01-20 Thread John Snow
On Mon, Jan 10, 2022 at 6:29 PM John Snow wrote: > > Based-on: <20220110232521.1922962-1-js...@redhat.com> > (jsnow/python staging branch) > GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-qmp-legacy-switch > CI: https://gitlab.com/jsnow/qemu/-/pipelines/4

Re: [PATCH v2 2/5] python: use avocado's "new" runner

2022-01-20 Thread John Snow
On Thu, Jan 20, 2022 at 8:08 AM Beraldo Leal wrote: > > On Wed, Jan 19, 2022 at 02:39:13PM -0500, John Snow wrote: > > The old legacy runner no longer seems to work with output logging, so we > > can't see failure logs when a test case fails. The new runner doesn&

Re: [PATCH v2 5/5] python/aqmp: add socket bind step to legacy.py

2022-01-20 Thread John Snow
On Thu, Jan 20, 2022, 4:13 AM Daniel P. Berrangé wrote: > On Wed, Jan 19, 2022 at 02:39:16PM -0500, John Snow wrote: > > The old QMP library would actually bind to the server address during > > __init__(). The new library delays this to the accept() call, because > > binding

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-19 Thread John Snow
On Tue, Jan 18, 2022 at 1:34 PM John Snow wrote: > > On Tue, Jan 18, 2022 at 7:13 AM Peter Maydell > wrote: > > > > On Mon, 17 Jan 2022 at 20:35, John Snow wrote: > > > I do expect this to print more information on failure than it > > > currently is,

[PATCH v2 4/5] python: upgrade mypy to 0.780

2022-01-19 Thread John Snow
not related to the mypy upgrade are simply beyond my control.) Signed-off-by: John Snow --- python/Pipfile.lock | 66 ++--- python/setup.cfg| 2 +- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/python/Pipfile.lock b/python/Pipfile.lock

[PATCH v2 5/5] python/aqmp: add socket bind step to legacy.py

2022-01-19 Thread John Snow
ng of this year, but I haven't checked if all of our supported build platforms have a properly modern Python available yet.) Signed-off-by: John Snow --- python/qemu/aqmp/legacy.py | 3 +++ python/qemu/aqmp/protocol.py | 41 +--- 2 files changed, 41 insertions(

[PATCH v2 3/5] python/machine: raise VMLaunchFailure exception from launch()

2022-01-19 Thread John Snow
event of a non-negative return code more obvious when they go unhandled; the current behavior is to print a warning message only in the event of signal-based terminations (for negative return codes). Signed-off-by: John Snow --- python/qemu/machine/machine.py| 44

[PATCH v2 0/5] Python: minor fixes

2022-01-19 Thread John Snow
QEMUMachine.launch() John Snow (5): python/aqmp: Fix negotiation with pre-"oob" QEMU python: use avocado's "new" runner python/machine: raise VMLaunchFailure exception from launch() python: upgrade mypy to 0.780 python/aqmp: add socket bind step to legacy

[PATCH v2 1/5] python/aqmp: Fix negotiation with pre-"oob" QEMU

2022-01-19 Thread John Snow
QEMU versions prior to the "oob" capability *also* can't accept the "enable" keyword argument at all. Fix the handshake process with older QEMU versions. Signed-off-by: John Snow --- python/qemu/aqmp/qmp_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[PATCH v2 2/5] python: use avocado's "new" runner

2022-01-19 Thread John Snow
The old legacy runner no longer seems to work with output logging, so we can't see failure logs when a test case fails. The new runner doesn't (seem to) support Coverage.py yet, but seeing error output is a more important feature. Signed-off-by: John Snow --- python/avocado.cfg | 2

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-18 Thread John Snow
On Tue, Jan 18, 2022 at 7:13 AM Peter Maydell wrote: > > On Mon, 17 Jan 2022 at 20:35, John Snow wrote: > > I do expect this to print more information on failure than it > > currently is, though (bug somewhere in machine.py, I think). > > Can you please try applying

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-17 Thread John Snow
On Mon, Jan 17, 2022 at 3:49 PM Peter Maydell wrote: > > On Mon, 17 Jan 2022 at 20:35, John Snow wrote: > > > Can you please try applying this temporary patch and running `./check > > -qcow2 040 041` until you see a breakage and show me the output from > > that? > &

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-17 Thread John Snow
On Mon, Jan 17, 2022 at 5:05 AM Kevin Wolf wrote: > > Am 10.01.2022 um 16:55 hat Peter Maydell geschrieben: > > Just saw this failure of iotests in a netbsd VM (the in-tree > > tests/vm stuff). Pretty sure it's an intermittent as the > > pulreq being tested has nothing io or block related. > > > >

Re: [PATCH v3 23/31] iotests: switch to AQMP

2022-01-17 Thread John Snow
On Fri, Jan 14, 2022 at 2:13 PM Eric Blake wrote: > > On Mon, Jan 10, 2022 at 06:29:02PM -0500, John Snow wrote: > > Simply import the type defition from the new location. > > definition > ACK > > > > Signed-off-by: John Snow > > Reviewed-by: Vladim

Re: [PATCH v3 00/31] Python: delete synchronous qemu.qmp package

2022-01-12 Thread John Snow
ch 22 is a touch hacky, and I think I will spend some time today improving it, but I think it will be a follow-up, if that's okay.) Thanks, --js On Mon, Jan 10, 2022 at 6:33 PM John Snow wrote: > > > > On Mon, Jan 10, 2022 at 6:29 PM John Snow wrote: >> >> Based-on: <

Re: [PATCH v3 14/31] python/qmp: switch qmp-shell to AQMP

2022-01-12 Thread John Snow
On Wed, Jan 12, 2022 at 8:52 AM Beraldo Leal wrote: > > On Mon, Jan 10, 2022 at 06:28:53PM -0500, John Snow wrote: > > We have a replacement for async QMP, but it doesn't have feature parity > > yet. For now, then, port the old tool onto the new backend. > >

Re: [PATCH v2 3/4] scripts/qapi-gen.py: add --add-trace-points option

2022-01-11 Thread John Snow
On Thu, Dec 23, 2021 at 6:08 AM Vladimir Sementsov-Ogievskiy wrote: > > Add and option to generate trace points. We should generate both trace > points and trace-events files for further trace point code generation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Philippe Mathieu-D

Re: [PATCH v2 2/4] scripts/qapi/commands: gen_commands(): add add_trace_points argument

2022-01-11 Thread John Snow
On Tue, Jan 11, 2022 at 6:53 PM John Snow wrote: > > On Thu, Dec 23, 2021 at 6:08 AM Vladimir Sementsov-Ogievskiy > wrote: > > > > Add possibility to generate trace points for each qmp command. > > > > We should generate both trace points and trace-events file,

Re: [PATCH v2 2/4] scripts/qapi/commands: gen_commands(): add add_trace_points argument

2022-01-11 Thread John Snow
On Thu, Dec 23, 2021 at 6:08 AM Vladimir Sementsov-Ogievskiy wrote: > > Add possibility to generate trace points for each qmp command. > > We should generate both trace points and trace-events file, for further > trace point code generation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

Re: [PATCH v2 1/4] jobs: drop qmp_ trace points

2022-01-11 Thread John Snow
On Mon, Jan 10, 2022 at 11:06 AM Stefan Hajnoczi wrote: > > On Thu, Dec 23, 2021 at 12:07:53PM +0100, Vladimir Sementsov-Ogievskiy wrote: > > diff --git a/block/trace-events b/block/trace-events > > index 549090d453..5be3e3913b 100644 > > --- a/block/trace-events > > +++ b/block/trace-events > > @

Re: [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it

2022-01-11 Thread John Snow
> +qtest_add_func("hd-geo/override/scsi_2_controllers", > + test_override_scsi_2_controllers); > +} > qtest_add_func("hd-geo/override/virtio_blk", > test_override_virtio_blk); > qtest_add_func("hd-geo/override/zero_chs", test_override_zero_chs); > qtest_add_func("hd-geo/override/scsi_hot_unplug", > -- > 2.27.0 > Acked-by: John Snow

Re: [PATCH v3 00/31] Python: delete synchronous qemu.qmp package

2022-01-10 Thread John Snow
On Mon, Jan 10, 2022 at 6:29 PM John Snow wrote: > Based-on: <20220110232521.1922962-1-js...@redhat.com> > (jsnow/python staging branch) > Sorry, I goofed. This series accidentally re-includes these patches. You can ignore the first four patches, or apply directly o

[PATCH v3 29/31] python: re-enable pylint duplicate-code warnings

2022-01-10 Thread John Snow
With the old library gone, there's nothing duplicated in the tree, so the warning suppression can be removed. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/python/setup.

[PATCH v3 27/31] python/aqmp: copy qmp docstrings to qemu.aqmp.legacy

2022-01-10 Thread John Snow
Copy the docstrings out of qemu.qmp, adjusting them as necessary to more accurately reflect the current state of this class. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/aqmp/legacy.py | 110

[PATCH v3 26/31] python/aqmp: fully separate from qmp.QEMUMonitorProtocol

2022-01-10 Thread John Snow
After this patch, qemu.aqmp.legacy.QEMUMonitorProtocol no longer inherits from qemu.qmp.QEMUMonitorProtocol. To do this, several inherited methods need to be explicitly re-defined. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu

[PATCH v3 25/31] python/aqmp: take QMPBadPortError and parse_address from qemu.qmp

2022-01-10 Thread John Snow
Shift these definitions over from the qmp package to the async qmp package. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/aqmp/aqmp_tui.py | 3 +-- python/qemu/aqmp/legacy.py | 30 ++ python/qemu/qmp

[PATCH v3 21/31] scripts/bench-block-job: switch to AQMP

2022-01-10 Thread John Snow
For this commit, we only need to remove accommodations for the synchronous QMP library. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- scripts/simplebench/bench_block_job.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH v3 28/31] python: remove the old QMP package

2022-01-10 Thread John Snow
Thank you for your service! Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/PACKAGE.rst | 4 +- python/README.rst | 2 +- python/qemu/qmp/README.rst | 9 - python/qemu/qmp/__init__.py | 396

[PATCH v3 30/31] python: rename qemu.aqmp to qemu.qmp

2022-01-10 Thread John Snow
ade-off is increased confusion inside the QEMU developer tree. Sorry! Note: the 'private' member "_aqmp" in legacy.py also changes to "_qmp"; not out of necessity, but just to remove any traces of the "aqmp" name. Signed-off-by: John Snow --- python/PA

[PATCH v3 13/31] python/qmp: switch qom tools to AQMP

2022-01-10 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/qmp/qom.py| 5 +++-- python/qemu/qmp/qom_common.py | 3 ++- python/qemu/qmp/qom_fuse.py | 11 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a

[PATCH v3 16/31] python: move qmp-shell under the AQMP package

2022-01-10 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/README.rst | 2 +- python/qemu/{qmp => aqmp}/qmp_shell.py | 0 python/setup.cfg | 2 +- scripts/qmp/qmp-shell | 2 +- 4 fi

[PATCH v3 22/31] iotests/mirror-top-perms: switch to AQMP

2022-01-10 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- Note: I still need to adjust the logging. The problem now is that the logging messages include the PID of the test process, so they need to be filtered out. I'll investigate that for a foll

[PATCH v3 15/31] python: move qmp utilities to python/qemu/utils

2022-01-10 Thread John Snow
In order to upload a QMP package to PyPI, I want to remove any scripts that I am not 100% confident I want to support upstream, beyond our castle walls. Move most of our QMP utilities into the utils package so we can split them out from the PyPI upload. Signed-off-by: John Snow Reviewed-by

[PATCH v3 19/31] scripts/cpu-x86-uarch-abi: switch to AQMP

2022-01-10 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- scripts/cpu-x86-uarch-abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py

[PATCH v3 31/31] python: rename 'aqmp-tui' to 'qmp-tui'

2022-01-10 Thread John Snow
This is the last vestige of the "aqmp" moniker surviving in the tree; remove it. Signed-off-by: John Snow --- python/qemu/qmp/{aqmp_tui.py => qmp_tui.py} | 12 ++-- python/setup.cfg| 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-)

[PATCH v3 17/31] python/machine: permanently switch to AQMP

2022-01-10 Thread John Snow
Remove the QEMU_PYTHON_LEGACY_QMP environment variable, making the switch permanent. Update Exceptions and import paths as necessary. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/machine/machine.py | 18 +++--- python

[PATCH v3 23/31] iotests: switch to AQMP

2022-01-10 Thread John Snow
Simply import the type defition from the new location. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- tests/qemu-iotests/iotests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu

[PATCH v3 24/31] python: temporarily silence pylint duplicate-code warnings

2022-01-10 Thread John Snow
The next several commits copy some code from qemu.qmp to qemu.aqmp, then delete qemu.qmp. In the interim, to prevent test failures, the duplicate code detection needs to be silenced to prevent bisect problems with CI testing. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v3 20/31] scripts/render-block-graph: switch to AQMP

2022-01-10 Thread John Snow
Creating an instance of qemu.aqmp.ExecuteError is too involved here, so just drop the specificity down to a generic QMPError. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- scripts/render_block_graph.py | 8 +++- 1 file changed, 3

[PATCH v3 09/31] python/aqmp: add SocketAddrT to package root

2022-01-10 Thread John Snow
It's a commonly needed definition, it can be re-exported by the root. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/aqmp/__init__.py | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python/qemu

[PATCH v3 18/31] scripts/cpu-x86-uarch-abi: fix CLI parsing

2022-01-10 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé Reviewed-by: Vladimir Sementsov-Ogievskiy --- scripts/cpu-x86-uarch-abi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py index 08acc52a81..8963d90f0b

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