From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527695961958811.8981977694931; Wed, 30 May 2018 08:59:21 -0700 (PDT) Received: from localhost ([::1]:39320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3VR-0000az-0l for importer@patchew.org; Wed, 30 May 2018 11:59:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3T6-0007VZ-T7 for qemu-devel@nongnu.org; Wed, 30 May 2018 11:56:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3T6-0006pr-1A for qemu-devel@nongnu.org; Wed, 30 May 2018 11:56:56 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58848 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T2-0006o7-A3; Wed, 30 May 2018 11:56:52 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA9E4818BAED; Wed, 30 May 2018 15:56:51 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27FE383B6C; Wed, 30 May 2018 15:56:51 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:31 +0200 Message-Id: <20180530155647.14090-2-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:51 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 01/17] qcow2: Fix Coverity warning when calculating the refcount cache size X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Alberto Garcia MIN_REFCOUNT_CACHE_SIZE is 4 and the cluster size is guaranteed to be at most 2MB, so the minimum refcount cache size (in bytes) is always going to fit in a 32-bit integer. Coverity doesn't know that, and since we're storing the result in a uint64_t (*refcount_cache_size) it thinks that we need the 64 bits and that we probably want to do a 64-bit multiplication to prevent the result from being truncated. This is a false positive in this case, but it's a fair warning. We could do a 64-bit multiplication to get rid of it, but since we know that a 32-bit variable is enough to store this value let's simply reuse min_refcount_cache, make it a normal int and stop doing casts. Reported-by: Peter Maydell Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/qcow2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6d532470a8..a007dc4246 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -768,6 +768,7 @@ static void read_cache_sizes(BlockDriverState *bs, Qemu= Opts *opts, BDRVQcow2State *s =3D bs->opaque; uint64_t combined_cache_size; bool l2_cache_size_set, refcount_cache_size_set, combined_cache_size_s= et; + int min_refcount_cache =3D MIN_REFCOUNT_CACHE_SIZE * s->cluster_size; =20 combined_cache_size_set =3D qemu_opt_get(opts, QCOW2_OPT_CACHE_SIZE); l2_cache_size_set =3D qemu_opt_get(opts, QCOW2_OPT_L2_CACHE_SIZE); @@ -804,8 +805,6 @@ static void read_cache_sizes(BlockDriverState *bs, Qemu= Opts *opts, } else { uint64_t virtual_disk_size =3D bs->total_sectors * BDRV_SECTOR= _SIZE; uint64_t max_l2_cache =3D virtual_disk_size / (s->cluster_size= / 8); - uint64_t min_refcount_cache =3D - (uint64_t) MIN_REFCOUNT_CACHE_SIZE * s->cluster_size; =20 /* Assign as much memory as possible to the L2 cache, and * use the remainder for the refcount cache */ @@ -825,7 +824,7 @@ static void read_cache_sizes(BlockDriverState *bs, Qemu= Opts *opts, * s->cluster_size); } if (!refcount_cache_size_set) { - *refcount_cache_size =3D MIN_REFCOUNT_CACHE_SIZE * s->cluster_= size; + *refcount_cache_size =3D min_refcount_cache; } } =20 --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 152769596105925.941041269575067; Wed, 30 May 2018 08:59:21 -0700 (PDT) Received: from localhost ([::1]:39319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3VG-0000TY-3T for importer@patchew.org; Wed, 30 May 2018 11:59:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3T6-0007VC-EK for qemu-devel@nongnu.org; Wed, 30 May 2018 11:56:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3T5-0006pb-R0 for qemu-devel@nongnu.org; Wed, 30 May 2018 11:56:56 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58850 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T3-0006oS-6p; Wed, 30 May 2018 11:56:53 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B38B4818BAED; Wed, 30 May 2018 15:56:52 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1172683B62; Wed, 30 May 2018 15:56:51 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:32 +0200 Message-Id: <20180530155647.14090-3-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:52 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 02/17] vdi: Fix vdi_co_do_create() return value X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" .bdrv_co_create() is supposed to return 0 on success, but vdi could return a positive value instead. Fix this. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- block/vdi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vdi.c b/block/vdi.c index 96a22b8e83..668af0a828 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -865,6 +865,7 @@ static int coroutine_fn vdi_co_do_create(BlockdevCreate= Options *create_options, } } =20 + ret =3D 0; exit: blk_unref(blk); bdrv_unref(bs_file); --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696149521809.2225623234566; Wed, 30 May 2018 09:02:29 -0700 (PDT) Received: from localhost ([::1]:39347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3YR-00030L-SW for importer@patchew.org; Wed, 30 May 2018 12:02:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3T6-0007VQ-OG for qemu-devel@nongnu.org; Wed, 30 May 2018 11:56:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3T6-0006px-2X for qemu-devel@nongnu.org; Wed, 30 May 2018 11:56:56 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58854 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T4-0006oh-4p; Wed, 30 May 2018 11:56:54 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9DA16818BAED; Wed, 30 May 2018 15:56:53 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE69683B6C; Wed, 30 May 2018 15:56:52 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:33 +0200 Message-Id: <20180530155647.14090-4-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:53 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:53 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 03/17] vhdx: Fix vhdx_co_create() return value X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" .bdrv_co_create() is supposed to return 0 on success, but vhdx could return a positive value instead. Fix this. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- block/vhdx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vhdx.c b/block/vhdx.c index 0b1e21c750..b1ba121bb6 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1951,7 +1951,7 @@ static int coroutine_fn vhdx_co_create(BlockdevCreate= Options *opts, goto delete_and_exit; } =20 - + ret =3D 0; delete_and_exit: blk_unref(blk); bdrv_unref(bs); --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696185495503.5967435815072; Wed, 30 May 2018 09:03:05 -0700 (PDT) Received: from localhost ([::1]:39348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3Z2-0003Qt-JU for importer@patchew.org; Wed, 30 May 2018 12:03:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3T9-0007Z5-Mz for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3T8-0006rH-FO for qemu-devel@nongnu.org; Wed, 30 May 2018 11:56:59 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58856 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T4-0006ox-Vv; Wed, 30 May 2018 11:56:55 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 864BD818BAED; Wed, 30 May 2018 15:56:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id D7DB783B71; Wed, 30 May 2018 15:56:53 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:34 +0200 Message-Id: <20180530155647.14090-5-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:54 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:54 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 04/17] job: Add error message for failing jobs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" So far we relied on job->ret and strerror() to produce an error message for failed jobs. Not surprisingly, this tends to result in completely useless messages. This adds a Job.error field that can contain an error string for a failing job, and a parameter to job_completed() that sets the field. As a default, if NULL is passed, we continue to use strerror(job->ret). All existing callers are changed to pass NULL. They can be improved in separate patches. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- include/qemu/job.h | 7 ++++++- block/backup.c | 2 +- block/commit.c | 2 +- block/mirror.c | 2 +- block/stream.c | 2 +- job-qmp.c | 9 ++------- job.c | 16 ++++++++++++++-- tests/test-bdrv-drain.c | 2 +- tests/test-blockjob-txn.c | 2 +- tests/test-blockjob.c | 2 +- 10 files changed, 29 insertions(+), 17 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/job.h index 8c8badf75e..1d820530fa 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -124,6 +124,9 @@ typedef struct Job { /** Estimated progress_current value at the completion of the job */ int64_t progress_total; =20 + /** Error string for a failed job (NULL if, and only if, job->ret =3D= =3D 0) */ + char *error; + /** ret code passed to job_completed. */ int ret; =20 @@ -466,13 +469,15 @@ void job_transition_to_ready(Job *job); /** * @job: The job being completed. * @ret: The status code. + * @error: The error message for a failing job (only with @ret < 0). If @r= et is + * negative, but NULL is given for @error, strerror() is used. * * Marks @job as completed. If @ret is non-zero, the job transaction it is= part * of is aborted. If @ret is zero, the job moves into the WAITING state. I= f it * is the last job to complete in its transaction, all jobs in the transac= tion * move from WAITING to PENDING. */ -void job_completed(Job *job, int ret); +void job_completed(Job *job, int ret, Error *error); =20 /** Asynchronously complete the specified @job. */ void job_complete(Job *job, Error **errp); diff --git a/block/backup.c b/block/backup.c index 4e228e959b..5661435675 100644 --- a/block/backup.c +++ b/block/backup.c @@ -321,7 +321,7 @@ static void backup_complete(Job *job, void *opaque) { BackupCompleteData *data =3D opaque; =20 - job_completed(job, data->ret); + job_completed(job, data->ret, NULL); g_free(data); } =20 diff --git a/block/commit.c b/block/commit.c index 620666161b..e1814d9693 100644 --- a/block/commit.c +++ b/block/commit.c @@ -117,7 +117,7 @@ static void commit_complete(Job *job, void *opaque) * bdrv_set_backing_hd() to fail. */ block_job_remove_all_bdrv(bjob); =20 - job_completed(job, ret); + job_completed(job, ret, NULL); g_free(data); =20 /* If bdrv_drop_intermediate() didn't already do that, remove the comm= it diff --git a/block/mirror.c b/block/mirror.c index dcb66ec3be..435268bbbf 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -581,7 +581,7 @@ static void mirror_exit(Job *job, void *opaque) blk_set_perm(bjob->blk, 0, BLK_PERM_ALL, &error_abort); blk_insert_bs(bjob->blk, mirror_top_bs, &error_abort); =20 - job_completed(job, data->ret); + job_completed(job, data->ret, NULL); =20 g_free(data); bdrv_drained_end(src); diff --git a/block/stream.c b/block/stream.c index a5d6e0cf8a..9264b68a1e 100644 --- a/block/stream.c +++ b/block/stream.c @@ -93,7 +93,7 @@ out: } =20 g_free(s->backing_file_str); - job_completed(job, data->ret); + job_completed(job, data->ret, NULL); g_free(data); } =20 diff --git a/job-qmp.c b/job-qmp.c index 7f38f63336..410775df61 100644 --- a/job-qmp.c +++ b/job-qmp.c @@ -136,14 +136,9 @@ void qmp_job_dismiss(const char *id, Error **errp) static JobInfo *job_query_single(Job *job, Error **errp) { JobInfo *info; - const char *errmsg =3D NULL; =20 assert(!job_is_internal(job)); =20 - if (job->ret < 0) { - errmsg =3D strerror(-job->ret); - } - info =3D g_new(JobInfo, 1); *info =3D (JobInfo) { .id =3D g_strdup(job->id), @@ -151,8 +146,8 @@ static JobInfo *job_query_single(Job *job, Error **errp) .status =3D job->status, .current_progress =3D job->progress_current, .total_progress =3D job->progress_total, - .has_error =3D !!errmsg, - .error =3D g_strdup(errmsg), + .has_error =3D !!job->error, + .error =3D g_strdup(job->error), }; =20 return info; diff --git a/job.c b/job.c index f026661b0f..84e140238b 100644 --- a/job.c +++ b/job.c @@ -369,6 +369,7 @@ void job_unref(Job *job) =20 QLIST_REMOVE(job, job_list); =20 + g_free(job->error); g_free(job->id); g_free(job); } @@ -660,6 +661,9 @@ static void job_update_rc(Job *job) job->ret =3D -ECANCELED; } if (job->ret) { + if (!job->error) { + job->error =3D g_strdup(strerror(-job->ret)); + } job_state_transition(job, JOB_STATUS_ABORTING); } } @@ -782,6 +786,7 @@ static int job_prepare(Job *job) { if (job->ret =3D=3D 0 && job->driver->prepare) { job->ret =3D job->driver->prepare(job); + job_update_rc(job); } return job->ret; } @@ -855,10 +860,17 @@ static void job_completed_txn_success(Job *job) } } =20 -void job_completed(Job *job, int ret) +void job_completed(Job *job, int ret, Error *error) { assert(job && job->txn && !job_is_completed(job)); + job->ret =3D ret; + if (error) { + assert(job->ret < 0); + job->error =3D g_strdup(error_get_pretty(error)); + error_free(error); + } + job_update_rc(job); trace_job_completed(job, ret, job->ret); if (job->ret) { @@ -876,7 +888,7 @@ void job_cancel(Job *job, bool force) } job_cancel_async(job, force); if (!job_started(job)) { - job_completed(job, -ECANCELED); + job_completed(job, -ECANCELED, NULL); } else if (job->deferred_to_main_loop) { job_completed_txn_abort(job); } else { diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 2cba63b881..a11c4cfbf2 100644 --- a/tests/test-bdrv-drain.c +++ b/tests/test-bdrv-drain.c @@ -498,7 +498,7 @@ typedef struct TestBlockJob { =20 static void test_job_completed(Job *job, void *opaque) { - job_completed(job, 0); + job_completed(job, 0, NULL); } =20 static void coroutine_fn test_job_start(void *opaque) diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c index fce836639a..58d9b87fb2 100644 --- a/tests/test-blockjob-txn.c +++ b/tests/test-blockjob-txn.c @@ -34,7 +34,7 @@ static void test_block_job_complete(Job *job, void *opaqu= e) rc =3D -ECANCELED; } =20 - job_completed(job, rc); + job_completed(job, rc, NULL); bdrv_unref(bs); } =20 diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c index e408d52351..cb42f06e61 100644 --- a/tests/test-blockjob.c +++ b/tests/test-blockjob.c @@ -167,7 +167,7 @@ static void cancel_job_completed(Job *job, void *opaque) { CancelJob *s =3D opaque; s->completed =3D true; - job_completed(job, 0); + job_completed(job, 0, NULL); } =20 static void cancel_job_complete(Job *job, Error **errp) --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696466142577.3393751974446; Wed, 30 May 2018 09:07:46 -0700 (PDT) Received: from localhost ([::1]:39405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3dW-0006w2-7P for importer@patchew.org; Wed, 30 May 2018 12:07:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3T9-0007ZX-Ug for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3T8-0006rg-Sl for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50240 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T5-0006pW-UF; Wed, 30 May 2018 11:56:56 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F073BB424; Wed, 30 May 2018 15:56:55 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id C100383B6C; Wed, 30 May 2018 15:56:54 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:35 +0200 Message-Id: <20180530155647.14090-6-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 30 May 2018 15:56:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 30 May 2018 15:56:55 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 05/17] block/create: Make x-blockdev-create a job X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This changes the x-blockdev-create QMP command so that it doesn't block the monitor and the main loop any more, but starts a background job that performs the image creation. The basic job as implemented here is all that is necessary to make image creation asynchronous and to provide a QMP interface that can be marked stable, but it still lacks a few features that jobs usually provide: The job will ignore pause commands and it doesn't publish more than very basic progress yet (total-progress is 1 and current-progress advances from 0 to 1 when the driver callbacks returns). These features can be added later without breaking compatibility. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- qapi/block-core.json | 14 ++++++---- qapi/job.json | 4 ++- block/create.c | 67 +++++++++++++++++++++++++++++++++-----------= ---- tests/qemu-iotests/group | 14 +++++----- 4 files changed, 66 insertions(+), 33 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index ad66ad6f80..eb98596614 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -4013,14 +4013,18 @@ ## # @x-blockdev-create: # -# Create an image format on a given node. -# TODO Replace with something asynchronous (block job?) +# Starts a job to create an image format on a given node. The job is +# automatically finalized, but a manual job-dismiss is required. # -# Since: 2.12 +# @job-id: Identifier for the newly created job. +# +# @options: Options for the image creation. +# +# Since: 3.0 ## { 'command': 'x-blockdev-create', - 'data': 'BlockdevCreateOptions', - 'boxed': true } + 'data': { 'job-id': 'str', + 'options': 'BlockdevCreateOptions' } } =20 ## # @blockdev-open-tray: diff --git a/qapi/job.json b/qapi/job.json index 970124de76..69c1970a58 100644 --- a/qapi/job.json +++ b/qapi/job.json @@ -17,10 +17,12 @@ # # @backup: drive backup job type, see "drive-backup" # +# @create: image creation job type, see "x-blockdev-create" (since 3.0) +# # Since: 1.7 ## { 'enum': 'JobType', - 'data': ['commit', 'stream', 'mirror', 'backup'] } + 'data': ['commit', 'stream', 'mirror', 'backup', 'create'] } =20 ## # @JobStatus: diff --git a/block/create.c b/block/create.c index 8bd8a03719..1a263e4b13 100644 --- a/block/create.c +++ b/block/create.c @@ -24,28 +24,51 @@ =20 #include "qemu/osdep.h" #include "block/block_int.h" +#include "qemu/job.h" #include "qapi/qapi-commands-block-core.h" +#include "qapi/qapi-visit-block-core.h" +#include "qapi/clone-visitor.h" #include "qapi/error.h" =20 -typedef struct BlockdevCreateCo { +typedef struct BlockdevCreateJob { + Job common; BlockDriver *drv; BlockdevCreateOptions *opts; int ret; - Error **errp; -} BlockdevCreateCo; + Error *err; +} BlockdevCreateJob; =20 -static void coroutine_fn bdrv_co_create_co_entry(void *opaque) +static void blockdev_create_complete(Job *job, void *opaque) { - BlockdevCreateCo *cco =3D opaque; - cco->ret =3D cco->drv->bdrv_co_create(cco->opts, cco->errp); + BlockdevCreateJob *s =3D container_of(job, BlockdevCreateJob, common); + + job_completed(job, s->ret, s->err); } =20 -void qmp_x_blockdev_create(BlockdevCreateOptions *options, Error **errp) +static void coroutine_fn blockdev_create_run(void *opaque) { + BlockdevCreateJob *s =3D opaque; + + job_progress_set_remaining(&s->common, 1); + s->ret =3D s->drv->bdrv_co_create(s->opts, &s->err); + job_progress_update(&s->common, 1); + + qapi_free_BlockdevCreateOptions(s->opts); + job_defer_to_main_loop(&s->common, blockdev_create_complete, NULL); +} + +static const JobDriver blockdev_create_job_driver =3D { + .instance_size =3D sizeof(BlockdevCreateJob), + .job_type =3D JOB_TYPE_CREATE, + .start =3D blockdev_create_run, +}; + +void qmp_x_blockdev_create(const char *job_id, BlockdevCreateOptions *opti= ons, + Error **errp) +{ + BlockdevCreateJob *s; const char *fmt =3D BlockdevDriver_str(options->driver); BlockDriver *drv =3D bdrv_find_format(fmt); - Coroutine *co; - BlockdevCreateCo cco; =20 /* If the driver is in the schema, we know that it exists. But it may = not * be whitelisted. */ @@ -55,22 +78,24 @@ void qmp_x_blockdev_create(BlockdevCreateOptions *optio= ns, Error **errp) return; } =20 - /* Call callback if it exists */ + /* Error out if the driver doesn't support .bdrv_co_create */ if (!drv->bdrv_co_create) { error_setg(errp, "Driver does not support blockdev-create"); return; } =20 - cco =3D (BlockdevCreateCo) { - .drv =3D drv, - .opts =3D options, - .ret =3D -EINPROGRESS, - .errp =3D errp, - }; - - co =3D qemu_coroutine_create(bdrv_co_create_co_entry, &cco); - qemu_coroutine_enter(co); - while (cco.ret =3D=3D -EINPROGRESS) { - aio_poll(qemu_get_aio_context(), true); + /* Create the block job */ + /* TODO Running in the main context. Block drivers need to error out o= r add + * locking when they use a BDS in a different AioContext. */ + s =3D job_create(job_id, &blockdev_create_job_driver, NULL, + qemu_get_aio_context(), JOB_DEFAULT | JOB_MANUAL_DISMIS= S, + NULL, NULL, errp); + if (!s) { + return; } + + s->drv =3D drv, + s->opts =3D QAPI_CLONE(BlockdevCreateOptions, options), + + job_start(&s->common); } diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index 93f93d71ba..22b0082db3 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -204,14 +204,16 @@ 203 rw auto migration 204 rw auto quick 205 rw auto quick -206 rw auto -207 rw auto +# TODO The following commented out tests need to be reworked to work +# with the x-blockdev-create job +#206 rw auto +#207 rw auto 208 rw auto quick 209 rw auto quick -210 rw auto -211 rw auto quick -212 rw auto quick -213 rw auto quick +#210 rw auto +#211 rw auto quick +#212 rw auto quick +#213 rw auto quick 214 rw auto 215 rw auto quick 216 rw auto quick --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527695975327805.6149236289834; Wed, 30 May 2018 08:59:35 -0700 (PDT) Received: from localhost ([::1]:39321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3Vd-0000jt-Sm for importer@patchew.org; Wed, 30 May 2018 11:59:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3T9-0007Yl-G3 for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3T8-0006rb-RN for qemu-devel@nongnu.org; Wed, 30 May 2018 11:56:59 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59172 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T6-0006qB-SG; Wed, 30 May 2018 11:56:56 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 579D54187E40; Wed, 30 May 2018 15:56:56 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id A9DB683B6C; Wed, 30 May 2018 15:56:55 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:36 +0200 Message-Id: <20180530155647.14090-7-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 30 May 2018 15:56:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 30 May 2018 15:56:56 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 06/17] qemu-iotests: Add VM.get_qmp_events_filtered() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This adds a helper function that returns a list of QMP events that are already filtered through filter_qmp_event(). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- tests/qemu-iotests/iotests.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 28159d837a..17aa7c88dc 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -383,6 +383,11 @@ class VM(qtest.QEMUQtestMachine): output_list +=3D [key + '=3D' + obj[key]] return ','.join(output_list) =20 + def get_qmp_events_filtered(self, wait=3DTrue): + result =3D [] + for ev in self.get_qmp_events(wait=3Dwait): + result.append(filter_qmp_event(ev)) + return result =20 =20 index_re =3D re.compile(r'([^\[]+)\[([^\]]+)\]') --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696525717790.0922175997589; Wed, 30 May 2018 09:08:45 -0700 (PDT) Received: from localhost ([::1]:39421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3eW-0007n1-Qn for importer@patchew.org; Wed, 30 May 2018 12:08:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TA-0007aE-Fp for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3T9-0006s8-Nd for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59174 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T7-0006qs-Nr; Wed, 30 May 2018 11:56:57 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3F5E64187E40; Wed, 30 May 2018 15:56:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9295383B6C; Wed, 30 May 2018 15:56:56 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:37 +0200 Message-Id: <20180530155647.14090-8-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 30 May 2018 15:56:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 30 May 2018 15:56:57 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 07/17] qemu-iotests: Add VM.qmp_log() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This adds a helper function that logs both the QMP request and the received response before returning it. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 17aa7c88dc..2f54823db6 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -206,6 +206,10 @@ def filter_qmp_event(event): event['timestamp']['microseconds'] =3D 'USECS' return event =20 +def filter_testfiles(msg): + prefix =3D os.path.join(test_dir, "%s-" % (os.getpid())) + return msg.replace(prefix, 'TEST_DIR/PID-') + def log(msg, filters=3D[]): for flt in filters: msg =3D flt(msg) @@ -389,6 +393,13 @@ class VM(qtest.QEMUQtestMachine): result.append(filter_qmp_event(ev)) return result =20 + def qmp_log(self, cmd, filters=3D[filter_testfiles], **kwargs): + logmsg =3D "{'execute': '%s', 'arguments': %s}" % (cmd, kwargs) + log(logmsg, filters) + result =3D self.qmp(cmd, **kwargs) + log(str(result), filters) + return result + =20 index_re =3D re.compile(r'([^\[]+)\[([^\]]+)\]') =20 --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696632019439.82324606174075; Wed, 30 May 2018 09:10:32 -0700 (PDT) Received: from localhost ([::1]:39440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3gF-00012d-7H for importer@patchew.org; Wed, 30 May 2018 12:10:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TD-0007df-6p for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TA-0006sk-Nx for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:03 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50246 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T8-0006rE-K8; Wed, 30 May 2018 11:56:58 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 280D2BB424; Wed, 30 May 2018 15:56:58 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A9E183B71; Wed, 30 May 2018 15:56:57 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:38 +0200 Message-Id: <20180530155647.14090-9-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 30 May 2018 15:56:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 30 May 2018 15:56:58 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 08/17] qemu-iotests: Add iotests.img_info_log() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This adds a filter function to postprocess 'qemu-img info' input (similar to what _img_info does), and an img_info_log() function that calls 'qemu-img info' and logs the filtered output. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- tests/qemu-iotests/iotests.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 2f54823db6..edcd2bb701 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -109,6 +109,12 @@ def qemu_img_pipe(*args): sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode,= ' '.join(qemu_img_args + list(args)))) return subp.communicate()[0] =20 +def img_info_log(filename, filter_path=3DNone): + output =3D qemu_img_pipe('info', '-f', imgfmt, filename) + if not filter_path: + filter_path =3D filename + log(filter_img_info(output, filter_path)) + def qemu_io(*args): '''Run qemu-io and return the stdout data''' args =3D qemu_io_args + list(args) @@ -210,6 +216,18 @@ def filter_testfiles(msg): prefix =3D os.path.join(test_dir, "%s-" % (os.getpid())) return msg.replace(prefix, 'TEST_DIR/PID-') =20 +def filter_img_info(output, filename): + lines =3D [] + for line in output.split('\n'): + if 'disk size' in line or 'actual-size' in line: + continue + line =3D line.replace(filename, 'TEST_IMG') \ + .replace(imgfmt, 'IMGFMT') + line =3D re.sub('iters: [0-9]+', 'iters: XXX', line) + line =3D re.sub('uuid: [-a-f0-9]+', 'uuid: XXXXXXXX-XXXX-XXXX-XXXX= -XXXXXXXXXXXX', line) + lines.append(line) + return '\n'.join(lines) + def log(msg, filters=3D[]): for flt in filters: msg =3D flt(msg) --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696743871259.58337997174783; Wed, 30 May 2018 09:12:23 -0700 (PDT) Received: from localhost ([::1]:39470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3hz-0002Ux-Sm for importer@patchew.org; Wed, 30 May 2018 12:12:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TE-0007eq-5R for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TD-0006ta-Dl for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:04 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58864 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3T9-0006rm-HJ; Wed, 30 May 2018 11:56:59 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0F1A4818BAED; Wed, 30 May 2018 15:56:59 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 624577D55C; Wed, 30 May 2018 15:56:58 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:39 +0200 Message-Id: <20180530155647.14090-10-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:56:59 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 09/17] qemu-iotests: Add VM.run_job() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add an iotests.py function that runs a job and only returns when it is destroyed. An error is logged when the job failed and job-finalize and job-dismiss commands are issued if necessary. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- tests/qemu-iotests/iotests.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index edcd2bb701..8b612cb891 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -418,6 +418,25 @@ class VM(qtest.QEMUQtestMachine): log(str(result), filters) return result =20 + def run_job(self, job, auto_finalize=3DTrue, auto_dismiss=3DFalse): + while True: + for ev in self.get_qmp_events_filtered(wait=3DTrue): + if ev['event'] =3D=3D 'JOB_STATUS_CHANGE': + status =3D ev['data']['status'] + if status =3D=3D 'aborting': + result =3D self.qmp('query-jobs') + for j in result['return']: + if j['id'] =3D=3D job: + log('Job failed: %s' % (j['error'])) + elif status =3D=3D 'pending' and not auto_finalize: + self.qmp_log('job-finalize', id=3Djob) + elif status =3D=3D 'concluded' and not auto_dismiss: + self.qmp_log('job-dismiss', id=3Djob) + elif status =3D=3D 'null': + return + else: + iotests.log(ev) + =20 index_re =3D re.compile(r'([^\[]+)\[([^\]]+)\]') =20 --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696667053583.0373639861892; Wed, 30 May 2018 09:11:07 -0700 (PDT) Received: from localhost ([::1]:39461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3go-0001cH-9c for importer@patchew.org; Wed, 30 May 2018 12:11:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TF-0007fy-4Y for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TE-0006u4-Bg for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:05 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59198 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3TA-0006sM-DC; Wed, 30 May 2018 11:57:00 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EAB227A7F6; Wed, 30 May 2018 15:56:59 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 49FC27D55C; Wed, 30 May 2018 15:56:59 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:40 +0200 Message-Id: <20180530155647.14090-11-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 30 May 2018 15:56:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 30 May 2018 15:56:59 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 10/17] qemu-iotests: iotests.py helper for non-file protocols X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This adds two helper functions that are useful for test cases that make use of a non-file protocol (specifically ssh). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- tests/qemu-iotests/iotests.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 8b612cb891..bc8f404ac2 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -303,6 +303,13 @@ def file_path(*names): =20 return paths[0] if len(paths) =3D=3D 1 else paths =20 +def remote_filename(path): + if imgproto =3D=3D 'file': + return path + elif imgproto =3D=3D 'ssh': + return "ssh://127.0.0.1%s" % (path) + else: + raise Exception("Protocol %s not supported" % (imgproto)) =20 class VM(qtest.QEMUQtestMachine): '''A QEMU VM''' @@ -601,6 +608,16 @@ def verify_image_format(supported_fmts=3D[], unsupport= ed_fmts=3D[]): if not_sup or (imgfmt in unsupported_fmts): notrun('not suitable for this image format: %s' % imgfmt) =20 +def verify_protocol(supported=3D[], unsupported=3D[]): + assert not (supported and unsupported) + + if 'generic' in supported: + return + + not_sup =3D supported and (imgproto not in supported) + if not_sup or (imgproto in unsupported): + notrun('not suitable for this protocol: %s' % imgproto) + def verify_platform(supported_oses=3D['linux']): if True not in [sys.platform.startswith(x) for x in supported_oses]: notrun('not suitable for this OS: %s' % sys.platform) --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696875301497.68495760665246; Wed, 30 May 2018 09:14:35 -0700 (PDT) Received: from localhost ([::1]:39484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3kA-00040k-Ec for importer@patchew.org; Wed, 30 May 2018 12:14:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TM-0007m2-N2 for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TJ-0006vw-7C for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:12 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58866 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3TB-0006sw-FB; Wed, 30 May 2018 11:57:01 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F2D1E818BAED; Wed, 30 May 2018 15:57:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31AD083B71; Wed, 30 May 2018 15:57:00 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:41 +0200 Message-Id: <20180530155647.14090-12-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:57:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:57:01 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 11/17] qemu-iotests: Rewrite 206 for blockdev-create job X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This rewrites the test case 206 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/206 | 680 ++++++++++++++++++-----------------------= ---- tests/qemu-iotests/206.out | 253 ++++++++++------- tests/qemu-iotests/group | 2 +- 3 files changed, 414 insertions(+), 521 deletions(-) diff --git a/tests/qemu-iotests/206 b/tests/qemu-iotests/206 index 0a18b2b19a..b8cf2e7dca 100755 --- a/tests/qemu-iotests/206 +++ b/tests/qemu-iotests/206 @@ -1,9 +1,11 @@ -#!/bin/bash +#!/usr/bin/env python # # Test qcow2 and file image creation # # Copyright (C) 2018 Red Hat, Inc. # +# Creator/Owner: Kevin Wolf +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -18,419 +20,263 @@ # along with this program. If not, see . # =20 -# creator -owner=3Dkwolf@redhat.com - -seq=3D`basename $0` -echo "QA output created by $seq" - -here=3D`pwd` -status=3D1 # failure is the default! - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_supported_fmt qcow2 -_supported_proto file -_supported_os Linux - -function do_run_qemu() -{ - echo Testing: "$@" - $QEMU -nographic -qmp stdio -serial none "$@" - echo -} - -function run_qemu() -{ - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ - | _filter_qemu | _filter_imgfmt \ - | _filter_actual_image_size -} - -echo -echo "=3D=3D=3D Successful image creation (defaults) =3D=3D=3D" -echo - -size=3D$((128 * 1024 * 1024)) - -run_qemu < Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696191806914.9111711747349; Wed, 30 May 2018 09:03:11 -0700 (PDT) Received: from localhost ([::1]:39350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3Z8-0003Uw-Nn for importer@patchew.org; Wed, 30 May 2018 12:03:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TK-0007kj-0J for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TH-0006vR-Po for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:10 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59204 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3TC-0006tD-Lb; Wed, 30 May 2018 11:57:02 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B6F27C6B1; Wed, 30 May 2018 15:57:02 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E0B383B6C; Wed, 30 May 2018 15:57:01 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:42 +0200 Message-Id: <20180530155647.14090-13-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 30 May 2018 15:57:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 30 May 2018 15:57:02 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 12/17] qemu-iotests: Rewrite 207 for blockdev-create job X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This rewrites the test case 207 to work with the new x-blockdev-create job rather than the old synchronous version of the command. Most of the test cases stay the same as before (the exception being some improved 'size' options that allow distinguishing which command created the image), but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/207 | 440 ++++++++++++++++++++---------------------= ---- tests/qemu-iotests/207.out | 107 +++++------ tests/qemu-iotests/group | 6 +- 3 files changed, 257 insertions(+), 296 deletions(-) diff --git a/tests/qemu-iotests/207 b/tests/qemu-iotests/207 index f5c77852d1..b595c925a5 100755 --- a/tests/qemu-iotests/207 +++ b/tests/qemu-iotests/207 @@ -1,9 +1,11 @@ -#!/bin/bash +#!/usr/bin/env python # # Test ssh image creation # # Copyright (C) 2018 Red Hat, Inc. # +# Creator/Owner: Kevin Wolf +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -18,244 +20,198 @@ # along with this program. If not, see . # =20 -# creator -owner=3Dkwolf@redhat.com - -seq=3D`basename $0` -echo "QA output created by $seq" - -here=3D`pwd` -status=3D1 # failure is the default! - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_supported_fmt raw -_supported_proto ssh -_supported_os Linux - -function do_run_qemu() -{ - echo Testing: "$@" - $QEMU -nographic -qmp stdio -serial none "$@" - echo -} - -function run_qemu() -{ - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ - | _filter_qemu | _filter_imgfmt \ - | _filter_actual_image_size -} - -echo -echo "=3D=3D=3D Successful image creation (defaults) =3D=3D=3D" -echo - -run_qemu </dev/null | grep -v "\\^#" | - cut -d" " -f3 | base64 -d | md5sum -b | cut -d" " -f1) - -run_qemu </dev/null | grep -v "\\^#" | - cut -d" " -f3 | base64 -d | sha1sum -b | cut -d" " -f1) - -run_qemu </dev/null | grep -v "\\^#" | ' + + 'cut -d" " -f3 | base64 -d | md5sum -b | cut -d" " -f1', + shell=3DTrue).rstrip() + + vm.launch() + blockdev_create(vm, { 'driver': 'ssh', + 'location': { + 'path': disk_path, + 'server': { + 'host': '127.0.0.1', + 'port': '22' + }, + 'host-key-check': { + 'mode': 'hash', + 'type': 'md5', + 'hash': 'wrong', + } + }, + 'size': 2097152 }) + blockdev_create(vm, { 'driver': 'ssh', + 'location': { + 'path': disk_path, + 'server': { + 'host': '127.0.0.1', + 'port': '22' + }, + 'host-key-check': { + 'mode': 'hash', + 'type': 'md5', + 'hash': md5_key, + } + }, + 'size': 8388608 }) + vm.shutdown() + + iotests.img_info_log(remote_path, filter_path=3Ddisk_path) + + sha1_key =3D subprocess.check_output( + 'ssh-keyscan -t rsa 127.0.0.1 2>/dev/null | grep -v "\\^#" | ' + + 'cut -d" " -f3 | base64 -d | sha1sum -b | cut -d" " -f1', + shell=3DTrue).rstrip() + + vm.launch() + blockdev_create(vm, { 'driver': 'ssh', + 'location': { + 'path': disk_path, + 'server': { + 'host': '127.0.0.1', + 'port': '22' + }, + 'host-key-check': { + 'mode': 'hash', + 'type': 'sha1', + 'hash': 'wrong', + } + }, + 'size': 2097152 }) + blockdev_create(vm, { 'driver': 'ssh', + 'location': { + 'path': disk_path, + 'server': { + 'host': '127.0.0.1', + 'port': '22' + }, + 'host-key-check': { + 'mode': 'hash', + 'type': 'sha1', + 'hash': sha1_key, + } + }, + 'size': 4194304 }) + vm.shutdown() + + iotests.img_info_log(remote_path, filter_path=3Ddisk_path) + + # + # Invalid path and user + # + iotests.log("=3D=3D=3D Invalid path and user =3D=3D=3D") + iotests.log("") + + vm.launch() + blockdev_create(vm, { 'driver': 'ssh', + 'location': { + 'path': '/this/is/not/an/existing/path', + 'server': { + 'host': '127.0.0.1', + 'port': '22' + }, + 'host-key-check': { + 'mode': 'none' + } + }, + 'size': 4194304 }) + blockdev_create(vm, { 'driver': 'ssh', + 'location': { + 'path': disk_path, + 'user': 'invalid user', + 'server': { + 'host': '127.0.0.1', + 'port': '22' + }, + 'host-key-check': { + 'mode': 'none' + } + }, + 'size': 4194304 }) + vm.shutdown() diff --git a/tests/qemu-iotests/207.out b/tests/qemu-iotests/207.out index 417deee970..5eee17bdb9 100644 --- a/tests/qemu-iotests/207.out +++ b/tests/qemu-iotests/207.out @@ -1,75 +1,80 @@ -QA output created by 207 - =3D=3D=3D Successful image creation (defaults) =3D=3D=3D =20 -Testing: -QMP_VERSION -{"return": {}} -{"return": {}} -{"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'server': {'= host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} +{u'return': {}} +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} =20 -image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}} +image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_IMG"}} file format: IMGFMT virtual size: 4.0M (4194304 bytes) =20 -image: TEST_DIR/t.IMGFMT + +image: TEST_IMG file format: IMGFMT virtual size: 4.0M (4194304 bytes) =20 =3D=3D=3D Test host-key-check options =3D=3D=3D =20 -Testing: -QMP_VERSION -{"return": {}} -{"return": {}} -{"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'si= ze': 8388608}}} +{u'return': {}} +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} =20 -image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}} +image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_IMG"}} file format: IMGFMT virtual size: 8.0M (8388608 bytes) -Testing: -QMP_VERSION -{"return": {}} -{"return": {}} -{"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} - -image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}} + +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'mode': 'known_hosts'}, 'server': {'host': '127.0.0.1', 'port': '22'= }}, 'size': 4194304}}} +{u'return': {}} +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} + +image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_IMG"}} file format: IMGFMT virtual size: 4.0M (4194304 bytes) -Testing: -QMP_VERSION -{"return": {}} -{"error": {"class": "GenericError", "desc": "remote host key does not matc= h host_key_check 'wrong'"}} -{"return": {}} -{"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} - -image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}} + +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'hash': 'wrong', 'type': 'md5', 'mode': 'hash'}, 'server': {'host': = '127.0.0.1', 'port': '22'}}, 'size': 2097152}}} +{u'return': {}} +Job failed: remote host key does not match host_key_check 'wrong' +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} + +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'hash': HASH, 'type': 'md5', 'mode': 'hash'}, 'server': {'host': '12= 7.0.0.1', 'port': '22'}}, 'size': 8388608}}} +{u'return': {}} +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} + +image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_IMG"}} file format: IMGFMT virtual size: 8.0M (8388608 bytes) -Testing: -QMP_VERSION -{"return": {}} -{"error": {"class": "GenericError", "desc": "remote host key does not matc= h host_key_check 'wrong'"}} -{"return": {}} -{"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} - -image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}} + +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'hash': 'wrong', 'type': 'sha1', 'mode': 'hash'}, 'server': {'host':= '127.0.0.1', 'port': '22'}}, 'size': 2097152}}} +{u'return': {}} +Job failed: remote host key does not match host_key_check 'wrong' +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} + +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'hash': HASH, 'type': 'sha1', 'mode': 'hash'}, 'server': {'host': '1= 27.0.0.1', 'port': '22'}}, 'size': 4194304}}} +{u'return': {}} +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} + +image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "ser= ver.port": "22", "driver": "ssh", "path": "TEST_IMG"}} file format: IMGFMT virtual size: 4.0M (4194304 bytes) =20 =3D=3D=3D Invalid path and user =3D=3D=3D =20 -Testing: -QMP_VERSION -{"return": {}} -{"error": {"class": "GenericError", "desc": "failed to open remote file '/= this/is/not/an/existing/path': Failed opening remote file (libssh2 error co= de: -31)"}} -{"error": {"class": "GenericError", "desc": "failed to authenticate using = publickey authentication and the identities held by your ssh-agent"}} -{"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': '/this/is/not/an/existing/path', '= host-key-check': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': = '22'}}, 'size': 4194304}}} +{u'return': {}} +Job failed: failed to open remote file '/this/is/not/an/existing/path': Fa= iled opening remote file (libssh2 error code: -31) +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} + +{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'mode': 'none'}, 'user': 'invalid user', 'server': {'host': '127.0.0= .1', 'port': '22'}}, 'size': 4194304}}} +{u'return': {}} +Job failed: failed to authenticate using publickey authentication and the = identities held by your ssh-agent +{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} +{u'return': {}} =20 -*** done diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index be157e7679..8a84bf057d 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -205,11 +205,11 @@ 204 rw auto quick 205 rw auto quick 206 rw auto -# TODO The following commented out tests need to be reworked to work -# with the x-blockdev-create job -#207 rw auto +207 rw auto 208 rw auto quick 209 rw auto quick +# TODO The following commented out tests need to be reworked to work +# with the x-blockdev-create job #210 rw auto #211 rw auto quick #212 rw auto quick --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527695979447616.0338556675664; Wed, 30 May 2018 08:59:39 -0700 (PDT) Received: from localhost ([::1]:39322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3Vh-0000lo-CB for importer@patchew.org; Wed, 30 May 2018 11:59:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TP-0007ok-07 for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TL-0006wz-RF for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:15 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58870 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3TD-0006tP-HQ; Wed, 30 May 2018 11:57:03 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 141C8818BAFC; Wed, 30 May 2018 15:57:03 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6690383B6C; Wed, 30 May 2018 15:57:02 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:43 +0200 Message-Id: <20180530155647.14090-14-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:57:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:57:03 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 13/17] qemu-iotests: Rewrite 210 for blockdev-create job X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This rewrites the test case 210 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- tests/qemu-iotests/210 | 393 ++++++++++++++++++--------------------= ---- tests/qemu-iotests/210.out | 197 ++++++++++++++------- tests/qemu-iotests/group | 2 +- tests/qemu-iotests/iotests.py | 12 +- 4 files changed, 314 insertions(+), 290 deletions(-) diff --git a/tests/qemu-iotests/210 b/tests/qemu-iotests/210 index e607c0d296..ff4fddea56 100755 --- a/tests/qemu-iotests/210 +++ b/tests/qemu-iotests/210 @@ -1,9 +1,11 @@ -#!/bin/bash +#!/usr/bin/env python # # Test luks and file image creation # # Copyright (C) 2018 Red Hat, Inc. # +# Creator/Owner: Kevin Wolf +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -18,230 +20,165 @@ # along with this program. If not, see . # =20 -# creator -owner=3Dkwolf@redhat.com - -seq=3D`basename $0` -echo "QA output created by $seq" - -here=3D`pwd` -status=3D1 # failure is the default! - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_supported_fmt luks -_supported_proto file -_supported_os Linux - -function do_run_qemu() -{ - echo Testing: "$@" - $QEMU -nographic -qmp stdio -serial none "$@" - echo -} - -function run_qemu() -{ - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ - | _filter_qemu | _filter_imgfmt \ - | _filter_actual_image_size -} - -echo -echo "=3D=3D=3D Successful image creation (defaults) =3D=3D=3D" -echo - -size=3D$((128 * 1024 * 1024)) - -run_qemu -object secret,id=3Dkeysec0,data=3D"foo" <0= size"}} -{"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} - -image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "T= EST_DIR/t.IMGFMT"}, "key-secret": "keysec0"} +{'execute': 'block_resize', 'arguments': {'size': 9223372036854775296, 'no= de_name': 'node1'}} +{u'error': {u'class': u'GenericError', u'desc': u'The requested file size = is too large'}} +{'execute': 'block_resize', 'arguments': {'size': 9223372036854775808L, 'n= ode_name': 'node1'}} +{u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter type f= or 'size', expected: integer"}} +{'execute': 'block_resize', 'arguments': {'size': 18446744073709551104L, '= node_name': 'node1'}} +{u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter type f= or 'size', expected: integer"}} +{'execute': 'block_resize', 'arguments': {'size': -9223372036854775808, 'n= ode_name': 'node1'}} +{u'error': {u'class': u'GenericError', u'desc': u"Parameter 'size' expects= a >0 size"}} +image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "T= EST_IMG"}, "key-secret": "keysec0"} file format: IMGFMT virtual size: 0 (0 bytes) -*** done +encrypted: yes +Format specific information: + ivgen alg: plain64 + hash alg: sha256 + cipher alg: aes-256 + uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + cipher mode: xts + slots: + [0]: + active: true + iters: XXX + key offset: 4096 + stripes: 4000 + [1]: + active: false + key offset: 262144 + [2]: + active: false + key offset: 520192 + [3]: + active: false + key offset: 778240 + [4]: + active: false + key offset: 1036288 + [5]: + active: false + key offset: 1294336 + [6]: + active: false + key offset: 1552384 + [7]: + active: false + key offset: 1810432 + payload offset: 2068480 + master key iters: XXX + diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index 8a84bf057d..a1d04ce367 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -208,9 +208,9 @@ 207 rw auto 208 rw auto quick 209 rw auto quick +210 rw auto # TODO The following commented out tests need to be reworked to work # with the x-blockdev-create job -#210 rw auto #211 rw auto quick #212 rw auto quick #213 rw auto quick diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index bc8f404ac2..fdbdd8b300 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -109,8 +109,16 @@ def qemu_img_pipe(*args): sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode,= ' '.join(qemu_img_args + list(args)))) return subp.communicate()[0] =20 -def img_info_log(filename, filter_path=3DNone): - output =3D qemu_img_pipe('info', '-f', imgfmt, filename) +def img_info_log(filename, filter_path=3DNone, imgopts=3DFalse, extra_args= =3D[]): + args =3D [ 'info' ] + if imgopts: + args.append('--image-opts') + else: + args +=3D [ '-f', imgfmt ] + args +=3D extra_args + args.append(filename) + + output =3D qemu_img_pipe(*args) if not filter_path: filter_path =3D filename log(filter_img_info(output, filter_path)) --=20 2.13.6 From nobody Thu Dec 18 17:47:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696391217547.7208432967824; Wed, 30 May 2018 09:06:31 -0700 (PDT) Received: from localhost ([::1]:39391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3cM-000628-8c for importer@patchew.org; Wed, 30 May 2018 12:06:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TM-0007ld-9X for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TJ-0006w3-Db for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:12 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59208 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3TE-0006tv-EK; Wed, 30 May 2018 11:57:04 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F089C7C6B1; Wed, 30 May 2018 15:57:03 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F23B83B6C; Wed, 30 May 2018 15:57:03 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:44 +0200 Message-Id: <20180530155647.14090-15-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 30 May 2018 15:57:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 30 May 2018 15:57:03 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 14/17] qemu-iotests: Rewrite 211 for blockdev-create job X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This rewrites the test case 211 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/211 | 381 ++++++++++++++++++-----------------------= ---- tests/qemu-iotests/211.out | 133 +++++++++------- tests/qemu-iotests/group | 2 +- 3 files changed, 229 insertions(+), 287 deletions(-) diff --git a/tests/qemu-iotests/211 b/tests/qemu-iotests/211 index 1edec26517..b45f886d23 100755 --- a/tests/qemu-iotests/211 +++ b/tests/qemu-iotests/211 @@ -1,9 +1,11 @@ -#!/bin/bash +#!/usr/bin/env python # # Test VDI and file image creation # # Copyright (C) 2018 Red Hat, Inc. # +# Creator/Owner: Kevin Wolf +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -18,229 +20,154 @@ # along with this program. If not, see . # =20 -# creator -owner=3Dkwolf@redhat.com - -seq=3D`basename $0` -echo "QA output created by $seq" - -here=3D`pwd` -status=3D1 # failure is the default! - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_supported_fmt vdi -_supported_proto file -_supported_os Linux - -function do_run_qemu() -{ - echo Testing: "$@" - $QEMU -nographic -qmp stdio -serial none "$@" - echo -} - -function run_qemu() -{ - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ - | _filter_qemu | _filter_imgfmt \ - | _filter_actual_image_size -} - -echo -echo "=3D=3D=3D Successful image creation (defaults) =3D=3D=3D" -echo - -size=3D$((128 * 1024 * 1024)) - -run_qemu < Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696990357592.0795099490575; Wed, 30 May 2018 09:16:30 -0700 (PDT) Received: from localhost ([::1]:39499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3m1-0005LH-AF for importer@patchew.org; Wed, 30 May 2018 12:16:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TO-0007oj-Tp for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TM-0006x8-08 for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:14 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58872 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3TF-0006ue-PA; Wed, 30 May 2018 11:57:05 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54312805A530; Wed, 30 May 2018 15:57:05 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3914583B71; Wed, 30 May 2018 15:57:04 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:45 +0200 Message-Id: <20180530155647.14090-16-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:57:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:57:05 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 15/17] qemu-iotests: Rewrite 212 for blockdev-create job X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This rewrites the test case 212 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/212 | 483 +++++++++++++++++------------------------= ---- tests/qemu-iotests/212.out | 191 +++++++++++------- tests/qemu-iotests/group | 2 +- 3 files changed, 295 insertions(+), 381 deletions(-) diff --git a/tests/qemu-iotests/212 b/tests/qemu-iotests/212 index e5a1ba77ce..03cf41d133 100755 --- a/tests/qemu-iotests/212 +++ b/tests/qemu-iotests/212 @@ -1,9 +1,11 @@ -#!/bin/bash +#!/usr/bin/env python # # Test parallels and file image creation # # Copyright (C) 2018 Red Hat, Inc. # +# Creator/Owner: Kevin Wolf +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -18,309 +20,176 @@ # along with this program. If not, see . # =20 -# creator -owner=3Dkwolf@redhat.com - -seq=3D`basename $0` -echo "QA output created by $seq" - -here=3D`pwd` -status=3D1 # failure is the default! - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_supported_fmt parallels -_supported_proto file -_supported_os Linux - -function do_run_qemu() -{ - echo Testing: "$@" - $QEMU -nographic -qmp stdio -serial none "$@" - echo -} - -function run_qemu() -{ - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ - | _filter_qemu | _filter_imgfmt \ - | _filter_actual_image_size -} - -echo -echo "=3D=3D=3D Successful image creation (defaults) =3D=3D=3D" -echo - -size=3D$((128 * 1024 * 1024)) - -run_qemu < Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696189421956.0000275728421; Wed, 30 May 2018 09:03:09 -0700 (PDT) Received: from localhost ([::1]:39349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3Z6-0003SL-H6 for importer@patchew.org; Wed, 30 May 2018 12:03:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3TQ-0007or-A6 for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TN-0006xZ-Ac for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:16 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58874 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3TG-0006uz-Ry; Wed, 30 May 2018 11:57:06 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B32C805A530; Wed, 30 May 2018 15:57:06 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8ED3583B6C; Wed, 30 May 2018 15:57:05 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:46 +0200 Message-Id: <20180530155647.14090-17-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:57:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 30 May 2018 15:57:06 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 16/17] qemu-iotests: Rewrite 213 for blockdev-create job X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This rewrites the test case 213 to work with the new x-blockdev-create job rather than the old synchronous version of the command. All of the test cases stay the same as before, but in order to be able to implement proper job handling, the test case is rewritten in Python. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/213 | 520 +++++++++++++++++------------------------= ---- tests/qemu-iotests/213.out | 208 +++++++++++------- tests/qemu-iotests/group | 4 +- 3 files changed, 319 insertions(+), 413 deletions(-) diff --git a/tests/qemu-iotests/213 b/tests/qemu-iotests/213 index 3a00a0f6d6..29d25bcee1 100755 --- a/tests/qemu-iotests/213 +++ b/tests/qemu-iotests/213 @@ -1,9 +1,11 @@ -#!/bin/bash +#!/usr/bin/env python # # Test vhdx and file image creation # # Copyright (C) 2018 Red Hat, Inc. # +# Creator/Owner: Kevin Wolf +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -18,332 +20,190 @@ # along with this program. If not, see . # =20 -# creator -owner=3Dkwolf@redhat.com - -seq=3D`basename $0` -echo "QA output created by $seq" - -here=3D`pwd` -status=3D1 # failure is the default! - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_supported_fmt vhdx -_supported_proto file -_supported_os Linux - -function do_run_qemu() -{ - echo Testing: "$@" - $QEMU -nographic -qmp stdio -serial none "$@" - echo -} - -function run_qemu() -{ - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \ - | _filter_qemu | _filter_imgfmt \ - | _filter_actual_image_size -} - -echo -echo "=3D=3D=3D Successful image creation (defaults) =3D=3D=3D" -echo - -size=3D$((128 * 1024 * 1024)) - -run_qemu < Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527696838898135.95610275787442; Wed, 30 May 2018 09:13:58 -0700 (PDT) Received: from localhost ([::1]:39483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3jZ-0003er-VV for importer@patchew.org; Wed, 30 May 2018 12:13:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO3Ta-0007zk-3Z for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO3TU-00072E-OW for qemu-devel@nongnu.org; Wed, 30 May 2018 11:57:26 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59178 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO3TH-0006vO-Sw; Wed, 30 May 2018 11:57:08 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 659174187E40; Wed, 30 May 2018 15:57:07 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96BA483B6C; Wed, 30 May 2018 15:57:06 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 30 May 2018 17:56:47 +0200 Message-Id: <20180530155647.14090-18-kwolf@redhat.com> In-Reply-To: <20180530155647.14090-1-kwolf@redhat.com> References: <20180530155647.14090-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 30 May 2018 15:57:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 30 May 2018 15:57:07 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 17/17] block/create: Mark blockdev-create stable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We're ready to declare the blockdev-create job stable. This renames the corresponding QMP command from x-blockdev-create to blockdev-create. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Jeff Cody --- qapi/block-core.json | 4 ++-- qapi/job.json | 2 +- block/create.c | 4 ++-- tests/qemu-iotests/206 | 2 +- tests/qemu-iotests/206.out | 54 +++++++++++++++++++++++-------------------= ---- tests/qemu-iotests/207 | 2 +- tests/qemu-iotests/207.out | 18 ++++++++-------- tests/qemu-iotests/210 | 2 +- tests/qemu-iotests/210.out | 18 ++++++++-------- tests/qemu-iotests/211 | 2 +- tests/qemu-iotests/211.out | 24 ++++++++++----------- tests/qemu-iotests/212 | 2 +- tests/qemu-iotests/212.out | 42 ++++++++++++++++++------------------ tests/qemu-iotests/213 | 2 +- tests/qemu-iotests/213.out | 44 ++++++++++++++++++------------------- 15 files changed, 111 insertions(+), 111 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index eb98596614..4b1de474a9 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -4011,7 +4011,7 @@ } } =20 ## -# @x-blockdev-create: +# @blockdev-create: # # Starts a job to create an image format on a given node. The job is # automatically finalized, but a manual job-dismiss is required. @@ -4022,7 +4022,7 @@ # # Since: 3.0 ## -{ 'command': 'x-blockdev-create', +{ 'command': 'blockdev-create', 'data': { 'job-id': 'str', 'options': 'BlockdevCreateOptions' } } =20 diff --git a/qapi/job.json b/qapi/job.json index 69c1970a58..17d10037c4 100644 --- a/qapi/job.json +++ b/qapi/job.json @@ -17,7 +17,7 @@ # # @backup: drive backup job type, see "drive-backup" # -# @create: image creation job type, see "x-blockdev-create" (since 3.0) +# @create: image creation job type, see "blockdev-create" (since 3.0) # # Since: 1.7 ## diff --git a/block/create.c b/block/create.c index 1a263e4b13..915cd41bcc 100644 --- a/block/create.c +++ b/block/create.c @@ -63,8 +63,8 @@ static const JobDriver blockdev_create_job_driver =3D { .start =3D blockdev_create_run, }; =20 -void qmp_x_blockdev_create(const char *job_id, BlockdevCreateOptions *opti= ons, - Error **errp) +void qmp_blockdev_create(const char *job_id, BlockdevCreateOptions *option= s, + Error **errp) { BlockdevCreateJob *s; const char *fmt =3D BlockdevDriver_str(options->driver); diff --git a/tests/qemu-iotests/206 b/tests/qemu-iotests/206 index b8cf2e7dca..128c334c7c 100755 --- a/tests/qemu-iotests/206 +++ b/tests/qemu-iotests/206 @@ -26,7 +26,7 @@ from iotests import imgfmt iotests.verify_image_format(supported_fmts=3D['qcow2']) =20 def blockdev_create(vm, options): - result =3D vm.qmp_log('x-blockdev-create', job_id=3D'job0', options=3D= options) + result =3D vm.qmp_log('blockdev-create', job_id=3D'job0', options=3Dop= tions) =20 if 'return' in result: assert result['return'] =3D=3D {} diff --git a/tests/qemu-iotests/206.out b/tests/qemu-iotests/206.out index 34451a3fc6..789eebe57b 100644 --- a/tests/qemu-iotests/206.out +++ b/tests/qemu-iotests/206.out @@ -1,13 +1,13 @@ =3D=3D=3D Successful image creation (defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 {'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver'= : 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}} {u'return': {}} -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'qcow2', 'file': 'imgfile', 'size': 134217728}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'qcow2', 'file': 'imgfile', 'size': 134217728}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -24,12 +24,12 @@ Format specific information: =20 =3D=3D=3D Successful image creation (inline blockdev-add, explicit default= s) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'nocow': False, 'preallocation': 'off', 'size': 0, 'driver': 'file', 'fi= lename': 'TEST_DIR/PID-t.qcow2'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'nocow': False, 'preallocation': 'off', 'size': 0, 'driver': 'file', 'file= name': 'TEST_DIR/PID-t.qcow2'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 65536, 'refcount-bits': 16, 'version': 'v3', 'preallocat= ion': 'off', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}= , 'lazy-refcounts': False, 'driver': 'qcow2', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 65536, 'refcount-bits': 16, 'version': 'v3', 'preallocatio= n': 'off', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, = 'lazy-refcounts': False, 'driver': 'qcow2', 'size': 67108864}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -46,12 +46,12 @@ Format specific information: =20 =3D=3D=3D Successful image creation (v3 non-default options) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'nocow': True, 'preallocation': 'falloc', 'size': 0, 'driver': 'file', '= filename': 'TEST_DIR/PID-t.qcow2'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'nocow': True, 'preallocation': 'falloc', 'size': 0, 'driver': 'file', 'fi= lename': 'TEST_DIR/PID-t.qcow2'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 2097152, 'refcount-bits': 1, 'version': 'v3', 'prealloca= tion': 'metadata', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.q= cow2'}, 'lazy-refcounts': True, 'driver': 'qcow2', 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 2097152, 'refcount-bits': 1, 'version': 'v3', 'preallocati= on': 'metadata', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qco= w2'}, 'lazy-refcounts': True, 'driver': 'qcow2', 'size': 33554432}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -68,12 +68,12 @@ Format specific information: =20 =3D=3D=3D Successful image creation (v2 non-default options) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 512, 'backing-fmt': 'qcow2', 'driver': 'qcow2', 'version= ': 'v2', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'b= acking-file': 'TEST_DIR/PID-t.qcow2.base', 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 512, 'backing-fmt': 'qcow2', 'driver': 'qcow2', 'version':= 'v2', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'bac= king-file': 'TEST_DIR/PID-t.qcow2.base', 'size': 33554432}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -90,7 +90,7 @@ Format specific information: =20 =3D=3D=3D Successful image creation (encrypted) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'encrypt': {'key-secret': 'keysec0', 'iter-time': 10, 'cipher-mode': 'ct= r', 'ivgen-hash-alg': 'md5', 'cipher-alg': 'twofish-128', 'format': 'luks',= 'ivgen-alg': 'plain64', 'hash-alg': 'sha1'}, 'driver': 'qcow2', 'file': {'= driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'encrypt': {'key-secret': 'keysec0', 'iter-time': 10, 'cipher-mode': 'ctr'= , 'ivgen-hash-alg': 'md5', 'cipher-alg': 'twofish-128', 'format': 'luks', '= ivgen-alg': 'plain64', 'hash-alg': 'sha1'}, 'driver': 'qcow2', 'file': {'dr= iver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'size': 33554432}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -144,111 +144,111 @@ Format specific information: =20 =3D=3D=3D Invalid BlockdevRef =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'qcow2', 'file': "this doesn't exist", 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'qcow2', 'file': "this doesn't exist", 'size': 33554432}}} {u'return': {}} Job failed: Cannot find device=3Dthis doesn't exist nor node_name=3Dthis d= oesn't exist {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 =3D=3D=3D Invalid sizes =3D=3D=3D -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'qcow2', 'file': 'node0', 'size': 1234}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'qcow2', 'file': 'node0', 'size': 1234}}} {u'return': {}} Job failed: Image size must be a multiple of 512 bytes {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'qcow2', 'file': 'node0', 'size': 18446744073709551104L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'qcow2', 'file': 'node0', 'size': 18446744073709551104L}}} {u'return': {}} Job failed: Could not resize image: Image size cannot be negative {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'qcow2', 'file': 'node0', 'size': 9223372036854775808L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'qcow2', 'file': 'node0', 'size': 9223372036854775808L}}} {u'return': {}} Job failed: Could not resize image: Image size cannot be negative {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'qcow2', 'file': 'node0', 'size': 9223372036854775296}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'qcow2', 'file': 'node0', 'size': 9223372036854775296}}} {u'return': {}} Job failed: Could not resize image: Failed to grow the L1 table: File too = large {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 =3D=3D=3D Invalid version =3D=3D=3D -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'version': 'v1', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'version': 'v1', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter 'v1'"}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'lazy-refcounts': True, 'version': 'v2', 'driver': 'qcow2', 'file': 'nod= e0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'lazy-refcounts': True, 'version': 'v2', 'driver': 'qcow2', 'file': 'node0= ', 'size': 67108864}}} {u'return': {}} Job failed: Lazy refcounts only supported with compatibility level 1.1 and= above (use version=3Dv3 or greater) {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'refcount-bits': 8, 'version': 'v2', 'driver': 'qcow2', 'file': 'node0',= 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'refcount-bits': 8, 'version': 'v2', 'driver': 'qcow2', 'file': 'node0', '= size': 67108864}}} {u'return': {}} Job failed: Different refcount widths than 16 bits require compatibility l= evel 1.1 or above (use version=3Dv3 or greater) {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 =3D=3D=3D Invalid backing file options =3D=3D=3D -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'preallocation': 'full', 'driver': 'qcow2', 'backing-file': '/dev/null',= 'file': 'node0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'preallocation': 'full', 'driver': 'qcow2', 'backing-file': '/dev/null', '= file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Backing file and preallocation cannot be used at the same time {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'backing-fmt': 'qcow2', 'driver': 'qcow2', 'file': 'node0', 'size': 6710= 8864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'backing-fmt': 'qcow2', 'driver': 'qcow2', 'file': 'node0', 'size': 671088= 64}}} {u'return': {}} Job failed: Backing format cannot be used without backing file {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 =3D=3D=3D Invalid cluster size =3D=3D=3D -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 1234, 'driver': 'qcow2', 'file': 'node0', 'size': 671088= 64}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 1234, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864= }}} {u'return': {}} Job failed: Cluster size must be a power of two between 512 and 2048k {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 128, 'driver': 'qcow2', 'file': 'node0', 'size': 6710886= 4}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 128, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}= }} {u'return': {}} Job failed: Cluster size must be a power of two between 512 and 2048k {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 4194304, 'driver': 'qcow2', 'file': 'node0', 'size': 671= 08864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 4194304, 'driver': 'qcow2', 'file': 'node0', 'size': 67108= 864}}} {u'return': {}} Job failed: Cluster size must be a power of two between 512 and 2048k {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 0, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}= }} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 0, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Cluster size must be a power of two between 512 and 2048k {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 512, 'driver': 'qcow2', 'file': 'node0', 'size': 2814749= 76710656}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 512, 'driver': 'qcow2', 'file': 'node0', 'size': 281474976= 710656}}} {u'return': {}} Job failed: Could not resize image: Failed to grow the L1 table: File too = large {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 =3D=3D=3D Invalid refcount width =3D=3D=3D -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'refcount-bits': 128, 'driver': 'qcow2', 'file': 'node0', 'size': 671088= 64}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'refcount-bits': 128, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864= }}} {u'return': {}} Job failed: Refcount width must be a power of two and may not exceed 64 bi= ts {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'refcount-bits': 0, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864= }}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'refcount-bits': 0, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Refcount width must be a power of two and may not exceed 64 bi= ts {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'refcount-bits': 7, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864= }}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'refcount-bits': 7, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Refcount width must be a power of two and may not exceed 64 bi= ts {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} diff --git a/tests/qemu-iotests/207 b/tests/qemu-iotests/207 index b595c925a5..444ae233ae 100755 --- a/tests/qemu-iotests/207 +++ b/tests/qemu-iotests/207 @@ -31,7 +31,7 @@ def filter_hash(msg): return re.sub("'hash': '[0-9a-f]+'", "'hash': HASH", msg) =20 def blockdev_create(vm, options): - result =3D vm.qmp_log('x-blockdev-create', job_id=3D'job0', options=3D= options, + result =3D vm.qmp_log('blockdev-create', job_id=3D'job0', options=3Dop= tions, filters=3D[iotests.filter_testfiles, filter_hash]) =20 if 'return' in result: diff --git a/tests/qemu-iotests/207.out b/tests/qemu-iotests/207.out index 5eee17bdb9..078b7e63cb 100644 --- a/tests/qemu-iotests/207.out +++ b/tests/qemu-iotests/207.out @@ -1,6 +1,6 @@ =3D=3D=3D Successful image creation (defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'server': {'= host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'server': {'ho= st': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -16,7 +16,7 @@ virtual size: 4.0M (4194304 bytes) =20 =3D=3D=3D Test host-key-check options =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'si= ze': 8388608}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-chec= k': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size= ': 8388608}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -25,7 +25,7 @@ image: json:{"driver": "IMGFMT", "file": {"server.host": = "127.0.0.1", "server.po file format: IMGFMT virtual size: 8.0M (8388608 bytes) =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'mode': 'known_hosts'}, 'server': {'host': '127.0.0.1', 'port': '22'= }}, 'size': 4194304}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-chec= k': {'mode': 'known_hosts'}, 'server': {'host': '127.0.0.1', 'port': '22'}}= , 'size': 4194304}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -34,13 +34,13 @@ image: json:{"driver": "IMGFMT", "file": {"server.host"= : "127.0.0.1", "server.po file format: IMGFMT virtual size: 4.0M (4194304 bytes) =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'hash': 'wrong', 'type': 'md5', 'mode': 'hash'}, 'server': {'host': = '127.0.0.1', 'port': '22'}}, 'size': 2097152}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-chec= k': {'hash': 'wrong', 'type': 'md5', 'mode': 'hash'}, 'server': {'host': '1= 27.0.0.1', 'port': '22'}}, 'size': 2097152}}} {u'return': {}} Job failed: remote host key does not match host_key_check 'wrong' {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'hash': HASH, 'type': 'md5', 'mode': 'hash'}, 'server': {'host': '12= 7.0.0.1', 'port': '22'}}, 'size': 8388608}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-chec= k': {'hash': HASH, 'type': 'md5', 'mode': 'hash'}, 'server': {'host': '127.= 0.0.1', 'port': '22'}}, 'size': 8388608}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -49,13 +49,13 @@ image: json:{"driver": "IMGFMT", "file": {"server.host"= : "127.0.0.1", "server.po file format: IMGFMT virtual size: 8.0M (8388608 bytes) =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'hash': 'wrong', 'type': 'sha1', 'mode': 'hash'}, 'server': {'host':= '127.0.0.1', 'port': '22'}}, 'size': 2097152}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-chec= k': {'hash': 'wrong', 'type': 'sha1', 'mode': 'hash'}, 'server': {'host': '= 127.0.0.1', 'port': '22'}}, 'size': 2097152}}} {u'return': {}} Job failed: remote host key does not match host_key_check 'wrong' {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'hash': HASH, 'type': 'sha1', 'mode': 'hash'}, 'server': {'host': '1= 27.0.0.1', 'port': '22'}}, 'size': 4194304}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-chec= k': {'hash': HASH, 'type': 'sha1', 'mode': 'hash'}, 'server': {'host': '127= .0.0.1', 'port': '22'}}, 'size': 4194304}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -66,13 +66,13 @@ virtual size: 4.0M (4194304 bytes) =20 =3D=3D=3D Invalid path and user =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': '/this/is/not/an/existing/path', '= host-key-check': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': = '22'}}, 'size': 4194304}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': '/this/is/not/an/existing/path', 'ho= st-key-check': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': '2= 2'}}, 'size': 4194304}}} {u'return': {}} Job failed: failed to open remote file '/this/is/not/an/existing/path': Fa= iled opening remote file (libssh2 error code: -31) {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-ch= eck': {'mode': 'none'}, 'user': 'invalid user', 'server': {'host': '127.0.0= .1', 'port': '22'}}, 'size': 4194304}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-chec= k': {'mode': 'none'}, 'user': 'invalid user', 'server': {'host': '127.0.0.1= ', 'port': '22'}}, 'size': 4194304}}} {u'return': {}} Job failed: failed to authenticate using publickey authentication and the = identities held by your ssh-agent {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} diff --git a/tests/qemu-iotests/210 b/tests/qemu-iotests/210 index ff4fddea56..d142841e2b 100755 --- a/tests/qemu-iotests/210 +++ b/tests/qemu-iotests/210 @@ -27,7 +27,7 @@ iotests.verify_image_format(supported_fmts=3D['luks']) iotests.verify_protocol(supported=3D['file']) =20 def blockdev_create(vm, options): - result =3D vm.qmp_log('x-blockdev-create', job_id=3D'job0', options=3D= options) + result =3D vm.qmp_log('blockdev-create', job_id=3D'job0', options=3Dop= tions) =20 if 'return' in result: assert result['return'] =3D=3D {} diff --git a/tests/qemu-iotests/210.out b/tests/qemu-iotests/210.out index 0e6e5c07be..078ba544a1 100644 --- a/tests/qemu-iotests/210.out +++ b/tests/qemu-iotests/210.out @@ -1,13 +1,13 @@ =3D=3D=3D Successful image creation (defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 {'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver'= : 'file', 'filename': 'TEST_DIR/PID-t.luks'}} {u'return': {}} -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'img= file', 'size': 134217728}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'imgfi= le', 'size': 134217728}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -54,12 +54,12 @@ Format specific information: =20 =3D=3D=3D Successful image creation (with non-default options) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'key-secret': 'keysec0', 'hash-alg': 'sha1', 'cipher-mode': 'ctr', 'ciph= er-alg': 'twofish-128', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PI= D-t.luks'}, 'iter-time': 10, 'ivgen-alg': 'plain64', 'ivgen-hash-alg': 'md5= ', 'driver': 'luks', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'key-secret': 'keysec0', 'hash-alg': 'sha1', 'cipher-mode': 'ctr', 'cipher= -alg': 'twofish-128', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-= t.luks'}, 'iter-time': 10, 'ivgen-alg': 'plain64', 'ivgen-hash-alg': 'md5',= 'driver': 'luks', 'size': 67108864}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -106,7 +106,7 @@ Format specific information: =20 =3D=3D=3D Invalid BlockdevRef =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'luks', 'file': "this doesn't exist", 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'luks', 'file': "this doesn't exist", 'size': 67108864}}} {u'return': {}} Job failed: Cannot find device=3Dthis doesn't exist nor node_name=3Dthis d= oesn't exist {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} @@ -114,7 +114,7 @@ Job failed: Cannot find device=3Dthis doesn't exist nor= node_name=3Dthis doesn't exi =20 =3D=3D=3D Zero size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'nod= e0', 'size': 0}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'node0= ', 'size': 0}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -161,19 +161,19 @@ Format specific information: =20 =3D=3D=3D Invalid sizes =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 1844= 6744073709551104L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 184467= 44073709551104L}}} {u'return': {}} Job failed: The requested file size is too large {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 9223= 372036854775808L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 922337= 2036854775808L}}} {u'return': {}} Job failed: The requested file size is too large {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 9223= 372036854775296}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 922337= 2036854775296}}} {u'return': {}} Job failed: The requested file size is too large {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} diff --git a/tests/qemu-iotests/211 b/tests/qemu-iotests/211 index b45f886d23..7b7985db6c 100755 --- a/tests/qemu-iotests/211 +++ b/tests/qemu-iotests/211 @@ -27,7 +27,7 @@ iotests.verify_image_format(supported_fmts=3D['vdi']) iotests.verify_protocol(supported=3D['file']) =20 def blockdev_create(vm, options): - result =3D vm.qmp_log('x-blockdev-create', job_id=3D'job0', options=3D= options) + result =3D vm.qmp_log('blockdev-create', job_id=3D'job0', options=3Dop= tions) =20 if 'return' in result: assert result['return'] =3D=3D {} diff --git a/tests/qemu-iotests/211.out b/tests/qemu-iotests/211.out index 2bf1c4a920..6feaea3978 100644 --- a/tests/qemu-iotests/211.out +++ b/tests/qemu-iotests/211.out @@ -1,13 +1,13 @@ =3D=3D=3D Successful image creation (defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 {'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver'= : 'file', 'filename': 'TEST_DIR/PID-t.vdi'}} {u'return': {}} -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vdi', 'file': 'imgfile', 'size': 134217728}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vdi', 'file': 'imgfile', 'size': 134217728}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -21,12 +21,12 @@ cluster_size: 1048576 =20 =3D=3D=3D Successful image creation (explicit defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'preallocation': 'off', 'driver': 'vdi', 'file': {'driver': 'file', 'fil= ename': 'TEST_DIR/PID-t.vdi'}, 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'preallocation': 'off', 'driver': 'vdi', 'file': {'driver': 'file', 'filen= ame': 'TEST_DIR/PID-t.vdi'}, 'size': 67108864}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -40,12 +40,12 @@ cluster_size: 1048576 =20 =3D=3D=3D Successful image creation (with non-default options) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'preallocation': 'metadata', 'driver': 'vdi', 'file': {'driver': 'file',= 'filename': 'TEST_DIR/PID-t.vdi'}, 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'preallocation': 'metadata', 'driver': 'vdi', 'file': {'driver': 'file', '= filename': 'TEST_DIR/PID-t.vdi'}, 'size': 33554432}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -60,7 +60,7 @@ cluster_size: 1048576 =20 =3D=3D=3D Invalid BlockdevRef =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vdi', 'file': "this doesn't exist", 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vdi', 'file': "this doesn't exist", 'size': 33554432}}} {u'return': {}} Job failed: Cannot find device=3Dthis doesn't exist nor node_name=3Dthis d= oesn't exist {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} @@ -68,7 +68,7 @@ Job failed: Cannot find device=3Dthis doesn't exist nor n= ode_name=3Dthis doesn't exi =20 =3D=3D=3D Zero size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vdi', 'file': 'node0', 'size': 0}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vdi', 'file': 'node0', 'size': 0}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -80,7 +80,7 @@ cluster_size: 1048576 =20 =3D=3D=3D Maximum size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vdi', 'file': 'node0', 'size': 562949819203584}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vdi', 'file': 'node0', 'size': 562949819203584}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -92,19 +92,19 @@ cluster_size: 1048576 =20 =3D=3D=3D Invalid sizes =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vdi', 'file': 'node0', 'size': 18446744073709551104L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vdi', 'file': 'node0', 'size': 18446744073709551104L}}} {u'return': {}} Job failed: Unsupported VDI image size (size is 0xfffffffffffffe00, max su= pported is 0x1fffff8000000) {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vdi', 'file': 'node0', 'size': 9223372036854775808L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vdi', 'file': 'node0', 'size': 9223372036854775808L}}} {u'return': {}} Job failed: Unsupported VDI image size (size is 0x8000000000000000, max su= pported is 0x1fffff8000000) {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vdi', 'file': 'node0', 'size': 562949819203585}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vdi', 'file': 'node0', 'size': 562949819203585}}} {u'return': {}} Job failed: Unsupported VDI image size (size is 0x1fffff8000001, max suppo= rted is 0x1fffff8000000) {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} diff --git a/tests/qemu-iotests/212 b/tests/qemu-iotests/212 index 03cf41d133..95c8810d83 100755 --- a/tests/qemu-iotests/212 +++ b/tests/qemu-iotests/212 @@ -27,7 +27,7 @@ iotests.verify_image_format(supported_fmts=3D['parallels'= ]) iotests.verify_protocol(supported=3D['file']) =20 def blockdev_create(vm, options): - result =3D vm.qmp_log('x-blockdev-create', job_id=3D'job0', options=3D= options) + result =3D vm.qmp_log('blockdev-create', job_id=3D'job0', options=3Dop= tions) =20 if 'return' in result: assert result['return'] =3D=3D {} diff --git a/tests/qemu-iotests/212.out b/tests/qemu-iotests/212.out index 780bc30112..9150da7a2c 100644 --- a/tests/qemu-iotests/212.out +++ b/tests/qemu-iotests/212.out @@ -1,13 +1,13 @@ =3D=3D=3D Successful image creation (defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 {'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver'= : 'file', 'filename': 'TEST_DIR/PID-t.parallels'}} {u'return': {}} -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': 'imgfile', 'size': 134217728}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': 'imgfile', 'size': 134217728}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -18,12 +18,12 @@ virtual size: 128M (134217728 bytes) =20 =3D=3D=3D Successful image creation (explicit defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 1048576, 'driver': 'parallels', 'file': {'driver': 'file= ', 'filename': 'TEST_DIR/PID-t.parallels'}, 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 1048576, 'driver': 'parallels', 'file': {'driver': 'file',= 'filename': 'TEST_DIR/PID-t.parallels'}, 'size': 67108864}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -34,12 +34,12 @@ virtual size: 64M (67108864 bytes) =20 =3D=3D=3D Successful image creation (with non-default options) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 65536, 'driver': 'parallels', 'file': {'driver': 'file',= 'filename': 'TEST_DIR/PID-t.parallels'}, 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 65536, 'driver': 'parallels', 'file': {'driver': 'file', '= filename': 'TEST_DIR/PID-t.parallels'}, 'size': 33554432}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -50,7 +50,7 @@ virtual size: 32M (33554432 bytes) =20 =3D=3D=3D Invalid BlockdevRef =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': "this doesn't exist", 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': "this doesn't exist", 'size': 33554432}}} {u'return': {}} Job failed: Cannot find device=3Dthis doesn't exist nor node_name=3Dthis d= oesn't exist {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} @@ -58,7 +58,7 @@ Job failed: Cannot find device=3Dthis doesn't exist nor n= ode_name=3Dthis doesn't exi =20 =3D=3D=3D Zero size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': 'node0', 'size': 0}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': 'node0', 'size': 0}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -69,7 +69,7 @@ virtual size: 0 (0 bytes) =20 =3D=3D=3D Maximum size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': 'node0', 'size': 4503599627369984}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': 'node0', 'size': 4503599627369984}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -80,31 +80,31 @@ virtual size: 4096T (4503599627369984 bytes) =20 =3D=3D=3D Invalid sizes =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': 'node0', 'size': 1234}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': 'node0', 'size': 1234}}} {u'return': {}} Job failed: Image size must be a multiple of 512 bytes {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': 'node0', 'size': 18446744073709551104L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': 'node0', 'size': 18446744073709551104L}}} {u'return': {}} Job failed: Image size is too large for this cluster size {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': 'node0', 'size': 9223372036854775808L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': 'node0', 'size': 9223372036854775808L}}} {u'return': {}} Job failed: Image size is too large for this cluster size {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': 'node0', 'size': 9223372036854775296}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': 'node0', 'size': 9223372036854775296}}} {u'return': {}} Job failed: Image size is too large for this cluster size {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'parallels', 'file': 'node0', 'size': 4503599627370497}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'parallels', 'file': 'node0', 'size': 4503599627370497}}} {u'return': {}} Job failed: Image size is too large for this cluster size {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} @@ -112,43 +112,43 @@ Job failed: Image size is too large for this cluster = size =20 =3D=3D=3D Invalid cluster size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 1234, 'driver': 'parallels', 'file': 'node0', 'size': 67= 108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 1234, 'driver': 'parallels', 'file': 'node0', 'size': 6710= 8864}}} {u'return': {}} Job failed: Cluster size must be a multiple of 512 bytes {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 128, 'driver': 'parallels', 'file': 'node0', 'size': 671= 08864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 128, 'driver': 'parallels', 'file': 'node0', 'size': 67108= 864}}} {u'return': {}} Job failed: Cluster size must be a multiple of 512 bytes {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 4294967296, 'driver': 'parallels', 'file': 'node0', 'siz= e': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 4294967296, 'driver': 'parallels', 'file': 'node0', 'size'= : 67108864}}} {u'return': {}} Job failed: Cluster size is too large {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 9223372036854775808L, 'driver': 'parallels', 'file': 'no= de0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 9223372036854775808L, 'driver': 'parallels', 'file': 'node= 0', 'size': 67108864}}} {u'return': {}} Job failed: Cluster size is too large {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 18446744073709551104L, 'driver': 'parallels', 'file': 'n= ode0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 18446744073709551104L, 'driver': 'parallels', 'file': 'nod= e0', 'size': 67108864}}} {u'return': {}} Job failed: Cluster size is too large {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 0, 'driver': 'parallels', 'file': 'node0', 'size': 67108= 864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 0, 'driver': 'parallels', 'file': 'node0', 'size': 6710886= 4}}} {u'return': {}} Job failed: Image size is too large for this cluster size {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'cluster-size': 512, 'driver': 'parallels', 'file': 'node0', 'size': 281= 474976710656}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'cluster-size': 512, 'driver': 'parallels', 'file': 'node0', 'size': 28147= 4976710656}}} {u'return': {}} Job failed: Image size is too large for this cluster size {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} diff --git a/tests/qemu-iotests/213 b/tests/qemu-iotests/213 index 29d25bcee1..4054439e3c 100755 --- a/tests/qemu-iotests/213 +++ b/tests/qemu-iotests/213 @@ -27,7 +27,7 @@ iotests.verify_image_format(supported_fmts=3D['vhdx']) iotests.verify_protocol(supported=3D['file']) =20 def blockdev_create(vm, options): - result =3D vm.qmp_log('x-blockdev-create', job_id=3D'job0', options=3D= options) + result =3D vm.qmp_log('blockdev-create', job_id=3D'job0', options=3Dop= tions) =20 if 'return' in result: assert result['return'] =3D=3D {} diff --git a/tests/qemu-iotests/213.out b/tests/qemu-iotests/213.out index f18a39a4b3..e1dcd47201 100644 --- a/tests/qemu-iotests/213.out +++ b/tests/qemu-iotests/213.out @@ -1,13 +1,13 @@ =3D=3D=3D Successful image creation (defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 {'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver'= : 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}} {u'return': {}} -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'file': 'imgfile', 'size': 134217728}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'file': 'imgfile', 'size': 134217728}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -19,12 +19,12 @@ cluster_size: 8388608 =20 =3D=3D=3D Successful image creation (explicit defaults) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'block-size': 8388608, 'driver': 'vhdx', 'subformat': 'dynamic', 'log-si= ze': 1048576, 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}= , 'block-state-zero': True, 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'block-size': 8388608, 'driver': 'vhdx', 'subformat': 'dynamic', 'log-size= ': 1048576, 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}, = 'block-state-zero': True, 'size': 67108864}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -36,12 +36,12 @@ cluster_size: 8388608 =20 =3D=3D=3D Successful image creation (with non-default options) =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'block-size': 268435456, 'driver': 'vhdx', 'subformat': 'fixed', 'log-si= ze': 8388608, 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}= , 'block-state-zero': False, 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'block-size': 268435456, 'driver': 'vhdx', 'subformat': 'fixed', 'log-size= ': 8388608, 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}, = 'block-state-zero': False, 'size': 33554432}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -53,7 +53,7 @@ cluster_size: 268435456 =20 =3D=3D=3D Invalid BlockdevRef =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'file': "this doesn't exist", 'size': 33554432}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'file': "this doesn't exist", 'size': 33554432}}} {u'return': {}} Job failed: Cannot find device=3Dthis doesn't exist nor node_name=3Dthis d= oesn't exist {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} @@ -61,7 +61,7 @@ Job failed: Cannot find device=3Dthis doesn't exist nor n= ode_name=3Dthis doesn't exi =20 =3D=3D=3D Zero size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'file': 'node0', 'size': 0}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'file': 'node0', 'size': 0}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -73,7 +73,7 @@ cluster_size: 8388608 =20 =3D=3D=3D Maximum size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'file': 'node0', 'size': 70368744177664}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'file': 'node0', 'size': 70368744177664}}} {u'return': {}} {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} @@ -85,25 +85,25 @@ cluster_size: 67108864 =20 =3D=3D=3D Invalid sizes =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'file': 'node0', 'size': 18446744073709551104L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'file': 'node0', 'size': 18446744073709551104L}}} {u'return': {}} Job failed: Image size too large; max of 64TB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'file': 'node0', 'size': 9223372036854775808L}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'file': 'node0', 'size': 9223372036854775808L}}} {u'return': {}} Job failed: Image size too large; max of 64TB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'file': 'node0', 'size': 9223372036854775296}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'file': 'node0', 'size': 9223372036854775296}}} {u'return': {}} Job failed: Image size too large; max of 64TB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'file': 'node0', 'size': 70368744177665}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'file': 'node0', 'size': 70368744177665}}} {u'return': {}} Job failed: Image size too large; max of 64TB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} @@ -111,31 +111,31 @@ Job failed: Image size too large; max of 64TB =20 =3D=3D=3D Invalid block size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'block-size': 1234567, 'file': 'node0', 'size': 671088= 64}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'block-size': 1234567, 'file': 'node0', 'size': 67108864= }}} {u'return': {}} Job failed: Block size must be a multiple of 1 MB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'block-size': 128, 'file': 'node0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'block-size': 128, 'file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Block size must be a multiple of 1 MB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'block-size': 3145728, 'file': 'node0', 'size': 671088= 64}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'block-size': 3145728, 'file': 'node0', 'size': 67108864= }}} {u'return': {}} Job failed: Block size must be a power of two {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'block-size': 536870912, 'file': 'node0', 'size': 6710= 8864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'block-size': 536870912, 'file': 'node0', 'size': 671088= 64}}} {u'return': {}} Job failed: Block size must not exceed 268435456 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'driver': 'vhdx', 'block-size': 0, 'file': 'node0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'driver': 'vhdx', 'block-size': 0, 'file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Block size must be a multiple of 1 MB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} @@ -143,25 +143,25 @@ Job failed: Block size must be a multiple of 1 MB =20 =3D=3D=3D Invalid log size =3D=3D=3D =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'log-size': 1234567, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864= }}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'log-size': 1234567, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Log size must be a multiple of 1 MB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'log-size': 128, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'log-size': 128, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Log size must be a multiple of 1 MB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'log-size': 4294967296, 'driver': 'vhdx', 'file': 'node0', 'size': 67108= 864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'log-size': 4294967296, 'driver': 'vhdx', 'file': 'node0', 'size': 6710886= 4}}} {u'return': {}} Job failed: Log size must be smaller than 4 GB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {u'return': {}} =20 -{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options'= : {'log-size': 0, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} +{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': = {'log-size': 0, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} {u'return': {}} Job failed: Log size must be a multiple of 1 MB {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} --=20 2.13.6