From 3d9a70233968f43082f6588d21173cd4ec6c161b Mon Sep 17 00:00:00 2001 From: Aihua Liang Date: Fri, 25 Aug 2017 14:01:57 +0800 Subject: [PATCH] block_resize:add case for data plane enabled Signed-off-by:Aihua Liang --- qemu/tests/block_resize.py | 8 +++++++- qemu/tests/cfg/block_resize.cfg | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/qemu/tests/block_resize.py b/qemu/tests/block_resize.py index 83a97b35..67f3154b 100644 --- a/qemu/tests/block_resize.py +++ b/qemu/tests/block_resize.py @@ -73,7 +73,13 @@ def run(test, params, env): drive_path = "" if params.get("os_type") == 'linux': - drive_id = params["blk_extra_params_%s" % data_image].split("=")[1] + pattern = r"(serial|wwn)=(\w+)" + match = re.search(pattern, params["blk_extra_params_%s" + % data_image], re.M) + if match: + drive_id = match.group(2) + else: + test.fail("No available tag to get drive id") drive_path = utils_misc.get_linux_drive_path(session, drive_id) if not drive_path: raise error.TestError("Failed to get '%s' drive path" diff --git a/qemu/tests/cfg/block_resize.cfg b/qemu/tests/cfg/block_resize.cfg index 75907cae..b5597902 100644 --- a/qemu/tests/cfg/block_resize.cfg +++ b/qemu/tests/cfg/block_resize.cfg @@ -59,3 +59,14 @@ disk_change_ratio = 1.5 0.5 RHEL.5: need_reboot = yes + variants: + - @default: + - data_plane: + no Host_RHEL.m6 + only virtio_blk virtio_scsi + iothreads = iothread0 + virtio_blk: + blk_extra_params_stg += ",iothread=${iothreads}" + virtio_scsi: + no Host_RHEL.m7.u0, Host_RHEL.m7.u1, Host_RHEL.m7.u2 + bus_extra_params_stg = "iothread=${iothreads}" -- GitLab