Re: [PATCH 05/13] iotests/297: Create main() function

2021-10-13 Thread Hanna Reitz
ng commits.) Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hanna Reitz --- tests/qemu-iotests/297 | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests

Re: [PATCH 03/13] iotests/297: Add get_files() function

2021-10-13 Thread Hanna Reitz
On 04.10.21 23:04, John Snow wrote: Split out file discovery into its own method to begin separating out configuration/setup and test execution. Signed-off-by: John Snow --- tests/qemu-iotests/297 | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 02/13] iotests/297: Split mypy configuration out into mypy.ini

2021-10-13 Thread Hanna Reitz
-iotests/mypy.ini Reviewed-by: Hanna Reitz diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index bc3a0ceb2aa..b8101e6024a 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -73,19 +73,7 @@ def run_linters(): sys.stdout.flush() env['MYPYPATH'] = env

Re: [PATCH 01/13] iotests/297: Move pylint config into pylintrc

2021-10-13 Thread Hanna Reitz
2 files changed, 17 insertions(+), 3 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH] block/vpc: Add a sanity check that fixed-size images have the right type

2021-10-13 Thread Hanna Reitz
On 12.10.21 10:27, Thomas Huth wrote: The code in vpc.c uses BDRVVPCState->footer.type in various places to decide whether the image is a fixed-size (VHD_FIXED) or a dynamic (VHD_DYNAMIC) image. However, we never check that this field really contains VHD_FIXED if we detected a fixed size image

Re: [PATCH v3 0/7] Switch iotests to using Async QMP

2021-10-13 Thread Hanna Reitz
On 13.10.21 00:34, John Snow wrote: Based-on: <20211012214152.802483-1-js...@redhat.com> [PULL 00/10] Python patches GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-iotest-wrapper CI: https://gitlab.com/jsnow/qemu/-/pipelines/387210591 Hiya, This series continues where

Re: [PATCH v3 6/7] python/aqmp: Create sync QMP wrapper for iotests

2021-10-13 Thread Hanna Reitz
Snow --- python/qemu/aqmp/legacy.py | 138 + 1 file changed, 138 insertions(+) create mode 100644 python/qemu/aqmp/legacy.py Acked-by: Hanna Reitz

Re: [PATCH v3 5/7] iotests: Conditionally silence certain AQMP errors

2021-10-13 Thread Hanna Reitz
--- tests/qemu-iotests/iotests.py | 20 +++- tests/qemu-iotests/tests/mirror-top-perms | 12 2 files changed, 27 insertions(+), 5 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v3 4/7] iotests: Accommodate async QMP Exception classes

2021-10-13 Thread Hanna Reitz
-top-perms | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v3 3/7] python/aqmp: Remove scary message

2021-10-13 Thread Hanna Reitz
1 file changed, 12 deletions(-) Acked-by: Hanna Reitz

Re: [PATCH v3 2/7] python/machine: Handle QMP errors on close more meticulously

2021-10-13 Thread Hanna Reitz
+- 1 file changed, 42 insertions(+), 6 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v2 13/17] iotests: Accommodate async QMP Exception classes

2021-10-12 Thread Hanna Reitz
On 23.09.21 02:49, John Snow wrote: (But continue to support the old ones for now, too.) There are very few cases of any user of QEMUMachine or a subclass thereof relying on a QMP Exception type. If you'd like to check for yourself, you want to grep for all of the derivatives of QMPError,

Re: [PATCH v2 12/17] python/machine: Handle QMP errors on close more meticulously

2021-10-12 Thread Hanna Reitz
On 07.10.21 18:52, John Snow wrote: On Wed, Sep 22, 2021 at 8:50 PM John Snow wrote: To use the AQMP backend, Machine just needs to be a little more diligent about what happens when closing a QMP connection. The operation is no longer a freebie in the async world; it may

Re: [PATCH v2 11/17] python/machine: remove has_quit argument

2021-10-12 Thread Hanna Reitz
22 insertions(+), 23 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH] qcow2: Silence clang -m32 compiler warning

