* [PATCH 0/3] virt: Assorted bugfixes
@ 2012-04-26 22:03 Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 1/3] Fix wrong reference to image functions Lucas Meneghel Rodrigues
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2012-04-26 22:03 UTC (permalink / raw)
To: autotest; +Cc: kvm
Fixes for a bunch of bugs I've noticed on our internal
test farm.
Lucas Meneghel Rodrigues (3):
Fix wrong reference to image functions
virt.qemu_io: Make QemuIO inherit from object
kvm.tests.qemu_io_blkdebug: Fix up use of python > 2.4 construct
client/tests/kvm/tests/enospc.py | 2 +-
client/tests/kvm/tests/pci_hotplug.py | 4 ++--
client/tests/kvm/tests/physical_resources_check.py | 4 ++--
client/tests/kvm/tests/qemu_img.py | 4 ++--
client/tests/kvm/tests/qemu_io_blkdebug.py | 11 ++++++++---
client/virt/qemu_io.py | 2 +-
6 files changed, 16 insertions(+), 11 deletions(-)
--
1.7.10
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] Fix wrong reference to image functions
2012-04-26 22:03 [PATCH 0/3] virt: Assorted bugfixes Lucas Meneghel Rodrigues
@ 2012-04-26 22:03 ` Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 2/3] virt.qemu_io: Make QemuIO inherit from object Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 3/3] kvm.tests.qemu_io_blkdebug: Fix up use of python > 2.4 construct Lucas Meneghel Rodrigues
2 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2012-04-26 22:03 UTC (permalink / raw)
To: autotest; +Cc: kvm
Now that they were moved to virt_utils.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/tests/enospc.py | 2 +-
client/tests/kvm/tests/pci_hotplug.py | 4 ++--
client/tests/kvm/tests/physical_resources_check.py | 4 ++--
client/tests/kvm/tests/qemu_img.py | 4 ++--
client/tests/kvm/tests/qemu_io_blkdebug.py | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/client/tests/kvm/tests/enospc.py b/client/tests/kvm/tests/enospc.py
index b4740a4..a011091 100644
--- a/client/tests/kvm/tests/enospc.py
+++ b/client/tests/kvm/tests/enospc.py
@@ -145,7 +145,7 @@ def run_enospc(test, params, env):
for image_name in vm.params.objects("images"):
image_params = vm.params.object_params(image_name)
try:
- virt_vm.check_image(image_params, test.bindir)
+ virt_utils.check_image(image_params, test.bindir)
except (virt_vm.VMError, error.TestWarn), e:
logging.error(e)
logging.info("Guest paused, extending Logical Volume size")
diff --git a/client/tests/kvm/tests/pci_hotplug.py b/client/tests/kvm/tests/pci_hotplug.py
index 6908134..4316d51 100644
--- a/client/tests/kvm/tests/pci_hotplug.py
+++ b/client/tests/kvm/tests/pci_hotplug.py
@@ -66,7 +66,7 @@ def run_pci_hotplug(test, params, env):
pci_add_cmd = "pci_add pci_addr=auto nic model=%s" % tested_model
elif test_type == "block":
image_params = params.object_params("stg")
- image_filename = virt_vm.get_image_filename(image_params,
+ image_filename = virt_utils.get_image_filename(image_params,
test.bindir)
pci_add_cmd = ("pci_add pci_addr=auto storage file=%s,if=%s" %
(image_filename, tested_model))
@@ -89,7 +89,7 @@ def run_pci_hotplug(test, params, env):
elif test_type == "block":
image_params = params.object_params("stg")
- image_filename = virt_vm.get_image_filename(image_params,
+ image_filename = virt_utils.get_image_filename(image_params,
test.bindir)
controller_model = None
if tested_model == "virtio":
diff --git a/client/tests/kvm/tests/physical_resources_check.py b/client/tests/kvm/tests/physical_resources_check.py
index 4e0bb72..076139c 100644
--- a/client/tests/kvm/tests/physical_resources_check.py
+++ b/client/tests/kvm/tests/physical_resources_check.py
@@ -1,6 +1,6 @@
import re, string, logging
from autotest.client.shared import error
-from autotest.client.virt import kvm_monitor, virt_vm
+from autotest.client.virt import kvm_monitor, virt_utils
def run_physical_resources_check(test, params, env):
@@ -98,7 +98,7 @@ def run_physical_resources_check(test, params, env):
n_fail = []
# We will check HDs with the image name
- image_name = virt_vm.get_image_filename(params, test.bindir)
+ image_name = virt_utils.get_image_filename(params, test.bindir)
# Check cpu count
logging.info("CPU count check")
diff --git a/client/tests/kvm/tests/qemu_img.py b/client/tests/kvm/tests/qemu_img.py
index 47ae20f..bf108bc 100644
--- a/client/tests/kvm/tests/qemu_img.py
+++ b/client/tests/kvm/tests/qemu_img.py
@@ -18,7 +18,7 @@ def run_qemu_img(test, params, env):
raise error.TestError("Binary of 'qemu-img' not found")
image_format = params.get("image_format")
image_size = params.get("image_size", "10G")
- image_name = virt_vm.get_image_filename(params, test.bindir)
+ image_name = virt_utils.get_image_filename(params, test.bindir)
def _check(cmd, img):
@@ -402,7 +402,7 @@ def run_qemu_img(test, params, env):
sn_fmt = params.get("snapshot_format", "qcow2")
sn1 = params.get("image_name_snapshot1")
sn1 = virt_utils.get_path(test.bindir, sn1) + ".%s" % sn_fmt
- base_img = virt_vm.get_image_filename(params, test.bindir)
+ base_img = virt_utils.get_image_filename(params, test.bindir)
_create(cmd, sn1, sn_fmt, base_img=base_img, base_img_fmt=image_format)
# Create snapshot2 based on snapshot1
diff --git a/client/tests/kvm/tests/qemu_io_blkdebug.py b/client/tests/kvm/tests/qemu_io_blkdebug.py
index 01830e3..b838225 100644
--- a/client/tests/kvm/tests/qemu_io_blkdebug.py
+++ b/client/tests/kvm/tests/qemu_io_blkdebug.py
@@ -32,7 +32,7 @@ def run_qemu_io_blkdebug(test, params, env):
blkdebug_default = params.get("blkdebug_default")
error.context("Create image", logging.info)
- image_name = virt_vm.create_image(params.object_params(image), test.bindir)
+ image_name = virt_utils.create_image(params.object_params(image), test.bindir)
template_name = virt_utils.get_path(test.virtdir, blkdebug_default)
template = ConfigParser.ConfigParser()
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] virt.qemu_io: Make QemuIO inherit from object
2012-04-26 22:03 [PATCH 0/3] virt: Assorted bugfixes Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 1/3] Fix wrong reference to image functions Lucas Meneghel Rodrigues
@ 2012-04-26 22:03 ` Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 3/3] kvm.tests.qemu_io_blkdebug: Fix up use of python > 2.4 construct Lucas Meneghel Rodrigues
2 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2012-04-26 22:03 UTC (permalink / raw)
To: autotest; +Cc: kvm
Constructs like
MyClass():
Without explicit inheritance are not allowed on py 2.4.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/virt/qemu_io.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/virt/qemu_io.py b/client/virt/qemu_io.py
index 8f56f4d..7c0b10a 100644
--- a/client/virt/qemu_io.py
+++ b/client/virt/qemu_io.py
@@ -12,7 +12,7 @@ class QemuIOParamError(Exception):
pass
-class QemuIO():
+class QemuIO(object):
"""
A class for execute qemu-io command
"""
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] kvm.tests.qemu_io_blkdebug: Fix up use of python > 2.4 construct
2012-04-26 22:03 [PATCH 0/3] virt: Assorted bugfixes Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 1/3] Fix wrong reference to image functions Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 2/3] virt.qemu_io: Make QemuIO inherit from object Lucas Meneghel Rodrigues
@ 2012-04-26 22:03 ` Lucas Meneghel Rodrigues
2 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2012-04-26 22:03 UTC (permalink / raw)
To: autotest; +Cc: kvm
Replace it with a larger, more boring, but nevertheless,
working python 2.4 implementation.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/tests/qemu_io_blkdebug.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/client/tests/kvm/tests/qemu_io_blkdebug.py b/client/tests/kvm/tests/qemu_io_blkdebug.py
index b838225..6a057f4 100644
--- a/client/tests/kvm/tests/qemu_io_blkdebug.py
+++ b/client/tests/kvm/tests/qemu_io_blkdebug.py
@@ -45,9 +45,14 @@ def run_qemu_io_blkdebug(test, params, env):
template.set("inject-error", "event", '"%s"' % err_event)
template.set("inject-error", "errno", '"%s"' % errn)
- with open(blkdebug_cfg, 'w') as blkdebug:
+ error.context("Write blkdebug config file", logging.info)
+ blkdebug = None
+ try:
+ blkdebug = open(blkdebug_cfg, 'w')
template.write(blkdebug)
- blkdebug.close()
+ finally:
+ if blkdebug is not None:
+ blkdebug.close()
error.context("Operate in qemu-io to trigger the error", logging.info)
session = qemu_io.QemuIOShellSession(test, params, image_name,
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-26 22:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 22:03 [PATCH 0/3] virt: Assorted bugfixes Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 1/3] Fix wrong reference to image functions Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 2/3] virt.qemu_io: Make QemuIO inherit from object Lucas Meneghel Rodrigues
2012-04-26 22:03 ` [PATCH 3/3] kvm.tests.qemu_io_blkdebug: Fix up use of python > 2.4 construct Lucas Meneghel Rodrigues
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.