[PATCH RFC WIP 0/6] iotests: delinting work-in-progress

John Snow posted 6 patches 3 years, 11 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 failed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200513214130.15375-1-jsnow@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
tests/qemu-iotests/Makefile              |   6 +
tests/qemu-iotests/iotests.py            |  28 ++--
tests/qemu-iotests/nbd-fault-injector.py |  34 +++--
tests/qemu-iotests/pylintrc              |   1 +
tests/qemu-iotests/qcow2.py              | 156 +++++++++++++++--------
tests/qemu-iotests/qed.py                |  46 ++++---
6 files changed, 173 insertions(+), 98 deletions(-)
[PATCH RFC WIP 0/6] iotests: delinting work-in-progress
Posted by John Snow 3 years, 11 months ago
I ran out of time, but I was briefly entertaining the idea of hitting
everything else in the iotests folder with the pylint and mypy beam.

This is just a draft of what I had at the time, in case someone gets
around to it before I do.

I forced all of the python scripts in this directory to Python3 and pass
the formatter check imposed by the pylintrc that we make iotests.py
adhere to, but there's no guarantee these scripts actually work. I was a
little rough around the edges.

qed.py and qcow2.py in particular abuse some python features that pylint
really doesn't like to see at all, and forcing these to pass a pylint
check was clearly fighting against the idioms in-use in those files,
with more than a few unsatisfactory hacks employed just to make pylint
shut up. They are not necessarily improvements to those scripts.

I created a Makefile check to hit the iotests themselves with the pylint
checker so we can identify when refactors to the testing infrastructure
invalidate tests we don't get to run that often; but didn't get around
to improving the quality of the tests themselves.

(Whether or not this is even worth our time is debatable, it depends on
how much effort it would take to bring them up to par. Maybe it's a lot,
I don't know.)

--js

John Snow (6):
  iotests: type hint wip
  Makefile: add delint WIP
  nbd-fault-injector: delint
  qed.py: delint
  qcow2.py: delint
  WIP: delint test files

 tests/qemu-iotests/Makefile              |   6 +
 tests/qemu-iotests/iotests.py            |  28 ++--
 tests/qemu-iotests/nbd-fault-injector.py |  34 +++--
 tests/qemu-iotests/pylintrc              |   1 +
 tests/qemu-iotests/qcow2.py              | 156 +++++++++++++++--------
 tests/qemu-iotests/qed.py                |  46 ++++---
 6 files changed, 173 insertions(+), 98 deletions(-)

-- 
2.21.1


Re: [PATCH RFC WIP 0/6] iotests: delinting work-in-progress
Posted by no-reply@patchew.org 3 years, 11 months ago
Patchew URL: https://patchew.org/QEMU/20200513214130.15375-1-jsnow@redhat.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

Not run: 259
Failures: 031 036 054 061 114
Failed 5 of 118 iotests
make: *** [check-tests/check-block.sh] Error 1
make: *** Waiting for unfinished jobs....
  TEST    check-qtest-aarch64: tests/qtest/qos-test
Traceback (most recent call last):
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=a364a3916b304854887e4b7475175383', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-n73ihxu6/src/docker-src.2020-05-13-23.00.06.31673:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=a364a3916b304854887e4b7475175383
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-n73ihxu6/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    15m47.213s
user    0m5.361s


The full log is available at
http://patchew.org/logs/20200513214130.15375-1-jsnow@redhat.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com