From nobody Sun May 5 05:49:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571168230; cv=none; d=zoho.com; s=zohoarc; b=EdOAjqk+/2mBrdnlKJqJsSGrF7Lx4GxZTC7bpKAYB0nJS2FWHp9+TJxXuj5L0aAPB4JIjEpM8QLXwcjeQTWyK2p7wstUzNGVmN0Eyug3sbtBa2oUM/6PPA7p7bnCC8Hi++xqIFnW+imoULuPvrGulXSwq/NrQXL3b/VEHFHOef4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571168230; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=l0SgjrNnixQi5AQHZZ9q+z0/nl1XXWwQ76xL4et9xuE=; b=Lu4+EpSKWfiY5v/YFqRw8qQr5MRmX+c7MePycNYB0az7QC+gQhuH6DoX04McC+9fh5tnz08OBKutK2ePywG/5ybPRiKD05TaQ2uqDEQI9TSDW++imndfBY7Oux+Z5boNgq/oBF0tChWckBPijqWO4LeR3h6gr0buGppflRVMwmc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571168230429517.0196695428806; Tue, 15 Oct 2019 12:37:10 -0700 (PDT) Received: from localhost ([::1]:57292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKScx-00070l-NY for importer@patchew.org; Tue, 15 Oct 2019 15:37:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40759) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKSb8-0005PY-JJ for qemu-devel@nongnu.org; Tue, 15 Oct 2019 15:35:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKSb7-0006Ub-HT for qemu-devel@nongnu.org; Tue, 15 Oct 2019 15:35:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43010) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKSb4-0006TA-Uy; Tue, 15 Oct 2019 15:35:07 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 215BBC0578F4; Tue, 15 Oct 2019 19:35:06 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-168.phx2.redhat.com [10.3.116.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0D8C19C4F; Tue, 15 Oct 2019 19:35:05 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Subject: [PATCH v2 1/3] iotests: Fix 173 Date: Tue, 15 Oct 2019 14:35:01 -0500 Message-Id: <20191015193503.25591-2-eblake@redhat.com> In-Reply-To: <20191015193503.25591-1-eblake@redhat.com> References: <20191015193503.25591-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 15 Oct 2019 19:35:06 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This test has been broken since 3.0. It used TEST_IMG to influence the name of a file created during _make_test_img, but commit 655ae6bb changed things so that the wrong file name is being created, which then caused _launch_qemu to fail. In the meantime, the set of events issued for the actions of the test has increased. Why haven't we noticed the failure? Because the test rarely gets run: './check -qcow2 173' is insufficient (that defaults to using file protocol) './check -nfs 173' is insufficient (that defaults to using raw format) so the test is only run with: ./check -qcow2 -nfs 173 Note that we already have a number of other problems with -nfs: ./check -nfs (fails 18/30) ./check -qcow2 -nfs (fails 45/76 after this patch) and it's not on my priority list to fix those. Rather, I found this because of my next patch's work on tests using _send_qemu_cmd. Fixes: 655ae6b Signed-off-by: Eric Blake Reviewed-by: Max Reitz --- tests/qemu-iotests/173 | 4 ++-- tests/qemu-iotests/173.out | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/173 b/tests/qemu-iotests/173 index 9e2fa2e73cb9..29dcaa1960df 100755 --- a/tests/qemu-iotests/173 +++ b/tests/qemu-iotests/173 @@ -47,9 +47,9 @@ size=3D100M BASE_IMG=3D"${TEST_DIR}/image.base" TOP_IMG=3D"${TEST_DIR}/image.snp1" -TEST_IMG=3D"${BASE_IMG}" _make_test_img $size +TEST_IMG_FILE=3D"${BASE_IMG}" _make_test_img $size -TEST_IMG=3D"${TOP_IMG}" _make_test_img $size +TEST_IMG_FILE=3D"${TOP_IMG}" _make_test_img $size echo echo =3D=3D=3D Running QEMU, using block-stream to find backing image =3D= =3D=3D diff --git a/tests/qemu-iotests/173.out b/tests/qemu-iotests/173.out index f477a0099a32..e83d17ec2f64 100644 --- a/tests/qemu-iotests/173.out +++ b/tests/qemu-iotests/173.out @@ -7,6 +7,10 @@ Formatting 'TEST_DIR/image.snp1', fmt=3DIMGFMT size=3D1048= 57600 {"return": {}} {"return": {}} {"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk2"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk2"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "disk2", "len": 104857600, "off= set": 104857600, "speed": 0, "type": "stream"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "disk2"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "disk2"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "disk2", "len": 0, "offset": 0,= "speed": 0, "type": "stream"}} *** done --=20 2.21.0 From nobody Sun May 5 05:49:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571168339; cv=none; d=zoho.com; s=zohoarc; b=MQld8plC/EFTty9Tub/xukd5V98cV70ouLYqPcZIhTJTW4TmNGrsBDT6R2uH203fGdPkdMk0WCpLytxqO6VRL6pKS16jwiP2O2BK/j7CQjnvucvUjZEk7PuIpJDeSOECZKYve96D3bw9yzML1AqP2UYYzkk8yf+Cr52SHuDmlZg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571168339; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BT0lDkVB2RVrSecmk6nzfNw6lrgF4X79HJch6nM64ug=; b=SFnJfn42Tcb+8xFN5tORm9jLlTuwgLzPR76HmRXzgVR5oWx3UHuzRh1pGvHPwcwotOLG8LPauYGdnogOVWrq/WimAah7ZSJ7oS+SndgzjO+3fjXDgBbEMYEQf9lkJcedQvD0WXaXxf4O0LFsPzJ4qTa6GNvqMSR2DVcy5BhvZ7w= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571168339965112.49073103617422; Tue, 15 Oct 2019 12:38:59 -0700 (PDT) Received: from localhost ([::1]:57374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKSem-0001Ds-N1 for importer@patchew.org; Tue, 15 Oct 2019 15:38:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40847) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKSbW-00065F-LU for qemu-devel@nongnu.org; Tue, 15 Oct 2019 15:35:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKSbN-0006bm-Dv for qemu-devel@nongnu.org; Tue, 15 Oct 2019 15:35:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40894) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKSb5-0006TX-SM; Tue, 15 Oct 2019 15:35:08 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B9DD3082231; Tue, 15 Oct 2019 19:35:07 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-168.phx2.redhat.com [10.3.116.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 80E2D19C4F; Tue, 15 Oct 2019 19:35:06 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Subject: [PATCH v2 2/3] iotests: Include QMP input in .out files Date: Tue, 15 Oct 2019 14:35:02 -0500 Message-Id: <20191015193503.25591-3-eblake@redhat.com> In-Reply-To: <20191015193503.25591-1-eblake@redhat.com> References: <20191015193503.25591-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 15 Oct 2019 19:35:07 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We generally include relevant HMP input in .out files, by virtue of the fact that HMP echoes its input. But QMP does not, so we have to explicitly inject it in the output stream, in order to make it easier to read .out files to see what behavior is being tested (especially true where the output file is a sequence of {'return': {}}). Suggested-by: Max Reitz Signed-off-by: Eric Blake --- tests/qemu-iotests/common.qemu | 9 ++++ tests/qemu-iotests/085.out | 26 ++++++++++ tests/qemu-iotests/094.out | 4 ++ tests/qemu-iotests/095.out | 2 + tests/qemu-iotests/109.out | 88 ++++++++++++++++++++++++++++++++++ tests/qemu-iotests/117.out | 5 ++ tests/qemu-iotests/127.out | 4 ++ tests/qemu-iotests/140.out | 5 ++ tests/qemu-iotests/141.out | 26 ++++++++++ tests/qemu-iotests/143.out | 3 ++ tests/qemu-iotests/144.out | 5 ++ tests/qemu-iotests/153.out | 11 +++++ tests/qemu-iotests/156.out | 11 +++++ tests/qemu-iotests/161.out | 8 ++++ tests/qemu-iotests/173.out | 4 ++ tests/qemu-iotests/182.out | 8 ++++ tests/qemu-iotests/183.out | 11 +++++ tests/qemu-iotests/185.out | 18 +++++++ tests/qemu-iotests/191.out | 8 ++++ tests/qemu-iotests/200.out | 1 + tests/qemu-iotests/223.out | 19 ++++++++ tests/qemu-iotests/229.out | 3 ++ tests/qemu-iotests/249.out | 6 +++ 23 files changed, 285 insertions(+) diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu index 8d2021a7eb0c..abc231743e82 100644 --- a/tests/qemu-iotests/common.qemu +++ b/tests/qemu-iotests/common.qemu @@ -123,6 +123,9 @@ _timed_wait_for() # until either timeout, or a response. If it is not set, or <=3D0, # then the command is only sent once. # +# If neither $silent nor $mismatch_only is set, and $cmd begins with '{', +# echo the command before sending it the first time. +# # If $qemu_error_no_exit is set, then even if the expected response # is not seen, we will not exit. $QEMU_STATUS[$1] will be set it -1 in # that case. @@ -152,6 +155,12 @@ _send_qemu_cmd() shift $(($# - 2)) fi + # Display QMP being sent, but not HMP (since HMP already echoes its + # input back to output); decide based on leading '{' + if [ -z "$silent" ] && [ -z "$mismatch_only" ] && + [ "$cmd" !=3D "${cmd#{}" ]; then + echo "${cmd}" | _filter_testdir + fi while [ ${count} -gt 0 ] do echo "${cmd}" >&${QEMU_IN[${h}]} diff --git a/tests/qemu-iotests/085.out b/tests/qemu-iotests/085.out index 2a5f256cd3ec..e92f125b63c4 100644 --- a/tests/qemu-iotests/085.out +++ b/tests/qemu-iotests/085.out @@ -7,48 +7,61 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D13421= 7728 =3D=3D=3D Sending capabilities =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} =3D=3D=3D Create a single snapshot on virtio0 =3D=3D=3D +{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0',= 'snapshot-file':'TEST_DIR/1-snapshot-v0.qcow2', 'format': 'qcow2' } } Formatting 'TEST_DIR/1-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/t.qcow2.1 backing_fmt=3Dqcow2 cluster_size=3D65536 la= zy_refcounts=3Doff refcount_bits=3D16 {"return": {}} =3D=3D=3D Invalid command - missing device and nodename =3D=3D=3D +{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'snapshot-file':'TES= T_DIR/1-snapshot-v0.qcow2', 'format': 'qcow2' } } {"error": {"class": "GenericError", "desc": "Cannot find device=3D nor nod= e_name=3D"}} =3D=3D=3D Invalid command - missing snapshot-file =3D=3D=3D +{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0',= 'format': 'qcow2' } } {"error": {"class": "GenericError", "desc": "Parameter 'snapshot-file' is = missing"}} =3D=3D=3D Create several transactional group snapshots =3D=3D=3D +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /2-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { '= device': 'virtio1', 'snapshot-file': 'TEST_DIR/2-snapshot-v1.qcow2' } } ] }= } Formatting 'TEST_DIR/2-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/1-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/2-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/t.qcow2.2 backing_fmt=3Dqcow2 cluster_size=3D65536 la= zy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /3-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { '= device': 'virtio1', 'snapshot-file': 'TEST_DIR/3-snapshot-v1.qcow2' } } ] }= } Formatting 'TEST_DIR/3-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/2-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/3-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/2-snapshot-v1.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /4-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { '= device': 'virtio1', 'snapshot-file': 'TEST_DIR/4-snapshot-v1.qcow2' } } ] }= } Formatting 'TEST_DIR/4-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/3-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/4-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/3-snapshot-v1.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /5-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { '= device': 'virtio1', 'snapshot-file': 'TEST_DIR/5-snapshot-v1.qcow2' } } ] }= } Formatting 'TEST_DIR/5-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/4-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/5-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/4-snapshot-v1.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /6-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { '= device': 'virtio1', 'snapshot-file': 'TEST_DIR/6-snapshot-v1.qcow2' } } ] }= } Formatting 'TEST_DIR/6-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/5-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/6-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/5-snapshot-v1.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /7-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { '= device': 'virtio1', 'snapshot-file': 'TEST_DIR/7-snapshot-v1.qcow2' } } ] }= } Formatting 'TEST_DIR/7-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/6-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/7-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/6-snapshot-v1.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /8-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { '= device': 'virtio1', 'snapshot-file': 'TEST_DIR/8-snapshot-v1.qcow2' } } ] }= } Formatting 'TEST_DIR/8-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/7-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/8-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/7-snapshot-v1.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /9-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { '= device': 'virtio1', 'snapshot-file': 'TEST_DIR/9-snapshot-v1.qcow2' } } ] }= } Formatting 'TEST_DIR/9-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/8-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/9-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 ba= cking_file=3DTEST_DIR/8-snapshot-v1.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev= -snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR= /10-snapshot-v0.qcow2' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { = 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/10-snapshot-v1.qcow2' } } ]= } } Formatting 'TEST_DIR/10-snapshot-v0.qcow2', fmt=3Dqcow2 size=3D134217728 b= acking_file=3DTEST_DIR/9-snapshot-v0.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 Formatting 'TEST_DIR/10-snapshot-v1.qcow2', fmt=3Dqcow2 size=3D134217728 b= acking_file=3DTEST_DIR/9-snapshot-v1.qcow2 backing_fmt=3Dqcow2 cluster_size= =3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} @@ -56,35 +69,48 @@ Formatting 'TEST_DIR/10-snapshot-v1.qcow2', fmt=3Dqcow2= size=3D134217728 backing_fil =3D=3D=3D Create a couple of snapshots using blockdev-snapshot =3D=3D=3D Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 backing_file= =3DTEST_DIR/10-snapshot-v0.IMGFMT +{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'qcow2', 'node-name'= : 'snap_11', 'backing': null, 'file': { 'driver': 'file', 'filename': 'TEST= _DIR/11-snapshot-v0.qcow2', 'node-name': 'file_11' } } } {"return": {}} +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overl= ay':'snap_11' } } {"return": {}} Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 backing_file= =3DTEST_DIR/11-snapshot-v0.IMGFMT +{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'qcow2', 'node-name'= : 'snap_12', 'backing': null, 'file': { 'driver': 'file', 'filename': 'TEST= _DIR/12-snapshot-v0.qcow2', 'node-name': 'file_12' } } } {"return": {}} +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overl= ay':'snap_12' } } {"return": {}} =3D=3D=3D Invalid command - cannot create a snapshot using a file BDS =3D= =3D=3D +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overla= y':'file_12' } } {"error": {"class": "GenericError", "desc": "The overlay does not support = backing images"}} =3D=3D=3D Invalid command - snapshot node used as active layer =3D=3D=3D +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overl= ay':'snap_12' } } {"error": {"class": "GenericError", "desc": "The overlay is already in use= "}} +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overla= y':'virtio0' } } {"error": {"class": "GenericError", "desc": "The overlay is already in use= "}} +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overla= y':'virtio1' } } {"error": {"class": "GenericError", "desc": "The overlay is already in use= "}} =3D=3D=3D Invalid command - snapshot node used as backing hd =3D=3D=3D +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overl= ay':'snap_11' } } {"error": {"class": "GenericError", "desc": "Node 'snap_11' is busy: node = is used as backing hd of 'snap_12'"}} =3D=3D=3D Invalid command - snapshot node has a backing image =3D=3D=3D Formatting 'TEST_DIR/t.IMGFMT.base', fmt=3DIMGFMT size=3D134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 backing_file= =3DTEST_DIR/t.IMGFMT.base +{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'qcow2', 'node-name'= : 'snap_13', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.qcow2', 'n= ode-name': 'file_13' } } } {"return": {}} +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overl= ay':'snap_13' } } {"error": {"class": "GenericError", "desc": "The overlay already has a bac= king image"}} =3D=3D=3D Invalid command - The node does not exist =3D=3D=3D +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overl= ay':'snap_14' } } {"error": {"class": "GenericError", "desc": "Cannot find device=3Dsnap_14 = nor node_name=3Dsnap_14"}} +{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'nodevice', 'overl= ay':'snap_13' } } {"error": {"class": "GenericError", "desc": "Cannot find device=3Dnodevice= nor node_name=3Dnodevice"}} *** done diff --git a/tests/qemu-iotests/094.out b/tests/qemu-iotests/094.out index f3b9ecf22b73..f3e1a9ecf736 100644 --- a/tests/qemu-iotests/094.out +++ b/tests/qemu-iotests/094.out @@ -1,16 +1,20 @@ QA output created by 094 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 Formatting 'TEST_DIR/source.IMGFMT', fmt=3DIMGFMT size=3D67108864 +{'execute': 'qmp_capabilities'} {"return": {}} +{'execute': 'drive-mirror', 'arguments': {'device': 'src', 'target': 'nbd:= 127.0.0.1:10810', 'format': 'nbd', 'sync':'full', 'mode':'existing'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 67108864, "offset": 6= 7108864, "speed": 0, "type": "mirror"}} +{'execute': 'block-job-complete', 'arguments': {'device': 'src'}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 67108864, "offset= ": 67108864, "speed": 0, "type": "mirror"}} +{'execute': 'quit'} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} {"return": {}} diff --git a/tests/qemu-iotests/095.out b/tests/qemu-iotests/095.out index d2e393fef8e1..8b0144f3a3cb 100644 --- a/tests/qemu-iotests/095.out +++ b/tests/qemu-iotests/095.out @@ -10,7 +10,9 @@ virtual size: 5 MiB (5242880 bytes) =3D=3D=3D Running QEMU Live Commit Test =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'block-commit', 'arguments': { 'device': 'test', 'top': 'TEST= _DIR/t.qcow2.snp1' } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "test"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "test"}} {"return": {}} diff --git a/tests/qemu-iotests/109.out b/tests/qemu-iotests/109.out index 9c1159bf08ed..a09b4489ee22 100644 --- a/tests/qemu-iotests/109.out +++ b/tests/qemu-iotests/109.out @@ -4,7 +4,9 @@ QA output created by 109 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 Formatting 'TEST_DIR/t.raw.src', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -16,18 +18,24 @@ WARNING: Image format was not specified for 'TEST_DIR/t= .raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 0,= "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 1024, "offset": 1024,= "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 1024, "offset": 1024, "status": "= ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -42,7 +50,9 @@ Images are identical. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 Formatting 'TEST_DIR/t.raw.src', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -54,18 +64,24 @@ WARNING: Image format was not specified for 'TEST_DIR/t= .raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 51= 2, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 197120, "offset": 197= 120, "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 197120, "offset": 197120, "status= ": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -80,7 +96,9 @@ Images are identical. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 Formatting 'TEST_DIR/t.raw.src', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -92,18 +110,24 @@ WARNING: Image format was not specified for 'TEST_DIR/= t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 26= 2144, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 327680, "offset": 327= 680, "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 327680, "offset": 327680, "status= ": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -118,7 +142,9 @@ Images are identical. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 Formatting 'TEST_DIR/t.raw.src', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -130,18 +156,24 @@ WARNING: Image format was not specified for 'TEST_DIR= /t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 0,= "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 1024, "offset": 1024,= "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 1024, "offset": 1024, "status": "= ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -156,7 +188,9 @@ Images are identical. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 Formatting 'TEST_DIR/t.raw.src', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -168,18 +202,24 @@ WARNING: Image format was not specified for 'TEST_DIR= /t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 0,= "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 65536, "offset": 6553= 6, "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 65536, "offset": 65536, "status":= "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -194,7 +234,9 @@ Images are identical. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 Formatting 'TEST_DIR/t.raw.src', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -206,18 +248,24 @@ WARNING: Image format was not specified for 'TEST_DIR= /t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 0,= "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 2560, "offset": 2560,= "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 2560, "offset": 2560, "status": "= ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -231,7 +279,9 @@ Images are identical. =3D=3D=3D Copying sample image empty.bochs into raw =3D=3D=3D Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -243,18 +293,24 @@ WARNING: Image format was not specified for 'TEST_DIR= /t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": OF= FSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 2560, "offset": 2560,= "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 2560, "offset": 2560, "status": "= ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -268,7 +324,9 @@ Images are identical. =3D=3D=3D Copying sample image iotest-dirtylog-10G-4M.vhdx into raw =3D=3D= =3D Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -280,18 +338,24 @@ WARNING: Image format was not specified for 'TEST_DIR= /t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": OF= FSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 31457280, "offset": 3= 1457280, "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 31457280, "offset": 31457280, "st= atus": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror= "}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -305,7 +369,9 @@ Images are identical. =3D=3D=3D Copying sample image parallels-v1 into raw =3D=3D=3D Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -317,18 +383,24 @@ WARNING: Image format was not specified for 'TEST_DIR= /t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": OF= FSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 327680, "offset": 327= 680, "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 327680, "offset": 327680, "status= ": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -342,7 +414,9 @@ Images are identical. =3D=3D=3D Copying sample image simple-pattern.cloop into raw =3D=3D=3D Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -354,18 +428,24 @@ WARNING: Image format was not specified for 'TEST_DIR= /t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": OF= FSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"execute":"query-block-jobs"} {"return": []} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 2048, "offset": 2048,= "speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 2048, "offset": 2048, "status": "= ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -379,7 +459,9 @@ Images are identical. =3D=3D=3D Write legitimate MBR into raw =3D=3D=3D Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing g= uessed raw. Automatically detecting the format is dangerous for raw images, w= rite operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. @@ -388,7 +470,9 @@ WARNING: Image format was not specified for 'TEST_DIR/t= .raw' and probing guessed {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 512, "offset": 512, "= speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 512, "offset": 512, "status": "re= ady", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} @@ -398,13 +482,17 @@ WARNING: Image format was not specified for 'TEST_DIR= /t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} Warning: Image size mismatch! Images are identical. +{ 'execute': 'qmp_capabilities' } {"return": {}} +{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_= DIR/t.raw', 'format': 'raw', 'mode': 'existing', 'sync': 'full'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "src", "len": 512, "offset": 512, "= speed": 0, "type": "mirror"}} +{"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "a= uto-dismiss": true, "busy": false, "len": 512, "offset": 512, "status": "re= ady", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}} diff --git a/tests/qemu-iotests/117.out b/tests/qemu-iotests/117.out index 57079af167a5..f107a5ceb97a 100644 --- a/tests/qemu-iotests/117.out +++ b/tests/qemu-iotests/117.out @@ -1,11 +1,16 @@ QA output created by 117 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D65536 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'blockdev-add', 'arguments': { 'node-name': 'protocol', 'driv= er': 'file', 'filename': 'TEST_DIR/t.qcow2' } } {"return": {}} +{ 'execute': 'blockdev-add', 'arguments': { 'node-name': 'format', 'driver= ': 'qcow2', 'file': 'protocol' } } {"return": {}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io format "write -P 42 0 64k"' } } wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} No errors were found on the image. diff --git a/tests/qemu-iotests/127.out b/tests/qemu-iotests/127.out index 6c98b1824ea6..19df403c3153 100644 --- a/tests/qemu-iotests/127.out +++ b/tests/qemu-iotests/127.out @@ -4,16 +4,20 @@ Formatting 'TEST_DIR/t.IMGFMT.overlay0', fmt=3DIMGFMT siz= e=3D65536 backing_file=3DTEST Formatting 'TEST_DIR/t.IMGFMT.overlay1', fmt=3DIMGFMT size=3D65536 backing= _file=3DTEST_DIR/t.IMGFMT wrote 42/42 bytes at offset 0 42 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'drive-mirror', 'arguments': { 'job-id': 'mirror', 'device': = 'source', 'target': 'TEST_DIR/t.qcow2.overlay1', 'mode': 'existing', 'sync'= : 'top' } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "mirror"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "mirror", "len": 65536, "offset": 6= 5536, "speed": 0, "type": "mirror"}} +{ 'execute': 'block-job-complete', 'arguments': { 'device': 'mirror' } } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "mirror", "len": 65536, "offset= ": 65536, "speed": 0, "type": "mirror"}} +{ 'execute': 'quit' } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "mirror"}} {"return": {}} diff --git a/tests/qemu-iotests/140.out b/tests/qemu-iotests/140.out index 67fe44a3e390..3857675f7ebd 100644 --- a/tests/qemu-iotests/140.out +++ b/tests/qemu-iotests/140.out @@ -2,14 +2,19 @@ QA output created by 140 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D65536 wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'nbd-server-start', 'arguments': { 'addr': { 'type': 'unix', = 'data': { 'path': 'TEST_DIR/nbd' }}}} {"return": {}} +{ 'execute': 'nbd-server-add', 'arguments': { 'device': 'drv' }} {"return": {}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'eject', 'arguments': { 'device': 'drv' }} {"return": {}} qemu-io: can't open device nbd+unix:///drv?socket=3DTEST_DIR/nbd: Requeste= d export not available server reported: export 'drv' not present +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} *** done diff --git a/tests/qemu-iotests/141.out b/tests/qemu-iotests/141.out index e3b578282da4..cb37ccd8ea42 100644 --- a/tests/qemu-iotests/141.out +++ b/tests/qemu-iotests/141.out @@ -2,82 +2,108 @@ QA output created by 141 Formatting 'TEST_DIR/b.IMGFMT', fmt=3DIMGFMT size=3D1048576 Formatting 'TEST_DIR/m.IMGFMT', fmt=3DIMGFMT size=3D1048576 backing_file= =3DTEST_DIR/b.IMGFMT Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1048576 backing_file= =3DTEST_DIR/m.IMGFMT +{'execute': 'qmp_capabilities'} {"return": {}} =3D=3D=3D Testing drive-backup =3D=3D=3D +{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': = 'qcow2', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.qcow2' }}} {"return": {}} +{'execute': 'drive-backup', 'arguments': {'job-id': 'job0', 'device': 'drv= 0', 'target': 'TEST_DIR/o.IMGFMT', 'format': 'IMGFMT', 'sync': 'none'}} Formatting 'TEST_DIR/o.IMGFMT', fmt=3DIMGFMT size=3D1048576 backing_file= =3DTEST_DIR/t.IMGFMT backing_fmt=3DIMGFMT {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: node is = used as backing hd of 'NODE_NAME'"}} +{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset= ": 0, "speed": 0, "type": "backup"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"return": {}} =3D=3D=3D Testing drive-mirror =3D=3D=3D +{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': = 'qcow2', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.qcow2' }}} {"return": {}} +{'execute': 'drive-mirror', 'arguments': {'job-id': 'job0', 'device': 'drv= 0', 'target': 'TEST_DIR/o.IMGFMT', 'format': 'IMGFMT', 'sync': 'none'}} Formatting 'TEST_DIR/o.IMGFMT', fmt=3DIMGFMT size=3D1048576 backing_file= =3DTEST_DIR/t.IMGFMT backing_fmt=3DIMGFMT {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "job0", "len": 0, "offset": 0, "spe= ed": 0, "type": "mirror"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block de= vice is in use by block job: mirror"}} +{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 0, "offset": 0, = "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"return": {}} =3D=3D=3D Testing active block-commit =3D=3D=3D +{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': = 'qcow2', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.qcow2' }}} {"return": {}} +{'execute': 'block-commit', 'arguments': {'job-id': 'job0', 'device': 'drv= 0'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "job0", "len": 0, "offset": 0, "spe= ed": 0, "type": "commit"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block de= vice is in use by block job: commit"}} +{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 0, "offset": 0, = "speed": 0, "type": "commit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"return": {}} =3D=3D=3D Testing non-active block-commit =3D=3D=3D wrote 1048576/1048576 bytes at offset 0 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': = 'qcow2', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.qcow2' }}} {"return": {}} +{'execute': 'block-commit', 'arguments': {'job-id': 'job0', 'device': 'drv= 0', 'top': 'TEST_DIR/m.IMGFMT', 'speed': 1}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"error": {"class": "GenericError", "desc": "Node drv0 is in use"}} +{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset= ": 524288, "speed": 1, "type": "commit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"return": {}} =3D=3D=3D Testing block-stream =3D=3D=3D wrote 1048576/1048576 bytes at offset 0 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': = 'qcow2', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.qcow2' }}} {"return": {}} +{'execute': 'block-stream', 'arguments': {'job-id': 'job0', 'device': 'drv= 0', 'speed': 1}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"error": {"class": "GenericError", "desc": "Node drv0 is in use"}} +{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset= ": 524288, "speed": 1, "type": "stream"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} +{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}} {"return": {}} *** done diff --git a/tests/qemu-iotests/143.out b/tests/qemu-iotests/143.out index ee71b5aa42f0..d0a00fc2c22a 100644 --- a/tests/qemu-iotests/143.out +++ b/tests/qemu-iotests/143.out @@ -1,8 +1,11 @@ QA output created by 143 +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'nbd-server-start', 'arguments': { 'addr': { 'type': 'unix', = 'data': { 'path': 'TEST_DIR/nbd' }}}} {"return": {}} qemu-io: can't open device nbd+unix:///no_such_export?socket=3DTEST_DIR/nb= d: Requested export not available server reported: export 'no_such_export' not present +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} *** done diff --git a/tests/qemu-iotests/144.out b/tests/qemu-iotests/144.out index a9a8216beac7..cdc4189f53b3 100644 --- a/tests/qemu-iotests/144.out +++ b/tests/qemu-iotests/144.out @@ -6,17 +6,21 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D53687= 0912 =3D=3D=3D Performing Live Snapshot 1 =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0',= 'snapshot-file':'TEST_DIR/tmp.qcow2', 'format': 'qcow2' } } Formatting 'TEST_DIR/tmp.qcow2', fmt=3Dqcow2 size=3D536870912 backing_file= =3DTEST_DIR/t.qcow2 backing_fmt=3Dqcow2 cluster_size=3D65536 lazy_refcounts= =3Doff refcount_bits=3D16 {"return": {}} =3D=3D=3D Performing block-commit on active layer =3D=3D=3D +{ 'execute': 'block-commit', 'arguments': { 'device': 'virtio0' } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "virtio0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "virtio0"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "virtio0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "virtio0", "len": 0, "offset": 0, "= speed": 0, "type": "commit"}} +{ 'execute': 'block-job-complete', 'arguments': { 'device': 'virtio0' } } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "virtio0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "virtio0"}} @@ -26,6 +30,7 @@ Formatting 'TEST_DIR/tmp.qcow2', fmt=3Dqcow2 size=3D53687= 0912 backing_file=3DTEST_DIR/ =3D=3D=3D Performing Live Snapshot 2 =3D=3D=3D +{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0',= 'snapshot-file':'TEST_DIR/tmp2.qcow2', 'format': 'qcow2' } } Formatting 'TEST_DIR/tmp2.qcow2', fmt=3Dqcow2 size=3D536870912 backing_fil= e=3DTEST_DIR/t.qcow2 backing_fmt=3Dqcow2 cluster_size=3D65536 lazy_refcount= s=3Doff refcount_bits=3D16 {"return": {}} *** done diff --git a/tests/qemu-iotests/153.out b/tests/qemu-iotests/153.out index e96942000662..40fd03259e0b 100644 --- a/tests/qemu-iotests/153.out +++ b/tests/qemu-iotests/153.out @@ -144,6 +144,7 @@ _qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2 _qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2 qemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=3Don can only be = used with read-only images +{ 'execute': 'quit' } Round done @@ -266,6 +267,7 @@ _qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2 _qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2 qemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=3Don can only be = used with read-only images +{ 'execute': 'quit' } Round done @@ -367,6 +369,7 @@ _qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2 _qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2 qemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=3Don can only be = used with read-only images +{ 'execute': 'quit' } Round done @@ -412,11 +415,14 @@ QEMU_PROG: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2: = Failed to get "write" lock Is another process using the image [TEST_DIR/t.qcow2]? =3D=3D Active commit to intermediate layer should work when base in use = =3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} _qemu_img_wrapper commit -b TEST_DIR/t.qcow2.b TEST_DIR/t.qcow2.c +{ 'execute': 'qmp_capabilities' } {"return": {}} Adding drive +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'driv= e_add 0 if=3Dnone,id=3Dd0,file=3DTEST_DIR/t.qcow2' } } {"return": "OKrn"} _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 @@ -426,20 +432,25 @@ Creating overlay with qemu-img when the guest is runn= ing should be allowed _qemu_img_wrapper create -f qcow2 -b TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.ove= rlay =3D=3D Closing an image should unlock it =3D=3D +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'driv= e_del d0' } } {"return": ""} _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 Adding two and closing one +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'driv= e_add 0 if=3Dnone,id=3Dd0,file=3DTEST_DIR/t.qcow2,readonly=3Don' } } {"return": "OKrn"} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'driv= e_add 0 if=3Dnone,id=3Dd1,file=3DTEST_DIR/t.qcow2,readonly=3Don' } } {"return": "OKrn"} _qemu_img_wrapper info TEST_DIR/t.qcow2 +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'driv= e_del d0' } } {"return": ""} _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 qemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock Is another process using the image [TEST_DIR/t.qcow2]? Closing the other +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'driv= e_del d1' } } {"return": ""} _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 diff --git a/tests/qemu-iotests/156.out b/tests/qemu-iotests/156.out index 4c391a760371..d1865044f81a 100644 --- a/tests/qemu-iotests/156.out +++ b/tests/qemu-iotests/156.out @@ -5,21 +5,27 @@ wrote 262144/262144 bytes at offset 0 256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 196608/196608 bytes at offset 65536 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } {"return": {}} Formatting 'TEST_DIR/t.IMGFMT.overlay', fmt=3DIMGFMT size=3D1048576 backin= g_file=3DTEST_DIR/t.IMGFMT +{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'source', = 'snapshot-file': 'TEST_DIR/t.qcow2.overlay', 'format': 'qcow2', 'mode': 'ex= isting' } } {"return": {}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io source "write -P 3 128k 128k"' } } wrote 131072/131072 bytes at offset 131072 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} Formatting 'TEST_DIR/t.IMGFMT.target.overlay', fmt=3DIMGFMT size=3D1048576= backing_file=3DTEST_DIR/t.IMGFMT.target +{ 'execute': 'drive-mirror', 'arguments': { 'device': 'source', 'target': = 'TEST_DIR/t.qcow2.target.overlay', 'mode': 'existing', 'sync': 'top' } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "source"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "source"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "source"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "source", "len": 131072, "offset": = 131072, "speed": 0, "type": "mirror"}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io source "write -P 4 192k 64k"' } } wrote 65536/65536 bytes at offset 196608 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'block-job-complete', 'arguments': { 'device': 'source' } } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "source"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "source"}} @@ -27,19 +33,24 @@ wrote 65536/65536 bytes at offset 196608 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "source"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "source"}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io source "read -P 1 0k 64k"' } } read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io source "read -P 2 64k 64k"' } } read 65536/65536 bytes at offset 65536 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io source "read -P 3 128k 64k"' } } read 65536/65536 bytes at offset 131072 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io source "read -P 4 192k 64k"' } } read 65536/65536 bytes at offset 196608 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} diff --git a/tests/qemu-iotests/161.out b/tests/qemu-iotests/161.out index 39951993ee84..118ed0d92ab0 100644 --- a/tests/qemu-iotests/161.out +++ b/tests/qemu-iotests/161.out @@ -5,15 +5,20 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D10485= 76 backing_file=3DTEST_DIR/t. *** Change an option on the backing file +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io none0 "reopen -o backing.detect-zeroes=3Don"' } } {"return": ""} *** Stream and then change an option on the backing file +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'block-stream', 'arguments': { 'device': 'none0', 'base': 'TE= ST_DIR/t.qcow2.base' } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "none0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "none0"}} {"return": {}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io none0 "reopen -o backing.detect-zeroes=3Don"' } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "none0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "none0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "none0", "len": 1048576, "offse= t": 1048576, "speed": 0, "type": "stream"}} @@ -26,10 +31,13 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D104= 8576 backing_file=3DTEST_DIR/t. Formatting 'TEST_DIR/t.IMGFMT.base', fmt=3DIMGFMT size=3D1048576 Formatting 'TEST_DIR/t.IMGFMT.int', fmt=3DIMGFMT size=3D1048576 backing_fi= le=3DTEST_DIR/t.IMGFMT.base Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1048576 backing_file= =3DTEST_DIR/t.IMGFMT.int +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'block-commit', 'arguments': { 'device': 'none0', 'top': 'TES= T_DIR/t.qcow2.int' } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "none0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "none0"}} {"return": {}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io none0 "reopen -o backing.detect-zeroes=3Don"' } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "none0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "none0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "none0", "len": 1048576, "offse= t": 1048576, "speed": 0, "type": "commit"}} diff --git a/tests/qemu-iotests/173.out b/tests/qemu-iotests/173.out index e83d17ec2f64..c0ada84db64d 100644 --- a/tests/qemu-iotests/173.out +++ b/tests/qemu-iotests/173.out @@ -4,9 +4,13 @@ Formatting 'TEST_DIR/image.snp1', fmt=3DIMGFMT size=3D1048= 57600 =3D=3D=3D Running QEMU, using block-stream to find backing image =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'arguments': { 'device': 'disk2', 'format': 'qcow2', 'mode': 'existing',= 'snapshot-file': 'TEST_DIR/image.snp1', 'snapshot-node-name': 'snp1' }, 'e= xecute': 'blockdev-snapshot-sync' } {"return": {}} +{ 'arguments': { 'backing-file': 'image.base', 'device': 'disk2', 'image-n= ode-name': 'snp1' }, 'execute': 'change-backing-file' } {"return": {}} +{ 'arguments': { 'base': 'TEST_DIR/image.base', 'device': 'disk2' }, 'exec= ute': 'block-stream' } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk2"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk2"}} {"return": {}} diff --git a/tests/qemu-iotests/182.out b/tests/qemu-iotests/182.out index ffef23e32bc2..958454674dd9 100644 --- a/tests/qemu-iotests/182.out +++ b/tests/qemu-iotests/182.out @@ -8,17 +8,25 @@ Is another process using the image [TEST_DIR/t.qcow2]? =3D=3D=3D Testing reopen =3D=3D=3D +{'execute': 'qmp_capabilities'} {"return": {}} +{'execute': 'blockdev-add', 'arguments': { 'node-name': 'node0', 'driver':= 'file', 'filename': 'TEST_DIR/t.qcow2', 'locking': 'on' } } {"return": {}} +{'execute': 'blockdev-snapshot-sync', 'arguments': { 'node-name': 'node0',= 'snapshot-file': 'TEST_DIR/t.qcow2.overlay', 'snapshot-node-name': 'node1'= } } Formatting 'TEST_DIR/t.qcow2.overlay', fmt=3Dqcow2 size=3D197120 backing_f= ile=3DTEST_DIR/t.qcow2 backing_fmt=3Dfile cluster_size=3D65536 lazy_refcoun= ts=3Doff refcount_bits=3D16 {"return": {}} +{'execute': 'blockdev-add', 'arguments': { 'node-name': 'node1', 'driver':= 'file', 'filename': 'TEST_DIR/t.qcow2', 'locking': 'on' } } {"return": {}} +{'execute': 'nbd-server-start', 'arguments': { 'addr': { 'type': 'unix', '= data': { 'path': 'TEST_DIR/nbd.socket' } } } } {"return": {}} +{'execute': 'nbd-server-add', 'arguments': { 'device': 'node1' } } {"return": {}} =3D=3D=3D Testing failure to loosen restrictions =3D=3D=3D +{'execute': 'qmp_capabilities'} {"return": {}} +{'execute': 'quit'} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} *** done diff --git a/tests/qemu-iotests/183.out b/tests/qemu-iotests/183.out index 112cf31f8bd6..6d76b04d2ec6 100644 --- a/tests/qemu-iotests/183.out +++ b/tests/qemu-iotests/183.out @@ -4,37 +4,48 @@ Formatting 'TEST_DIR/t.IMGFMT.dest', fmt=3DIMGFMT size=3D= 67108864 =3D=3D=3D Starting VMs =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'qmp_capabilities' } {"return": {}} =3D=3D=3D Write something on the source =3D=3D=3D +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io disk "write -P 0x55 0 64k"' } } wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io disk "read -P 0x55 0 64k"' } } read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} =3D=3D=3D Do block migration to destination =3D=3D=3D +{ 'execute': 'migrate', 'arguments': { 'uri': 'unix:TEST_DIR/migrate', 'bl= k': true } } {"return": {}} +{ 'execute': 'query-status' } {"return": {"status": "postmigrate", "singlestep": false, "running": false= }} =3D=3D=3D Do some I/O on the destination =3D=3D=3D +{ 'execute': 'query-status' } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "RESUME"} {"return": {"status": "running", "singlestep": false, "running": true}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io disk "read -P 0x55 0 64k"' } } read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io disk "write -P 0x66 1M 64k"' } } wrote 65536/65536 bytes at offset 1048576 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} =3D=3D=3D Shut down and check image =3D=3D=3D +{"execute":"quit"} {"return": {}} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} diff --git a/tests/qemu-iotests/185.out b/tests/qemu-iotests/185.out index ddfbf3c76548..cd02614c4948 100644 --- a/tests/qemu-iotests/185.out +++ b/tests/qemu-iotests/185.out @@ -3,65 +3,83 @@ Formatting 'TEST_DIR/t.IMGFMT.base', fmt=3DIMGFMT size=3D= 67108864 =3D=3D=3D Starting VM =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} =3D=3D=3D Creating backing chain =3D=3D=3D +{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'disk', 's= napshot-file': 'TEST_DIR/t.qcow2.mid', 'format': 'qcow2', 'mode': 'absolute= -paths' } } Formatting 'TEST_DIR/t.qcow2.mid', fmt=3Dqcow2 size=3D67108864 backing_fil= e=3DTEST_DIR/t.qcow2.base backing_fmt=3Dqcow2 cluster_size=3D65536 lazy_ref= counts=3Doff refcount_bits=3D16 {"return": {}} +{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu= -io disk "write 0 4M"' } } wrote 4194304/4194304 bytes at offset 0 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} +{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'disk', 's= napshot-file': 'TEST_DIR/t.qcow2', 'format': 'qcow2', 'mode': 'absolute-pat= hs' } } Formatting 'TEST_DIR/t.qcow2', fmt=3Dqcow2 size=3D67108864 backing_file=3D= TEST_DIR/t.qcow2.mid backing_fmt=3Dqcow2 cluster_size=3D65536 lazy_refcount= s=3Doff refcount_bits=3D16 {"return": {}} =3D=3D=3D Start commit job and exit qemu =3D=3D=3D +{ 'execute': 'block-commit', 'arguments': { 'device': 'disk', 'base':'TEST= _DIR/t.qcow2.base', 'top': 'TEST_DIR/t.qcow2.mid', 'speed': 65536 } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 524288, "speed": 65536, "type": "commit"}} =3D=3D=3D Start active commit job and exit qemu =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'block-commit', 'arguments': { 'device': 'disk', 'base':'TEST= _DIR/t.qcow2.base', 'speed': 65536 } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset= ": 4194304, "speed": 65536, "type": "commit"}} =3D=3D=3D Start mirror job and exit qemu =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'drive-mirror', 'arguments': { 'device': 'disk', 'target': 'T= EST_DIR/t.qcow2.copy', 'format': 'qcow2', 'sync': 'full', 'speed': 65536 } } Formatting 'TEST_DIR/t.qcow2.copy', fmt=3Dqcow2 size=3D67108864 cluster_si= ze=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset= ": 4194304, "speed": 65536, "type": "mirror"}} =3D=3D=3D Start backup job and exit qemu =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'drive-backup', 'arguments': { 'device': 'disk', 'target': 'T= EST_DIR/t.qcow2.copy', 'format': 'qcow2', 'sync': 'full', 'speed': 65536 } } Formatting 'TEST_DIR/t.qcow2.copy', fmt=3Dqcow2 size=3D67108864 cluster_si= ze=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 65536, "speed": 65536, "type": "backup"}} =3D=3D=3D Start streaming job and exit qemu =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} +{ 'execute': 'block-stream', 'arguments': { 'device': 'disk', 'speed': 655= 36 } } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} +{ 'execute': 'quit' } {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 524288, "speed": 65536, "type": "stream"}} diff --git a/tests/qemu-iotests/191.out b/tests/qemu-iotests/191.out index 3fc92bb56e57..893df9d7fffa 100644 --- a/tests/qemu-iotests/191.out +++ b/tests/qemu-iotests/191.out @@ -8,6 +8,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D6710886= 4 backing_file=3DTEST_DIR/t Formatting 'TEST_DIR/t.IMGFMT.ovl2', fmt=3DIMGFMT size=3D67108864 backing_= file=3DTEST_DIR/t.IMGFMT.mid wrote 65536/65536 bytes at offset 1048576 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } { "return": { } @@ -15,6 +16,7 @@ wrote 65536/65536 bytes at offset 1048576 =3D=3D=3D Perform commit job =3D=3D=3D +{ 'execute': 'block-commit', 'arguments': { 'job-id': 'commit0', 'device':= 'top', 'base':'TEST_DIR/t.qcow2.base', 'top': 'TEST_DIR/t.qcow2.mid' } } { "timestamp": { "seconds": TIMESTAMP, @@ -102,6 +104,7 @@ wrote 65536/65536 bytes at offset 1048576 =3D=3D=3D Check that both top and top2 point to base now =3D=3D=3D +{ 'execute': 'query-named-block-nodes' } { "return": [ { @@ -378,6 +381,7 @@ wrote 65536/65536 bytes at offset 1048576 } ] } +{ 'execute': 'quit' } { "return": { } @@ -415,6 +419,7 @@ Formatting 'TEST_DIR/t.IMGFMT.ovl2', fmt=3DIMGFMT size= =3D67108864 backing_file=3DTEST_ Formatting 'TEST_DIR/t.IMGFMT.ovl3', fmt=3DIMGFMT size=3D67108864 backing_= file=3DTEST_DIR/t.IMGFMT.ovl2 wrote 65536/65536 bytes at offset 1048576 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{ 'execute': 'qmp_capabilities' } { "return": { } @@ -422,6 +427,7 @@ wrote 65536/65536 bytes at offset 1048576 =3D=3D=3D Perform commit job =3D=3D=3D +{ 'execute': 'block-commit', 'arguments': { 'job-id': 'commit0', 'device':= 'top', 'base':'TEST_DIR/t.qcow2.base', 'top': 'TEST_DIR/t.qcow2.mid' } } { "timestamp": { "seconds": TIMESTAMP, @@ -509,6 +515,7 @@ wrote 65536/65536 bytes at offset 1048576 =3D=3D=3D Check that both top and top2 point to base now =3D=3D=3D +{ 'execute': 'query-named-block-nodes' } { "return": [ { @@ -796,6 +803,7 @@ wrote 65536/65536 bytes at offset 1048576 } ] } +{ 'execute': 'quit' } { "return": { } diff --git a/tests/qemu-iotests/200.out b/tests/qemu-iotests/200.out index af6a809e309d..a6776070e4d6 100644 --- a/tests/qemu-iotests/200.out +++ b/tests/qemu-iotests/200.out @@ -6,6 +6,7 @@ wrote 314572800/314572800 bytes at offset 512 =3D=3D=3D Starting QEMU VM =3D=3D=3D +{ 'execute': 'qmp_capabilities' } {"return": {}} =3D=3D=3D Sending stream/cancel, checking for SIGSEGV only =3D=3D=3D diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223.out index 23b34fcd202e..8bfc5072ea9d 100644 --- a/tests/qemu-iotests/223.out +++ b/tests/qemu-iotests/223.out @@ -24,19 +24,32 @@ wrote 2097152/2097152 bytes at offset 2097152 =3D=3D=3D End dirty bitmaps, and start serving image over NBD =3D=3D=3D +{"execute":"qmp_capabilities"} {"return": {}} +{"execute":"blockdev-add", "arguments":{"driver":"qcow2", "node-name":"n",= "file":{"driver":"file", "filename":"TEST_DIR/t.qcow2"}}} {"return": {}} +{"execute":"x-blockdev-set-iothread", "arguments":{"node-name":"n", "iothr= ead":"io0"}} {"return": {}} +{"execute":"block-dirty-bitmap-disable", "arguments":{"node":"n", "name":"= b"}} {"return": {}} +{"execute":"nbd-server-add", "arguments":{"device":"n"}} {"error": {"class": "GenericError", "desc": "NBD server not running"}} +{"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":= {"path":"TEST_DIR/nbd"}}}} {"return": {}} +{"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":= {"path":"TEST_DIR/nbd1"}}}} {"error": {"class": "GenericError", "desc": "NBD server already running"}} exports available: 0 +{"execute":"nbd-server-add", "arguments":{"device":"n", "bitmap":"b"}} {"return": {}} +{"execute":"nbd-server-add", "arguments":{"device":"nosuch"}} {"error": {"class": "GenericError", "desc": "Cannot find device=3Dnosuch n= or node_name=3Dnosuch"}} +{"execute":"nbd-server-add", "arguments":{"device":"n"}} {"error": {"class": "GenericError", "desc": "NBD server already has export= named 'n'"}} +{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitm= ap":"b2"}} {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompati= ble with readonly export"}} +{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitm= ap":"b3"}} {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}} +{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writ= able":true, "bitmap":"b2"}} {"return": {}} exports available: 2 export: 'n' @@ -84,11 +97,17 @@ read 2097152/2097152 bytes at offset 2097152 =3D=3D=3D End qemu NBD server =3D=3D=3D +{"execute":"nbd-server-remove", "arguments":{"name":"n"}} {"return": {}} +{"execute":"nbd-server-remove", "arguments":{"name":"n2"}} {"return": {}} +{"execute":"nbd-server-remove", "arguments":{"name":"n2"}} {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}} +{"execute":"nbd-server-stop"} {"return": {}} +{"execute":"nbd-server-stop"} {"error": {"class": "GenericError", "desc": "NBD server not running"}} +{"execute":"quit"} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} diff --git a/tests/qemu-iotests/229.out b/tests/qemu-iotests/229.out index a3eb33788a6f..713b8dd899ea 100644 --- a/tests/qemu-iotests/229.out +++ b/tests/qemu-iotests/229.out @@ -3,10 +3,12 @@ Formatting 'TEST_DIR/b.IMGFMT', fmt=3DIMGFMT size=3D20971= 52 Formatting 'TEST_DIR/d.IMGFMT', fmt=3DIMGFMT size=3D1048576 wrote 2097152/2097152 bytes at offset 0 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +{'execute': 'qmp_capabilities'} {"return": {}} =3D=3D=3D Starting drive-mirror, causing error & stop =3D=3D=3D +{'execute': 'drive-mirror', 'arguments': {'device': 'testdisk', 'format': = 'qcow2', 'target': 'TEST_DIR/d.qcow2', 'sync': 'full', 'mode': 'existing', = 'on-source-error': 'stop', 'on-target-error': 'stop' }} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "testdisk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "testdisk"}} {"return": {}} @@ -15,6 +17,7 @@ wrote 2097152/2097152 bytes at offset 0 =3D=3D=3D Force cancel job paused in error state =3D=3D=3D +{'execute': 'block-job-cancel', 'arguments': { 'device': 'testdisk', 'forc= e': true}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "testdisk"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "testdisk"}} diff --git a/tests/qemu-iotests/249.out b/tests/qemu-iotests/249.out index 1c93164e84be..51307ed0f795 100644 --- a/tests/qemu-iotests/249.out +++ b/tests/qemu-iotests/249.out @@ -2,24 +2,29 @@ QA output created by 249 Formatting 'TEST_DIR/t.IMGFMT.base', fmt=3DIMGFMT size=3D1048576 Formatting 'TEST_DIR/t.IMGFMT.int', fmt=3DIMGFMT size=3D1048576 backing_fi= le=3DTEST_DIR/t.IMGFMT.base Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1048576 backing_file= =3DTEST_DIR/t.IMGFMT.int +{ 'execute': 'qmp_capabilities' } {"return": {}} =3D=3D=3D Send a write command to a drive opened in read-only mode (1) +{ 'execute': 'human-monitor-command', 'arguments': {'command-line': 'qemu-= io none0 "aio_write 0 2k"'}} {"return": "Block node is read-onlyrn"} =3D=3D=3D Run block-commit on base using an invalid filter node name +{ 'execute': 'block-commit', 'arguments': {'job-id': 'job0', 'device': 'no= ne1', 'top-node': 'int', 'filter-node-name': '1234'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} {"error": {"class": "GenericError", "desc": "Invalid node name"}} =3D=3D=3D Send a write command to a drive opened in read-only mode (2) +{ 'execute': 'human-monitor-command', 'arguments': {'command-line': 'qemu-= io none0 "aio_write 0 2k"'}} {"return": "Block node is read-onlyrn"} =3D=3D=3D Run block-commit on base using the default filter node name +{ 'execute': 'block-commit', 'arguments': {'job-id': 'job0', 'device': 'no= ne1', 'top-node': 'int'}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} {"return": {}} @@ -31,5 +36,6 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D10485= 76 backing_file=3DTEST_DIR/t. =3D=3D=3D Send a write command to a drive opened in read-only mode (3) +{ 'execute': 'human-monitor-command', 'arguments': {'command-line': 'qemu-= io none0 "aio_write 0 2k"'}} {"return": "Block node is read-onlyrn"} *** done --=20 2.21.0 From nobody Sun May 5 05:49:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571168228; cv=none; d=zoho.com; s=zohoarc; b=O8MgRszc0rDfPy80cx9QRm7gEQm8rYVY9spF/UIweTZyhXwLOqoq/NXrNQt11Brzvty/RVwTQlU1qu19ZI688EJ6wuVADpvlmOrdw3UcTbOEhpjFmFlCDIe3BGsLqpU/LU5VXcHKhR1FgbyPfH8sU/So2YvgKm42yTrZF86ITUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571168228; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SUroLTiRClA9A4OHt5jF5SchWErnzp3IqkgHOjUfYiQ=; b=C4WlbmnG5Y4N3EgC5m2XsgwaaQeD3HCVJpiGj+OjQ5Twrvv6ZU5GgI9cf5iBq+/xeOAoXzxsVLmd+4NMmPBIFTsL2HBx4FtbFZ8pAkh35yd0pogIugUqZQOGthonKAhIg2VMxL3fLuRiehl5LiXTree3mF1vgZTy0sSaX4w6hWM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571168228529212.38594617139756; Tue, 15 Oct 2019 12:37:08 -0700 (PDT) Received: from localhost ([::1]:57294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKSd0-00073S-DM for importer@patchew.org; Tue, 15 Oct 2019 15:37:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40787) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKSbB-0005TL-60 for qemu-devel@nongnu.org; Tue, 15 Oct 2019 15:35:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKSb9-0006Va-LD for qemu-devel@nongnu.org; Tue, 15 Oct 2019 15:35:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52654) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKSb6-0006Tj-HH; Tue, 15 Oct 2019 15:35:08 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9C4C83F3C; Tue, 15 Oct 2019 19:35:07 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-168.phx2.redhat.com [10.3.116.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44D9919C4F; Tue, 15 Oct 2019 19:35:07 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Subject: [PATCH v2 3/3] tests: More iotest 223 improvements Date: Tue, 15 Oct 2019 14:35:03 -0500 Message-Id: <20191015193503.25591-4-eblake@redhat.com> In-Reply-To: <20191015193503.25591-1-eblake@redhat.com> References: <20191015193503.25591-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 15 Oct 2019 19:35:07 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nir Soffer , Kevin Wolf , qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Run the core of the test twice, once without iothreads, and again with, for more coverage of both setups. Suggested-by: Nir Soffer Signed-off-by: Eric Blake Reviewed-by: Max Reitz --- tests/qemu-iotests/223 | 16 ++++++- tests/qemu-iotests/223.out | 85 +++++++++++++++++++++++++++++++++++++- 2 files changed, 97 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/223 b/tests/qemu-iotests/223 index 2ba3d8124b4f..8b43ddb02b2c 100755 --- a/tests/qemu-iotests/223 +++ b/tests/qemu-iotests/223 @@ -117,10 +117,19 @@ _send_qemu_cmd $QEMU_HANDLE '{"execute":"qmp_capabili= ties"}' "return" _send_qemu_cmd $QEMU_HANDLE '{"execute":"blockdev-add", "arguments":{"driver":"qcow2", "node-name":"n", "file":{"driver":"file", "filename":"'"$TEST_IMG"'"}}}' "return" -_send_qemu_cmd $QEMU_HANDLE '{"execute":"x-blockdev-set-iothread", - "arguments":{"node-name":"n", "iothread":"io0"}}' "return" _send_qemu_cmd $QEMU_HANDLE '{"execute":"block-dirty-bitmap-disable", "arguments":{"node":"n", "name":"b"}}' "return" + +for attempt in normal iothread; do + +echo +echo "=3D=3D=3D Set up NBD with $attempt access =3D=3D=3D" +echo +if [ $attempt =3D iothread ]; then +_send_qemu_cmd $QEMU_HANDLE '{"execute":"x-blockdev-set-iothread", + "arguments":{"node-name":"n", "iothread":"io0"}}' "return" +fi + _send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-add", "arguments":{"device":"n"}}' "error" # Attempt add without server _send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-start", @@ -180,6 +189,9 @@ _send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-rem= ove", "arguments":{"name":"n2"}}' "error" # Attempt duplicate clean _send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-stop"}' "return" _send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-stop"}' "error" # Again + +done + _send_qemu_cmd $QEMU_HANDLE '{"execute":"quit"}' "return" wait=3Dyes _cleanup_qemu diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223.out index 8bfc5072ea9d..ed543047956f 100644 --- a/tests/qemu-iotests/223.out +++ b/tests/qemu-iotests/223.out @@ -28,10 +28,91 @@ wrote 2097152/2097152 bytes at offset 2097152 {"return": {}} {"execute":"blockdev-add", "arguments":{"driver":"qcow2", "node-name":"n",= "file":{"driver":"file", "filename":"TEST_DIR/t.qcow2"}}} {"return": {}} -{"execute":"x-blockdev-set-iothread", "arguments":{"node-name":"n", "iothr= ead":"io0"}} -{"return": {}} {"execute":"block-dirty-bitmap-disable", "arguments":{"node":"n", "name":"= b"}} {"return": {}} + +=3D=3D=3D Set up NBD with normal access =3D=3D=3D + +{"execute":"nbd-server-add", "arguments":{"device":"n"}} +{"error": {"class": "GenericError", "desc": "NBD server not running"}} +{"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":= {"path":"TEST_DIR/nbd"}}}} +{"return": {}} +{"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":= {"path":"TEST_DIR/nbd1"}}}} +{"error": {"class": "GenericError", "desc": "NBD server already running"}} +exports available: 0 +{"execute":"nbd-server-add", "arguments":{"device":"n", "bitmap":"b"}} +{"return": {}} +{"execute":"nbd-server-add", "arguments":{"device":"nosuch"}} +{"error": {"class": "GenericError", "desc": "Cannot find device=3Dnosuch n= or node_name=3Dnosuch"}} +{"execute":"nbd-server-add", "arguments":{"device":"n"}} +{"error": {"class": "GenericError", "desc": "NBD server already has export= named 'n'"}} +{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitm= ap":"b2"}} +{"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompati= ble with readonly export"}} +{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitm= ap":"b3"}} +{"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}} +{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writ= able":true, "bitmap":"b2"}} +{"return": {}} +exports available: 2 + export: 'n' + size: 4194304 + flags: 0x58f ( readonly flush fua df multi cache ) + min block: 1 + opt block: 4096 + max block: 33554432 + available meta contexts: 2 + base:allocation + qemu:dirty-bitmap:b + export: 'n2' + size: 4194304 + flags: 0xced ( flush fua trim zeroes df cache fast-zero ) + min block: 1 + opt block: 4096 + max block: 33554432 + available meta contexts: 2 + base:allocation + qemu:dirty-bitmap:b2 + +=3D=3D=3D Contrast normal status to large granularity dirty-bitmap =3D=3D= =3D + +read 512/512 bytes at offset 512 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 524288/524288 bytes at offset 524288 +512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 1048576/1048576 bytes at offset 1048576 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 2097152/2097152 bytes at offset 2097152 +2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "o= ffset": OFFSET}, +{ "start": 4096, "length": 1044480, "depth": 0, "zero": true, "data": fals= e, "offset": OFFSET}, +{ "start": 1048576, "length": 3145728, "depth": 0, "zero": false, "data": = true, "offset": OFFSET}] +[{ "start": 0, "length": 65536, "depth": 0, "zero": false, "data": false}, +{ "start": 65536, "length": 2031616, "depth": 0, "zero": false, "data": tr= ue, "offset": OFFSET}, +{ "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": = false}] + +=3D=3D=3D Contrast to small granularity dirty-bitmap =3D=3D=3D + +[{ "start": 0, "length": 512, "depth": 0, "zero": false, "data": true, "of= fset": OFFSET}, +{ "start": 512, "length": 512, "depth": 0, "zero": false, "data": false}, +{ "start": 1024, "length": 2096128, "depth": 0, "zero": false, "data": tru= e, "offset": OFFSET}, +{ "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": = false}] + +=3D=3D=3D End qemu NBD server =3D=3D=3D + +{"execute":"nbd-server-remove", "arguments":{"name":"n"}} +{"return": {}} +{"execute":"nbd-server-remove", "arguments":{"name":"n2"}} +{"return": {}} +{"execute":"nbd-server-remove", "arguments":{"name":"n2"}} +{"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}} +{"execute":"nbd-server-stop"} +{"return": {}} +{"execute":"nbd-server-stop"} +{"error": {"class": "GenericError", "desc": "NBD server not running"}} + +=3D=3D=3D Set up NBD with iothread access =3D=3D=3D + +{"execute":"x-blockdev-set-iothread", "arguments":{"node-name":"n", "iothr= ead":"io0"}} +{"return": {}} {"execute":"nbd-server-add", "arguments":{"device":"n"}} {"error": {"class": "GenericError", "desc": "NBD server not running"}} {"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":= {"path":"TEST_DIR/nbd"}}}} --=20 2.21.0