2021-10-12 Thread Hanna Reitz
On 11.10.21 18:24, Eric Blake wrote: On Mon, Oct 11, 2021 at 05:50:31PM +0200, Hanna Reitz wrote: With -m32, size_t is generally only a uint32_t. That makes clang complain that in the assertion assert(qiov->size <= INT64_MAX); the range of the type of qiov->size (size_t) is

[PATCH] qcow2: Silence clang -m32 compiler warning

2021-10-11 Thread Hanna Reitz
lang. Fixes: f7ef38dd1310d7d9db76d0aa16899cbc5744f36d ("block: use int64_t instead of uint64_t in driver read handlers") Signed-off-by: Hanna Reitz --- I don't know whether this is the best possible solution, or whether we should care about this at all (I personally think it'

Re: [PATCH v2] vmdk: allow specification of tools version

2021-10-11 Thread Hanna Reitz
On 13.09.21 15:04, Thomas Weißschuh wrote: VMDK files support an attribute that represents the version of the guest tools that are installed on the disk. This attribute is used by vSphere before a machine has been started to determine if the VM has the guest tools installed. This is important

Re: [PATCH] qemu-iotests: flush after every test

2021-10-11 Thread Hanna Reitz
On 06.10.21 11:27, Paolo Bonzini wrote: This makes it possible to see what is happening, even if the output of "make check-block" is not sent to a tty (for example if it is sent to grep or tee). Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/testrunner.py | 1 + 1 file changed, 1

Re: [PATCH v2 0/2] pylint: fix new errors and warnings in qemu-iotests

2021-10-11 Thread Hanna Reitz
On 11.10.21 11:58, Emanuele Giuseppe Esposito wrote: On 11/10/2021 11:29, Hanna Reitz wrote: On 08.10.21 08:28, Emanuele Giuseppe Esposito wrote: There are some warnings and errors that we either miss or are new in pylint. Anyways, test 297 of qemu-iotests fails because of that, so we need

Re: [PATCH] qemu-img: Consistent docs for convert -F

2021-10-11 Thread Hanna Reitz
On 21.09.21 16:28, Eric Blake wrote: Use consistent capitalization, and fix a missed line (we duplicate the qemu-img synopses in too many places). Fixes: 1899bf4737 (qemu-img: Add -F shorthand to convert) Signed-off-by: Eric Blake --- docs/tools/qemu-img.rst | 2 +- qemu-img-cmds.hx

Re: [PATCH v2 0/2] pylint: fix new errors and warnings in qemu-iotests

2021-10-11 Thread Hanna Reitz
On 08.10.21 08:28, Emanuele Giuseppe Esposito wrote: There are some warnings and errors that we either miss or are new in pylint. Anyways, test 297 of qemu-iotests fails because of that, so we need to fix it. All these fixes involve just indentation or additional spaces added. Signed-off-by:

Re: [PATCH v3 00/17] iotests: support zstd

2021-10-08 Thread Hanna Reitz
On 07.10.21 18:29, Vladimir Sementsov-Ogievskiy wrote: 9/14/21 20:08, Hanna Reitz wrote: On 14.09.21 12:25, Vladimir Sementsov-Ogievskiy wrote: These series makes tests pass with     IMGOPTS='compression_type=zstd' Also, python iotests start to support IMGOPTS (they didn't before). v3: 02

[PATCH v5 12/13] mirror: Do not clear .cancelled

2021-10-06 Thread Hanna Reitz
-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 2 -- job.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 75874c1806..efec2c7674 100644 --- a/block/mirror.c +++ b/block

[PATCH v5 11/13] mirror: Stop active mirroring after force-cancel

2021-10-06 Thread Hanna Reitz
requests generated by the job, so this is fine.) Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index 3393ede0e1..75874c1806 100644 --- a/block

[PATCH v5 13/13] iotests: Add mirror-ready-cancel-error test

2021-10-06 Thread Hanna Reitz
Test what happens when there is an I/O error after a mirror job in the READY phase has been cancelled. Signed-off-by: Hanna Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy --- .../tests/mirror-ready-cancel-error | 143

[PATCH v5 10/13] mirror: Check job_is_cancelled() earlier

2021-10-06 Thread Hanna Reitz
/qemu/-/issues/462 Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 0eaba88060..3393ede0e1 100644 --- a/block/mirror.c

[PATCH v5 09/13] mirror: Use job_is_cancelled()

2021-10-06 Thread Hanna Reitz
mirror_drained_poll() returns true whenever the job is cancelled, because "we [can] be sure that it won't issue more requests". However, this is only true for force-cancelled jobs, so use job_is_cancelled(). Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir

[PATCH v5 08/13] job: Add job_cancel_requested()

2021-10-06 Thread Hanna Reitz
ink: https://gitlab.com/qemu-project/qemu/-/issues/462 Signed-off-by: Hanna Reitz --- include/qemu/job.h | 8 +++- block/mirror.c | 10 -- job.c | 14 -- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/j

[PATCH v5 05/13] job: @force parameter for job_cancel_sync()

2021-10-06 Thread Hanna Reitz
quitting. If users want consistent results, they must have all jobs be done before they quit qemu.) Buglink: https://gitlab.com/qemu-project/qemu/-/issues/462 Signed-off-by: Hanna Reitz --- include/qemu/job.h| 10 ++--- block/replication.c | 4 +- blockdev.c

[PATCH v5 04/13] job: Force-cancel jobs in a failed transaction

2021-10-06 Thread Hanna Reitz
When a transaction is aborted, no result matters, and so all jobs within should be force-cancelled. Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- job.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/job.c b/job.c

[PATCH v5 06/13] jobs: Give Job.force_cancel more meaning

2021-10-06 Thread Hanna Reitz
running despite being "cancelled" (force_cancel=false). To this end, we let jobs that provide JobDriver.cancel() tell the generic job code whether they will terminate as soon as possible or not, and for jobs that do not provide that method we assume they will. Signed-off-by: Hanna Reitz

[PATCH v5 00/13] mirror: Handle errors after READY cancel

2021-10-06 Thread Hanna Reitz
mirror: Do not clear .cancelled' 013/13:[] [--] 'iotests: Add mirror-ready-cancel-error test' Hanna Reitz (13): job: Context changes in job_completed_txn_abort() mirror: Keep s->synced on error mirror: Drop s->synced job: Force-cancel jobs in a failed transaction job: @for

[PATCH v5 03/13] mirror: Drop s->synced

2021-10-06 Thread Hanna Reitz
As of HEAD^, there is no meaning to s->synced other than whether the job is READY or not. job_is_ready() gives us that information, too. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Ke

[PATCH v5 07/13] job: Do not soft-cancel after a job is done

