As we're working towards to have the virt tests separated
from autotest core code, I decided to go and clean a lot
of small problems in the entire virt code base. Explaining
better:
* It's no secret I'm a big fan of using as much help from
static checking as possible
* With that in mind, virt libraries and test code were
written in a relatively careless way with regards to:
* Use of reserved python keywords (id, hash, dir, help,
str, list) and the likes, those make it easy to miss
problems on static checking because even if you did
not connect the variables on your function properly,
the static checker will think you meant to use the
builtin.
* Unused imports
* Unused variables
So I decided to bit the bullet and start fixing as much
code as possible. Granted, these cleanups might bring
problems, but static checking is coming out clean in
most of the files now. Specially difficult cases, as the
extensive use of 'format' and 'help' on libvirt_vm and kvm_vm
there were still not addressed. So I'd like to hear your
opinions about this before they actually get to next.
Lucas Meneghel Rodrigues (16):
virt.http_server: cleanups
virt.installer: cleanups
virt.kvm_vm: cleanups
virt.ovirt: Simplify error message
virt.qemu_io: cleanups
virt.ppm_utils: cleanups
virt.rss_client: cleanups
virt.scheduler: cleanups
virt.step_editor: cleanups and make it independent of autotest
virt.syslog_server: Removed unused import
virt.test_setup: cleanups
virt.utils_misc: cleanups
virt.utils_test: cleanups
virt.virt_vm: cleanups
virt.tests: cleanups
virt.kvm.tests: cleanups
client/tests/kvm/tests/9p.py | 2 +-
client/tests/kvm/tests/balloon_check.py | 4 +-
client/tests/kvm/tests/block_stream.py | 4 +-
client/tests/kvm/tests/cpu_hotplug.py | 6 +-
client/tests/kvm/tests/cpuflags.py | 4 +-
client/tests/kvm/tests/enospc.py | 2 +-
client/tests/kvm/tests/floppy.py | 2 +-
client/tests/kvm/tests/ksm_overcommit.py | 4 +-
client/tests/kvm/tests/nic_bonding.py | 2 +-
client/tests/kvm/tests/nic_hotplug.py | 1 -
client/tests/kvm/tests/pci_hotplug.py | 2 +-
client/tests/kvm/tests/perf_kvm.py | 4 -
client/tests/kvm/tests/performance.py | 16 +-
client/tests/kvm/tests/qmp_basic.py | 8 +-
client/tests/kvm/tests/set_link.py | 4 +-
client/tests/kvm/tests/stepmaker.py | 22 ++-
client/tests/kvm/tests/steps.py | 2 +-
client/tests/kvm/tests/system_reset_bootable.py | 4 +-
client/tests/kvm/tests/time_manage.py | 2 +-
client/tests/kvm/tests/usb.py | 2 +-
client/virt/http_server.py | 20 +--
client/virt/installer.py | 2 +-
client/virt/kvm_vm.py | 17 +--
client/virt/ovirt.py | 3 +-
client/virt/ppm_utils.py | 47 ++++--
client/virt/qemu_io.py | 5 +-
client/virt/rss_client.py | 22 +--
client/virt/scheduler.py | 16 +-
client/virt/step_editor.py | 195 +++++++++++-------------
client/virt/syslog_server.py | 2 +-
client/virt/test_setup.py | 20 +--
client/virt/tests/fail.py | 2 -
client/virt/tests/iofuzz.py | 2 +-
client/virt/tests/jumbo.py | 4 +-
client/virt/tests/module_probe.py | 2 +-
client/virt/tests/netperf.py | 4 +-
client/virt/tests/nicdriver_unload.py | 2 +-
client/virt/tests/ntttcp.py | 14 +-
client/virt/tests/vlan.py | 2 +-
client/virt/tests/whql_submission.py | 2 +-
client/virt/utils_misc.py | 100 ++++++------
client/virt/utils_test.py | 24 +--
client/virt/virt_vm.py | 4 +-
43 files changed, 292 insertions(+), 316 deletions(-)
--
1.7.11.4
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel