(This is highlighting a what-if, which might make it clear why any
special infrastructure is still required at all. It's not intended to
actually be merged at this step -- running JUST the iotest linters from
e.g. 'make check' is not yet accommodated, so there's no suitable
replacement for 297 for
This one is insidious: if you write an import as "from {namespace}
import {subpackage}" as mirror-top-perms (now) does, mypy will fail on
every-other invocation *if* the package being imported is a typed,
installed, namespace-scoped package.
Upsettingly, that's exactly what
Now, 297 is just the iotests-specific incantations and linters.py is as
minimal as I can think to make it. The only remaining element in here
that ought to be configuration and not code is the list of skip files,
but they're still numerous enough that repeating them for mypy and
pylint
Take iotest 297's main() test function and split it into two sub-cases
that can be skipped individually. We can also drop custom environment
setup from the pylint test as it isn't needed.
Signed-off-by: John Snow
---
tests/qemu-iotests/297 | 63 ++
1 file
We need at least a tiny little shim here to join test file discovery
with test invocation. This logic could conceivably be hosted somewhere
in python/, but I felt it was strictly the least-rude thing to keep the
test logic here in iotests/, even if this small function isn't itself an
iotest.
Note
As mentioned in 'iotests/297: Don't rely on distro-specific linter
binaries', these checks are overly strict. Update them to be in-line
with how we actually invoke the linters themselves.
Signed-off-by: John Snow
---
tests/qemu-iotests/297 | 9 +
1 file changed, 5 insertions(+), 4
Instead of using a process return code as the python function return
value (or just not returning anything at all), allow run_linter() to
raise an exception instead.
The responsibility for printing output on error shifts from the function
itself to the caller, who will know best how to
Instead of running "run_linters" directly, create a main() function that
will be responsible for environment setup, leaving run_linters()
responsible only for execution of the linters.
(That environment setup will be moved over in forthcoming commits.)
Signed-off-by: John Snow
Reviewed-by:
More separation of code and configuration.
Signed-off-by: John Snow
Reviewed-by: Hanna Reitz
---
tests/qemu-iotests/297 | 14 +-
tests/qemu-iotests/mypy.ini | 12
2 files changed, 13 insertions(+), 13 deletions(-)
create mode 100644 tests/qemu-iotests/mypy.ini
Move --score=n and --notes=XXX,FIXME into pylintrc. This pulls
configuration out of code, which I think is probably a good thing in
general.
Signed-off-by: John Snow
Reviewed-by: Hanna Reitz
---
tests/qemu-iotests/297 | 4 +---
tests/qemu-iotests/pylintrc | 16
2 files
Run mypy and pylint on the iotests files directly from the Python CI
test infrastructure. This ensures that any accidental breakages to the
qemu.[qmp|aqmp|machine|utils] packages will be caught by that test
suite.
It also ensures that these linters are run with well-known versions and
test
Move environment setup into main(), and split the actual linter
execution into run_pylint and run_mypy, respectively.
Signed-off-by: John Snow
Reviewed-by: Hanna Reitz
---
tests/qemu-iotests/297 | 38 --
1 file changed, 24 insertions(+), 14 deletions(-)
There's virtually nothing special here anymore; we can combine these
into a single, rather generic function.
Signed-off-by: John Snow
---
tests/qemu-iotests/297 | 42 ++
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git
'pylint-3' is another Fedora-ism. Use "python3 -m pylint" or "python3 -m
mypy" to access these scripts instead. This style of invocation will
prefer the "correct" tool when run in a virtual environment.
Note that we still check for "pylint-3" before the test begins -- this
check is now "overly
Split out file discovery into its own method to begin separating out
configuration/setup and test execution.
Signed-off-by: John Snow
Reviewed-by: Hanna Reitz
---
tests/qemu-iotests/297 | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/297
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-iotest-pt2
CI: https://gitlab.com/jsnow/qemu/-/pipelines/388626603
(There's no real rush on my part for this particular series, so review
at-leisure, I'm just getting my edits back out onto the list. The AQMP
series is more important
Am 12.10.2021 um 17:22 hat Peter Lieven geschrieben:
> the qemu rbd driver currently lacks support for bdrv_co_block_status.
> This results mainly in incorrect progress during block operations (e.g.
> qemu-img convert with an rbd image as source).
>
> This patch utilizes the rbd_diff_iterate2
Am 18.10.2021 um 16:22 hat Vladimir Sementsov-Ogievskiy geschrieben:
> 18.10.2021 16:47, Kevin Wolf wrote:
> > Using blockdev-snapshot to append a node as an overlay to itself, or to
> > any of its parents, causes crashes. Catch the condition and return an
> > error for these cases instead.
> >
>
Am 19.10.2021 um 13:09 hat Ari Sundholm geschrieben:
> AIO discards regressed as a result of the following commit:
> 0dfc7af2 block/file-posix: Optimize for macOS
>
> When trying to run blkdiscard within a Linux guest, the request would
> fail, with some errors in dmesg:
>
> [ snip ]
AIO discards regressed as a result of the following commit:
0dfc7af2 block/file-posix: Optimize for macOS
When trying to run blkdiscard within a Linux guest, the request would
fail, with some errors in dmesg:
[ snip ]
[4.010070] sd 2:0:0:0: [sda] tag#0 FAILED Result:
Am 19.10.2021 um 10:06 hat Laurent Vivier geschrieben:
> On 08/10/2021 15:34, Kevin Wolf wrote:
> > Instead of accessing the global QemuOptsList, which really belong to the
> > command line parser and shouldn't be accessed from devices, store a
> > pointer to the QemuOpts in a new VirtIONet field.
On Tue, Oct 19, 2021 at 05:40:13AM +0200, Philippe Mathieu-Daudé wrote:
> +Stefan
>
> On 10/18/21 20:07, Ari Sundholm wrote:
> > AIO discards regressed as a result of the following commit:
> > 0dfc7af2 block/file-posix: Optimize for macOS
> >
> > When trying to run blkdiscard within a Linux
Markus Armbruster writes:
> Christian Borntraeger writes:
>
>> Am 13.10.21 um 11:07 schrieb Paolo Bonzini:
>>> From: Markus Armbruster
>>> Commit 6287d827d4 "monitor: allow device_del to accept QOM paths"
>>> extended find_device_state() to accept QOM paths in addition to qdev
>>> IDs. This
On 08/10/2021 15:34, Kevin Wolf wrote:
Instead of accessing the global QemuOptsList, which really belong to the
command line parser and shouldn't be accessed from devices, store a
pointer to the QemuOpts in a new VirtIONet field.
This is not the final state, but just an intermediate step to get
24 matches
Mail list logo