2021-10-06 Thread Hanna Reitz
-by: Hanna Reitz --- job.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/job.c b/job.c index 81c016eb10..44e741ebd4 100644 --- a/job.c +++ b/job.c @@ -734,9 +734,19 @@ static void job_cancel_async(Job *job, bool force) assert(job

[PATCH v5 01/13] job: Context changes in job_completed_txn_abort()

2021-10-06 Thread Hanna Reitz
_impl: Operation not permitted"). Drop the local @outer_ctx variable from job_completed_txn_abort(), and instead re-acquire the actual job's context at the end of the function, so job_exit() will release the same. Signed-off-by: Hanna Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy ---

[PATCH v5 02/13] mirror: Keep s->synced on error

2021-10-06 Thread Hanna Reitz
that transition is not allowed. Signed-off-by: Hanna Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block/mirror.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index c962e8b471..b367b29324 100644 --- a/block/mirror.c +++ b/block/mir

Re: [PATCH 12/15] iotests: Disable AQMP logging under non-debug modes

2021-10-05 Thread Hanna Reitz
On 04.10.21 20:32, John Snow wrote: On Mon, Oct 4, 2021 at 6:12 AM Hanna Reitz <mailto:hre...@redhat.com>> wrote: On 18.09.21 04:14, John Snow wrote: > > > On Fri, Sep 17, 2021 at 8:58 PM John Snow mailto:js...@redhat.com> > <mailto:

Re: [PULL 00/12] jobs: mirror: Handle errors after READY cancel

2021-10-05 Thread Hanna Reitz
On 04.10.21 19:59, Vladimir Sementsov-Ogievskiy wrote: 10/4/21 19:47, Hanna Reitz wrote: On 24.09.21 00:01, Vladimir Sementsov-Ogievskiy wrote: 22.09.2021 22:19, Vladimir Sementsov-Ogievskiy wrote: 22.09.2021 19:05, Richard Henderson wrote: On 9/21/21 3:20 AM, Vladimir Sementsov-Ogievskiy

Re: [PULL 00/12] jobs: mirror: Handle errors after READY cancel

2021-10-04 Thread Hanna Reitz
to c9489c04319cac75c76af8fc27c254f46e10214c:    iotests: Add mirror-ready-cancel-error test (2021-09-21 11:56:11 +0300) mirror: Handle errors after READY cancel Hanna Reitz (12):    job: Context

Re: [PATCH 12/15] iotests: Disable AQMP logging under non-debug modes

2021-10-04 Thread Hanna Reitz
On 18.09.21 04:14, John Snow wrote: On Fri, Sep 17, 2021 at 8:58 PM John Snow <mailto:js...@redhat.com>> wrote: On Fri, Sep 17, 2021 at 10:30 AM Hanna Reitz mailto:hre...@redhat.com>> wrote: On 17.09.21 07:40, John Snow wrote: > Disable the aqmp l

Re: [PATCH 12/15] iotests: Disable AQMP logging under non-debug modes

2021-10-04 Thread Hanna Reitz
On 18.09.21 02:58, John Snow wrote: On Fri, Sep 17, 2021 at 10:30 AM Hanna Reitz <mailto:hre...@redhat.com>> wrote: On 17.09.21 07:40, John Snow wrote: > Disable the aqmp logger, which likes to (at the moment) print out > intermediate warnings and errors tha

Re: [PATCH 10/15] python/machine: Add support for AQMP backend

2021-10-04 Thread Hanna Reitz
On 18.09.21 01:48, John Snow wrote: On Fri, Sep 17, 2021 at 10:16 AM Hanna Reitz <mailto:hre...@redhat.com>> wrote: On 17.09.21 07:40, John Snow wrote: > To use the AQMP backend, Machine just needs to be a little more diligent > about what happens whe

Re: [PATCH 03/15] python/aqmp: Return cleared events from EventListener.clear()

2021-10-04 Thread Hanna Reitz
On 17.09.21 19:19, John Snow wrote: On Fri, Sep 17, 2021 at 8:36 AM Hanna Reitz <mailto:hre...@redhat.com>> wrote: On 17.09.21 07:40, John Snow wrote: > This serves two purposes: > > (1) It is now possible to discern whether or not clear() removed any

Re: [PATCH v3 14/16] iotests/linters: Add workaround for mypy bug #9852

2021-10-04 Thread Hanna Reitz
On 22.09.21 22:37, John Snow wrote: On Fri, Sep 17, 2021 at 7:16 AM Hanna Reitz <mailto:hre...@redhat.com>> wrote: On 16.09.21 06:09, John Snow wrote: > This one is insidious: if you use the invocation > "from {namespace} import {subpackage}" as mirror-t

Re: [PATCH v3 14/16] iotests/linters: Add workaround for mypy bug #9852

2021-10-04 Thread Hanna Reitz
On 22.09.21 22:38, John Snow wrote: On Wed, Sep 22, 2021 at 4:37 PM John Snow <mailto:js...@redhat.com>> wrote: On Fri, Sep 17, 2021 at 7:16 AM Hanna Reitz mailto:hre...@redhat.com>> wrote: Question is, when “can we use” mypy >= 0.920? Should we check t

Re: [PATCH v3 07/16] iotests/297: Don't rely on distro-specific linter binaries

2021-10-04 Thread Hanna Reitz
On 22.09.21 21:53, John Snow wrote: (This email just explains python packaging stuff. No action items in here. Skim away.) On Fri, Sep 17, 2021 at 5:43 AM Hanna Reitz <mailto:hre...@redhat.com>> wrote: On 16.09.21 06:09, John Snow wrote: > 'pylint-3' is another Fed

Re: [PATCH v3 11/16] iotests/297: return error code from run_linters()

2021-10-04 Thread Hanna Reitz
On 22.09.21 22:18, John Snow wrote: On Fri, Sep 17, 2021 at 7:00 AM Hanna Reitz <mailto:hre...@redhat.com>> wrote: [...] As you say, run_linters() to me seems very iotests-specific still: It emits a specific output that is compared against a reference output. Fin

Re: [PATCH 13/15] iotests: Accommodate async QMP Exception classes

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: (But continue to support the old ones for now, too.) There are very few cases of any user of QEMUMachine or a subclass thereof relying on a QMP Exception type. If you'd like to check for yourself, you want to grep for all of the derivatives of QMPError,

Re: [PATCH v3 00/17] iotests: support zstd

2021-09-17 Thread Hanna Reitz
On 15.09.21 16:45, Hanna Reitz wrote: On 14.09.21 12:25, Vladimir Sementsov-Ogievskiy wrote: These series makes tests pass with     IMGOPTS='compression_type=zstd' Also, python iotests start to support IMGOPTS (they didn't before). Unfortunately, the problem I have now is that it makes

Re: [PATCH 14/15] python/aqmp: Remove scary message

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: The scary message interferes with the iotests output. Coincidentally, if iotests works by removing this, then it's good evidence that we don't really need to scare people away from using it. Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 14

Re: [PATCH 15/15] python, iotests: replace qmp with aqmp

2021-09-17 Thread Hanna Reitz
+if os.environ.get('QEMU_PYTHON_LEGACY_QMP'): +from qemu.qmp import QEMUMonitorProtocol +else: +from qemu.aqmp.legacy import QEMUMonitorProtocol + + LOG = logging.getLogger(__name__) Black magic. Reviewed-by: Hanna Reitz Tested-by: Hanna Reitz

Re: [PATCH 12/15] iotests: Disable AQMP logging under non-debug modes

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: Disable the aqmp logger, which likes to (at the moment) print out intermediate warnings and errors that cause session termination; disable them so they don't interfere with the job output. Leave any "CRITICAL" warnings enabled though, those are ones that we

Re: [PATCH 11/15] python/aqmp: Create sync QMP wrapper for iotests

2021-09-17 Thread Hanna Reitz
just be boring and do an Acked-by: Hanna Reitz

Re: [PATCH 10/15] python/machine: Add support for AQMP backend

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: To use the AQMP backend, Machine just needs to be a little more diligent about what happens when closing a QMP connection. The operation is no longer a freebie in the async world. Because async QMP continues to check for messages asynchronously, it's almost

Re: [PATCH 09/15] python/machine: remove has_quit argument

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: If we spy on the QMP commands instead, we don't need callers to remember to pass it. Seems like a fair trade-off. The one slightly weird bit is overloading this instance variable for wait(), where we use it to mean "don't issue the qmp 'quit' command". This

Re: [PATCH 08/15] python/aqmp: Create MessageModel and StandaloneModel classes

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: This allows 'Greeting' to be subclass of 'Message'. We need the adapter classes to avoid some typing problems that occur if we try to put too much into the 'Model' class itself; the exact details of why are left as an exercise to the reader. Why bother? This

Re: [PATCH 07/15] python/aqmp: add send_fd_scm

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: The single space is indeed required to successfully transmit the file descriptor to QEMU. Yeah, socket_scm_helper.c said “Send a blank to notify qemu”. Signed-off-by: John Snow --- python/qemu/aqmp/qmp_client.py | 17 + 1 file changed,

Re: [PATCH 06/15] python, iotests: remove socket_scm_helper

2021-09-17 Thread Hanna Reitz
-iotests/socket_scm_helper.c delete mode 100644 tests/qemu-iotests/meson.build Oh, huh.  Nice. Reviewed-by: Hanna Reitz

Re: [PATCH 05/15] python/qmp: add send_fd_scm directly to QEMUMonitorProtocol

2021-09-17 Thread Hanna Reitz
plicated.  OK then. Reviewed-by: Hanna Reitz

Re: [PATCH 04/15] python/qmp: clear events on get_events() call

2021-09-17 Thread Hanna Reitz
, perhaps renaming it to get_new_events, but that’s an even weaker suggestion.) Anyway: Reviewed-by: Hanna Reitz

Re: [PATCH 03/15] python/aqmp: Return cleared events from EventListener.clear()

2021-09-17 Thread Hanna Reitz
, having Collection.delete return the deleted element is a common thing in any language’s standard library, so why not have `clear` do the same. Reviewed-by: Hanna Reitz

Re: [PATCH 02/15] python/aqmp: add .empty() method to EventListener

2021-09-17 Thread Hanna Reitz
--- python/qemu/aqmp/events.py | 6 ++ 1 file changed, 6 insertions(+) Reviewed-by: Hanna Reitz

Re: [PATCH 01/15] python/aqmp: add greeting property to QMPClient

2021-09-17 Thread Hanna Reitz
On 17.09.21 07:40, John Snow wrote: Expose the greeting as a read-only property of QMPClient so it can be retrieved at-will. Signed-off-by: John Snow --- python/qemu/aqmp/qmp_client.py | 5 + 1 file changed, 5 insertions(+) Reviewed-by: Hanna Reitz

Re: [PATCH v3 16/16] iotests/linters: check mypy files all at once

2021-09-17 Thread Hanna Reitz
patch 14 has to make everything quite slow (which might be a tiny nuisance in bisecting some day?). Signed-off-by: John Snow --- tests/qemu-iotests/linters.py | 62 --- 1 file changed, 29 insertions(+), 33 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v3 14/16] iotests/linters: Add workaround for mypy bug #9852

2021-09-17 Thread Hanna Reitz
id I still don’t really understand this, but I’m happy with this given as the reported workaround and you saying it works. Reviewed-by: Hanna Reitz Question is, when “can we use” mypy >= 0.920?  Should we check the version string and append this switch as required? Hanna

Re: [PATCH v3 11/16] iotests/297: return error code from run_linters()

2021-09-17 Thread Hanna Reitz
On 16.09.21 06:09, John Snow wrote: This turns run_linters() into a bit of a hybrid test; returning non-zero on failed execution while also printing diffable information. This is done for the benefit of the avocado simple test runner, which will soon be attempting to execute this test from a

Re: [PATCH v3 10/16] iotests/297: Add 'directory' argument to run_linters

2021-09-17 Thread Hanna Reitz
On 16.09.21 06:09, John Snow wrote: Allow run_linters to work well if it's executed from a different directory. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/297 | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Hanna Reitz

Re: [PATCH v3 09/16] iotests/297: Separate environment setup from test execution

2021-09-17 Thread Hanna Reitz
insertions(+), 15 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v3 08/16] iotests/297: Create main() function

2021-09-17 Thread Hanna Reitz
ng commits.) Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/297 | 12 1 file changed, 8 insertions(+), 4 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v3 07/16] iotests/297: Don't rely on distro-specific linter binaries

2021-09-17 Thread Hanna Reitz
stand, that’s generally how Python “binaries” work, though (i.e., installed as a module invokable with `python -m`, and then providing some stub binary that, well, effectively does this, but kind of in a weird way, I just don’t understand it), and none of the parameters seem to be hurt in this conversion, so: Reviewed-by: Hanna Reitz

Re: [PATCH v3 06/16] iotests/297: Add get_files() function

2021-09-17 Thread Hanna Reitz
ed_test_dir)] +check_tests = set(os.listdir(directory) + named_tests) - set(SKIP_FILES) +return list(filter(lambda f: is_python_file(f, directory), check_tests)) Seeing a filter() makes me immensely happy, but I thought that was unpythonic? Reviewed-by: Hanna Reitz

Re: [PATCH v3 05/16] iotests/297: modify is_python_file to work from any CWD

2021-09-17 Thread Hanna Reitz
sound like an ambitious goal. Signed-off-by: John Snow --- tests/qemu-iotests/297 | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v3 04/16] iotests/migrate-bitmaps-test: delint

2021-09-17 Thread Hanna Reitz
+++ 1 file changed, 28 insertions(+), 22 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v3 03/16] iotests/migrate-bitmaps-postcopy-test: declare instance variables

2021-09-17 Thread Hanna Reitz
On 16.09.21 06:09, John Snow wrote: Signed-off-by: John Snow --- tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test

Re: [PATCH v3 02/16] iotests/mirror-top-perms: Adjust imports

2021-09-17 Thread Hanna Reitz
/mirror-top-perms | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 09/22] qapi: Convert simple union ImageInfoSpecific to flat one

2021-09-16 Thread Hanna Reitz
BlockdevDriver. We could reuse BlockdevDriver instead. Cc: Kevin Wolf Cc: Hanna Reitz Signed-off-by: Markus Armbruster --- qapi/block-core.json | 56 ++-- 1 file changed, 49 insertions(+), 7 deletions(-) Acked-by: Hanna Reitz

Re: [PATCH 10/22] qapi: Convert simple union TransactionAction to flat one

2021-09-16 Thread Hanna Reitz
for their removal, convert simple union TransactionAction to an equivalent flat one. Adds some boilerplate to the schema, which is a bit ugly, but a lot easier to maintain than the simple union feature. Cc: Kevin Wolf Cc: Hanna Reitz Signed-off-by: Markus Armbruster --- qapi/transaction.json

[PATCH v4 11/12] virtiofsd: Optionally fill lo_inode.fhandle

2021-09-16 Thread Hanna Reitz
, we use statx(). Therefore, using file handles requires statx() support. Signed-off-by: Hanna Reitz --- tools/virtiofsd/helper.c | 3 + tools/virtiofsd/passthrough_ll.c | 297 -- tools/virtiofsd/passthrough_seccomp.c | 1 + 3 files changed, 289

[PATCH v4 12/12] virtiofsd: Add lazy lo_do_find()

2021-09-16 Thread Hanna Reitz
() call. Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 93 +--- 1 file changed, 75 insertions(+), 18 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index e86fad8b2f..368bad17c7 100644 --- a/tools/virtiofsd

[PATCH v4 08/12] virtiofsd: Pass lo_data to lo_inode_{fd,open}()

2021-09-16 Thread Hanna Reitz
() and lo_inode_open(). Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 34 +--- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index d257eda129..bc3b803d46 100644 --- a/tools

[PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-09-16 Thread Hanna Reitz
in the dentry cache, basically. Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 81 +--- 1 file changed, 65 insertions(+), 16 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index bd8fc922ea..b7d6aa7f9d 100644

[PATCH v4 06/12] virtiofsd: Let lo_fd() return a TempFd

2021-09-16 Thread Hanna Reitz
-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 55 +--- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index c5baa752e4..3bf20b8659 100644 --- a/tools/virtiofsd

[PATCH v4 03/12] virtiofsd: Add TempFd structure

2021-09-16 Thread Hanna Reitz
lo_inode.fd). By using g_auto(TempFd) to store this result, callers will not even have to care about closing a temporary FD after use. It will be done automatically once the object goes out of scope. Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 63

[PATCH v4 09/12] virtiofsd: Add lo_inode.fhandle

2021-09-16 Thread Hanna Reitz
have a strong reference to an lo_mount_fd object, and then we will need to be able to pass false for drop_mount_fd_ref. Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 175 +++--- tools/virtiofsd/passthrough_seccomp.c | 1 + 2 files changed, 161

[PATCH v4 05/12] virtiofsd: Add lo_inode_fd() helper

2021-09-16 Thread Hanna Reitz
Once we let lo_inode.fd be optional, we will need its users to open the file handle stored in lo_inode instead. This function will do that. For now, it just returns lo_inode.fd, though. Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 159 +-- 1

[PATCH v4 01/12] virtiofsd: Keep /proc/self/mountinfo open

2021-09-16 Thread Hanna Reitz
as the mount FD, we will at least not hog any actually deletable inodes. Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 40 1 file changed, 40 insertions(+) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index

[PATCH v4 02/12] virtiofsd: Limit setxattr()'s creds-dropped region

2021-09-16 Thread Hanna Reitz
is really fickle when it comes to credentials being dropped.) Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 34 +++- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c

[PATCH v4 07/12] virtiofsd: Let lo_inode_open() return a TempFd

2021-09-16 Thread Hanna Reitz
(regardless of whether it is an O_PATH FD or a non-O_PATH FD). Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 156 +++ 1 file changed, 75 insertions(+), 81 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index

[PATCH v4 04/12] virtiofsd: Use lo_inode_open() instead of openat()

2021-09-16 Thread Hanna Reitz
this patch, lo_inode_open() is the only place to invoke openat() to reopen an existing FD with different flags. Signed-off-by: Hanna Reitz --- tools/virtiofsd/passthrough_ll.c | 47 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/tools/virtiofsd/passthro

[PATCH v4 00/12] virtiofsd: Allow using file handles instead of O_PATH FDs

2021-09-16 Thread Hanna Reitz
Add lo_inode.fhandle' 010/12:[0002] [FC] 'virtiofsd: Add inodes_by_handle hash table' 011/12:[0235] [FC] 'virtiofsd: Optionally fill lo_inode.fhandle' 012/12:[0006] [FC] 'virtiofsd: Add lazy lo_do_find()' Hanna Reitz (12): virtiofsd: Keep /proc/self/mountinfo open virtiofsd: Limit setxattr()'s cr

[PULL 32/32] qemu-img: Add -F shorthand to convert

2021-09-15 Thread Hanna Reitz
: <20210913131735.1948339-1-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Maxim Levitsky Signed-off-by: Hanna Reitz --- docs/tools/qemu-img.rst | 4 ++-- qemu-img.c | 10 +++--- qemu-img-cmds.hx| 2 +- tests/qemu-iotests/122 | 2 +- 4 files chang

[PULL 30/32] qcow2-refcount: check_refcounts_l1(): check reserved bits

2021-09-15 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Tested-by: Kirill Tkhai Reviewed-by: Hanna Reitz Message-Id: <20210914122454.141075-10-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz --- block/qcow2.h | 1 + block

[PULL 28/32] qcow2-refcount: check_refcounts_l2(): check reserved bits

2021-09-15 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Tested-by: Kirill Tkhai Reviewed-by: Hanna Reitz Message-Id: <20210914122454.141075-8-vsement...@virtuozzo.com> [hreitz: Separated `type` declaration from statements] Signed-off-by:

[PULL 29/32] qcow2-refcount: improve style of check_refcounts_l1()

2021-09-15 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy - use g_autofree for l1_table - better name for size in bytes variable - reduce code blocks nesting - whitespaces, braces, newlines Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20210914122454.141075-9-vsem

[PULL 26/32] qcow2-refcount: fix_l2_entry_by_zero(): also zero L2 entry bitmap

2021-09-15 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We'll reuse the function to fix wrong L2 entry bitmap. Support it now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz Message-Id: <20210914122454.141075-6-vsement...@virtuozzo.com> Signed-off-by: Hanna

[PULL 24/32] qcow2: introduce qcow2_parse_compressed_l2_entry() helper

2021-09-15 Thread Hanna Reitz
Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz Message-Id: <20210914122454.141075-4-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz --- block/qcow2.h | 3 ++- block/qcow2-cluster.c | 15 +++ block/qcow2-refcount.

[PULL 25/32] qcow2-refcount: introduce fix_l2_entry_by_zero()

2021-09-15 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Split fix_l2_entry_by_zero() out of check_refcounts_l2() to be reused in further patch. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz Message-Id: <20210914122454.141075-5-vsement...@virtuozzo.com> Sign

[PULL 22/32] qcow2-refcount: improve style of check_refcounts_l2()

2021-09-15 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy - don't use same name for size in bytes and in entries - use g_autofree for l2_table - add whitespace - fix block comment style Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz Message-Id

[PULL 31/32] qcow2-refcount: check_refblocks(): add separate message for reserved

2021-09-15 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Split checking for reserved bits out of aligned offset check. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Tested-by: Kirill Tkhai Reviewed-by: Hanna Reitz Message-Id: <20210914122454.141075-11-vsement...@virtuozzo.com> Sign

[PULL 23/32] qcow2: compressed read: simplify cluster descriptor passing

2021-09-15 Thread Hanna Reitz
-by: Alberto Garcia Reviewed-by: Hanna Reitz Message-Id: <20210914122454.141075-3-vsement...@virtuozzo.com> Signed-off-by: Hanna Reitz --- block/qcow2.h | 1 - block/qcow2-cluster.c | 5 ++--- block/qcow2.c | 12 +++- 3 files changed, 9 insertions(+), 9 deletions(-)

<    4   5   6   7   8   9   10   11   12   >