{"id":818227,"url":"http://patchwork.ozlabs.org/api/patches/818227/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170925122808.14561-5-kwolf@redhat.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170925122808.14561-5-kwolf@redhat.com>","list_archive_url":null,"date":"2017-09-25T12:28:07","name":"[4/5] qemu-iotests: Test commit block job where top has two parents","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"b3ef53c1a86f2755ee57e58dc5be17248adf4bbc","submitter":{"id":2714,"url":"http://patchwork.ozlabs.org/api/people/2714/?format=json","name":"Kevin Wolf","email":"kwolf@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170925122808.14561-5-kwolf@redhat.com/mbox/","series":[{"id":4949,"url":"http://patchwork.ozlabs.org/api/series/4949/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=4949","date":"2017-09-25T12:28:05","name":"commit: Support multiple roots above top node","version":1,"mbox":"http://patchwork.ozlabs.org/series/4949/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/818227/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/818227/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=kwolf@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y13R54NwPz9tX3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 22:33:36 +1000 (AEST)","from localhost ([::1]:42280 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwSZq-0000EH-PE\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 08:33:34 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:47314)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <kwolf@redhat.com>) id 1dwSUw-0003k0-PU\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 08:28:33 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <kwolf@redhat.com>) id 1dwSUr-00067t-Un\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 08:28:30 -0400","from mx1.redhat.com ([209.132.183.28]:46302)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <kwolf@redhat.com>)\n\tid 1dwSUl-000642-M7; Mon, 25 Sep 2017 08:28:20 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id BC47D7E42A;\n\tMon, 25 Sep 2017 12:28:18 +0000 (UTC)","from localhost.localdomain.com (ovpn-116-119.ams2.redhat.com\n\t[10.36.116.119])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 2ECAF709F2;\n\tMon, 25 Sep 2017 12:28:17 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com BC47D7E42A","From":"Kevin Wolf <kwolf@redhat.com>","To":"qemu-block@nongnu.org","Date":"Mon, 25 Sep 2017 14:28:07 +0200","Message-Id":"<20170925122808.14561-5-kwolf@redhat.com>","In-Reply-To":"<20170925122808.14561-1-kwolf@redhat.com>","References":"<20170925122808.14561-1-kwolf@redhat.com>","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tMon, 25 Sep 2017 12:28:18 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"[Qemu-devel] [PATCH 4/5] qemu-iotests: Test commit block job where\n\ttop has two parents","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"Signed-off-by: Kevin Wolf <kwolf@redhat.com>\n---\n tests/qemu-iotests/191     | 152 +++++++++\n tests/qemu-iotests/191.out | 827 +++++++++++++++++++++++++++++++++++++++++++++\n tests/qemu-iotests/group   |   1 +\n 3 files changed, 980 insertions(+)\n create mode 100755 tests/qemu-iotests/191\n create mode 100644 tests/qemu-iotests/191.out","diff":"diff --git a/tests/qemu-iotests/191 b/tests/qemu-iotests/191\nnew file mode 100755\nindex 0000000000..a4e0d691fa\n--- /dev/null\n+++ b/tests/qemu-iotests/191\n@@ -0,0 +1,152 @@\n+#!/bin/bash\n+#\n+# Test commit block job where top has two parents\n+#\n+# Copyright (C) 2017 Red Hat, Inc.\n+#\n+# This program is free software; you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation; either version 2 of the License, or\n+# (at your option) any later version.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+#\n+\n+# creator\n+owner=kwolf@redhat.com\n+\n+seq=`basename $0`\n+echo \"QA output created by $seq\"\n+\n+here=`pwd`\n+status=1 # failure is the default!\n+\n+MIG_SOCKET=\"${TEST_DIR}/migrate\"\n+\n+_cleanup()\n+{\n+    rm -f \"${TEST_IMG}.mid\"\n+    rm -f \"${TEST_IMG}.ovl2\"\n+    rm -f \"${TEST_IMG}.ovl3\"\n+    _cleanup_test_img\n+    _cleanup_qemu\n+}\n+trap \"_cleanup; exit \\$status\" 0 1 2 3 15\n+\n+# get standard environment, filters and checks\n+. ./common.rc\n+. ./common.filter\n+. ./common.qemu\n+\n+_supported_fmt qcow2\n+_supported_proto file\n+_supported_os Linux\n+\n+size=64M\n+\n+echo\n+echo === Preparing and starting VM ===\n+echo\n+\n+TEST_IMG=\"${TEST_IMG}.base\" _make_test_img $size\n+TEST_IMG=\"${TEST_IMG}.mid\" _make_test_img -b \"${TEST_IMG}.base\"\n+_make_test_img -b \"${TEST_IMG}.mid\"\n+TEST_IMG=\"${TEST_IMG}.ovl2\" _make_test_img -b \"${TEST_IMG}.mid\"\n+\n+$QEMU_IO -c 'write -P 0x55 1M 64k' \"${TEST_IMG}.mid\" | _filter_qemu_io\n+\n+qemu_comm_method=\"qmp\"\n+qmp_pretty=\"y\"\n+\n+_launch_qemu \\\n+    -blockdev \"driver=${IMGFMT},file.driver=file,file.filename=${TEST_IMG}.base,node-name=base\" \\\n+    -blockdev \"driver=${IMGFMT},file.driver=file,file.filename=${TEST_IMG}.mid,node-name=mid,backing=base\" \\\n+    -blockdev \"driver=${IMGFMT},file.driver=file,file.filename=${TEST_IMG},node-name=top,backing=mid\" \\\n+    -blockdev \"driver=${IMGFMT},file.driver=file,file.filename=${TEST_IMG}.ovl2,node-name=top2,backing=mid\"\n+h=$QEMU_HANDLE\n+_send_qemu_cmd $h \"{ 'execute': 'qmp_capabilities' }\" '^}'\n+\n+echo\n+echo === Perform commit job ===\n+echo\n+\n+_send_qemu_cmd $h \\\n+    \"{ 'execute': 'block-commit',\n+       'arguments': { 'job-id': 'commit0',\n+                      'device': 'top',\n+                      'base':'$TEST_IMG.base',\n+                      'top': '$TEST_IMG.mid' } }\" \\\n+    \"BLOCK_JOB_COMPLETED\"\n+_send_qemu_cmd $h \"\" \"^}\"\n+\n+echo\n+echo === Check that both top and top2 point to base now ===\n+echo\n+\n+_send_qemu_cmd $h \"{ 'execute': 'query-named-block-nodes' }\" \"^}\" |\n+    _filter_generated_node_ids\n+\n+_send_qemu_cmd $h \"{ 'execute': 'quit' }\" \"^}\"\n+wait=1 _cleanup_qemu\n+\n+_img_info\n+TEST_IMG=\"$TEST_IMG.ovl2\" _img_info\n+\n+\n+echo\n+echo === Preparing and starting VM with -drive ===\n+echo\n+\n+TEST_IMG=\"${TEST_IMG}.base\" _make_test_img $size\n+TEST_IMG=\"${TEST_IMG}.mid\" _make_test_img -b \"${TEST_IMG}.base\"\n+_make_test_img -b \"${TEST_IMG}.mid\"\n+TEST_IMG=\"${TEST_IMG}.ovl2\" _make_test_img -b \"${TEST_IMG}.mid\"\n+TEST_IMG=\"${TEST_IMG}.ovl3\" _make_test_img -b \"${TEST_IMG}.ovl2\"\n+\n+$QEMU_IO -c 'write -P 0x55 1M 64k' \"${TEST_IMG}.mid\" | _filter_qemu_io\n+\n+qemu_comm_method=\"qmp\"\n+qmp_pretty=\"y\"\n+\n+_launch_qemu \\\n+    -drive \"driver=${IMGFMT},file=${TEST_IMG},node-name=top,backing.node-name=mid\" \\\n+    -drive \"driver=${IMGFMT},file=${TEST_IMG}.ovl3,node-name=top2,backing.backing=mid\"\n+h=$QEMU_HANDLE\n+_send_qemu_cmd $h \"{ 'execute': 'qmp_capabilities' }\" '^}'\n+\n+echo\n+echo === Perform commit job ===\n+echo\n+\n+_send_qemu_cmd $h \\\n+    \"{ 'execute': 'block-commit',\n+       'arguments': { 'job-id': 'commit0',\n+                      'device': 'top',\n+                      'base':'$TEST_IMG.base',\n+                      'top': '$TEST_IMG.mid' } }\" \\\n+    \"BLOCK_JOB_COMPLETED\"\n+_send_qemu_cmd $h \"\" \"^}\"\n+\n+echo\n+echo === Check that both top and top2 point to base now ===\n+echo\n+\n+_send_qemu_cmd $h \"{ 'execute': 'query-named-block-nodes' }\" \"^}\" |\n+    _filter_generated_node_ids\n+\n+_send_qemu_cmd $h \"{ 'execute': 'quit' }\" \"^}\"\n+wait=1 _cleanup_qemu\n+\n+_img_info\n+TEST_IMG=\"$TEST_IMG.ovl2\" _img_info\n+\n+# success, all done\n+echo \"*** done\"\n+rm -f $seq.full\n+status=0\ndiff --git a/tests/qemu-iotests/191.out b/tests/qemu-iotests/191.out\nnew file mode 100644\nindex 0000000000..7bfcd2d5d8\n--- /dev/null\n+++ b/tests/qemu-iotests/191.out\n@@ -0,0 +1,827 @@\n+QA output created by 191\n+\n+=== Preparing and starting VM ===\n+\n+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864\n+Formatting 'TEST_DIR/t.IMGFMT.mid', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base\n+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.mid\n+Formatting 'TEST_DIR/t.IMGFMT.ovl2', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.mid\n+wrote 65536/65536 bytes at offset 1048576\n+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+{\n+    \"return\": {\n+    }\n+}\n+\n+=== Perform commit job ===\n+\n+{\n+    \"return\": {\n+    }\n+}\n+{\n+    \"timestamp\": {\n+        \"seconds\":  TIMESTAMP,\n+        \"microseconds\":  TIMESTAMP\n+    },\n+    \"event\": \"BLOCK_JOB_COMPLETED\",\n+    \"data\": {\n+        \"device\": \"commit0\",\n+        \"len\": 67108864,\n+        \"offset\": 67108864,\n+        \"speed\": 0,\n+        \"type\": \"commit\"\n+    }\n+}\n+\n+=== Check that both top and top2 point to base now ===\n+\n+{\n+    \"return\": [\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"backing-image\": {\n+                    \"virtual-size\": 67108864,\n+                    \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                    \"cluster-size\": 65536,\n+                    \"format\": \"qcow2\",\n+                    \"actual-size\": 397312,\n+                    \"format-specific\": {\n+                        \"type\": \"qcow2\",\n+                        \"data\": {\n+                            \"compat\": \"1.1\",\n+                            \"lazy-refcounts\": false,\n+                            \"refcount-bits\": 16,\n+                            \"corrupt\": false\n+                        }\n+                    },\n+                    \"dirty-flag\": false\n+                },\n+                \"backing-filename-format\": \"qcow2\",\n+                \"virtual-size\": 67108864,\n+                \"filename\": \"TEST_DIR/t.qcow2.ovl2\",\n+                \"cluster-size\": 65536,\n+                \"format\": \"qcow2\",\n+                \"actual-size\": 200704,\n+                \"format-specific\": {\n+                    \"type\": \"qcow2\",\n+                    \"data\": {\n+                        \"compat\": \"1.1\",\n+                        \"lazy-refcounts\": false,\n+                        \"refcount-bits\": 16,\n+                        \"corrupt\": false\n+                    }\n+                },\n+                \"full-backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"top2\",\n+            \"backing_file_depth\": 1,\n+            \"drv\": \"qcow2\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"backing_file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.ovl2\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 197120,\n+                \"filename\": \"TEST_DIR/t.qcow2.ovl2\",\n+                \"format\": \"file\",\n+                \"actual-size\": 200704,\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"file\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.ovl2\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"backing-image\": {\n+                    \"virtual-size\": 67108864,\n+                    \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                    \"cluster-size\": 65536,\n+                    \"format\": \"qcow2\",\n+                    \"actual-size\": 397312,\n+                    \"format-specific\": {\n+                        \"type\": \"qcow2\",\n+                        \"data\": {\n+                            \"compat\": \"1.1\",\n+                            \"lazy-refcounts\": false,\n+                            \"refcount-bits\": 16,\n+                            \"corrupt\": false\n+                        }\n+                    },\n+                    \"dirty-flag\": false\n+                },\n+                \"backing-filename-format\": \"qcow2\",\n+                \"virtual-size\": 67108864,\n+                \"filename\": \"TEST_DIR/t.qcow2\",\n+                \"cluster-size\": 65536,\n+                \"format\": \"qcow2\",\n+                \"actual-size\": 200704,\n+                \"format-specific\": {\n+                    \"type\": \"qcow2\",\n+                    \"data\": {\n+                        \"compat\": \"1.1\",\n+                        \"lazy-refcounts\": false,\n+                        \"refcount-bits\": 16,\n+                        \"corrupt\": false\n+                    }\n+                },\n+                \"full-backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"top\",\n+            \"backing_file_depth\": 1,\n+            \"drv\": \"qcow2\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"backing_file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 197120,\n+                \"filename\": \"TEST_DIR/t.qcow2\",\n+                \"format\": \"file\",\n+                \"actual-size\": 200704,\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"file\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"backing-image\": {\n+                    \"virtual-size\": 67108864,\n+                    \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                    \"cluster-size\": 65536,\n+                    \"format\": \"qcow2\",\n+                    \"actual-size\": 397312,\n+                    \"format-specific\": {\n+                        \"type\": \"qcow2\",\n+                        \"data\": {\n+                            \"compat\": \"1.1\",\n+                            \"lazy-refcounts\": false,\n+                            \"refcount-bits\": 16,\n+                            \"corrupt\": false\n+                        }\n+                    },\n+                    \"dirty-flag\": false\n+                },\n+                \"backing-filename-format\": \"qcow2\",\n+                \"virtual-size\": 67108864,\n+                \"filename\": \"TEST_DIR/t.qcow2.mid\",\n+                \"cluster-size\": 65536,\n+                \"format\": \"qcow2\",\n+                \"actual-size\": 397312,\n+                \"format-specific\": {\n+                    \"type\": \"qcow2\",\n+                    \"data\": {\n+                        \"compat\": \"1.1\",\n+                        \"lazy-refcounts\": false,\n+                        \"refcount-bits\": 16,\n+                        \"corrupt\": false\n+                    }\n+                },\n+                \"full-backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"mid\",\n+            \"backing_file_depth\": 1,\n+            \"drv\": \"qcow2\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"backing_file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.mid\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 393216,\n+                \"filename\": \"TEST_DIR/t.qcow2.mid\",\n+                \"format\": \"file\",\n+                \"actual-size\": 397312,\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"file\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.mid\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 67108864,\n+                \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"cluster-size\": 65536,\n+                \"format\": \"qcow2\",\n+                \"actual-size\": 397312,\n+                \"format-specific\": {\n+                    \"type\": \"qcow2\",\n+                    \"data\": {\n+                        \"compat\": \"1.1\",\n+                        \"lazy-refcounts\": false,\n+                        \"refcount-bits\": 16,\n+                        \"corrupt\": false\n+                    }\n+                },\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"base\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"qcow2\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 393216,\n+                \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"format\": \"file\",\n+                \"actual-size\": 397312,\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"file\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encryption_key_missing\": false\n+        }\n+    ]\n+}\n+{\n+    \"return\": {\n+    }\n+}\n+{\n+    \"timestamp\": {\n+        \"seconds\":  TIMESTAMP,\n+        \"microseconds\":  TIMESTAMP\n+    },\n+    \"event\": \"SHUTDOWN\",\n+    \"data\": {\n+        \"guest\": false\n+    }\n+}\n+image: TEST_DIR/t.IMGFMT\n+file format: IMGFMT\n+virtual size: 64M (67108864 bytes)\n+cluster_size: 65536\n+backing file: TEST_DIR/t.IMGFMT.base\n+backing file format: IMGFMT\n+image: TEST_DIR/t.IMGFMT.ovl2\n+file format: IMGFMT\n+virtual size: 64M (67108864 bytes)\n+cluster_size: 65536\n+backing file: TEST_DIR/t.IMGFMT.base\n+backing file format: IMGFMT\n+\n+=== Preparing and starting VM with -drive ===\n+\n+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864\n+Formatting 'TEST_DIR/t.IMGFMT.mid', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base\n+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.mid\n+Formatting 'TEST_DIR/t.IMGFMT.ovl2', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.mid\n+Formatting 'TEST_DIR/t.IMGFMT.ovl3', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.ovl2\n+wrote 65536/65536 bytes at offset 1048576\n+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+{\n+    \"return\": {\n+    }\n+}\n+\n+=== Perform commit job ===\n+\n+{\n+    \"return\": {\n+    }\n+}\n+{\n+    \"timestamp\": {\n+        \"seconds\":  TIMESTAMP,\n+        \"microseconds\":  TIMESTAMP\n+    },\n+    \"event\": \"BLOCK_JOB_COMPLETED\",\n+    \"data\": {\n+        \"device\": \"commit0\",\n+        \"len\": 67108864,\n+        \"offset\": 67108864,\n+        \"speed\": 0,\n+        \"type\": \"commit\"\n+    }\n+}\n+\n+=== Check that both top and top2 point to base now ===\n+\n+{\n+    \"return\": [\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"backing-image\": {\n+                    \"virtual-size\": 67108864,\n+                    \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                    \"cluster-size\": 65536,\n+                    \"format\": \"qcow2\",\n+                    \"actual-size\": 397312,\n+                    \"format-specific\": {\n+                        \"type\": \"qcow2\",\n+                        \"data\": {\n+                            \"compat\": \"1.1\",\n+                            \"lazy-refcounts\": false,\n+                            \"refcount-bits\": 16,\n+                            \"corrupt\": false\n+                        }\n+                    },\n+                    \"dirty-flag\": false\n+                },\n+                \"backing-filename-format\": \"qcow2\",\n+                \"virtual-size\": 67108864,\n+                \"filename\": \"TEST_DIR/t.qcow2.ovl2\",\n+                \"cluster-size\": 65536,\n+                \"format\": \"qcow2\",\n+                \"actual-size\": 200704,\n+                \"format-specific\": {\n+                    \"type\": \"qcow2\",\n+                    \"data\": {\n+                        \"compat\": \"1.1\",\n+                        \"lazy-refcounts\": false,\n+                        \"refcount-bits\": 16,\n+                        \"corrupt\": false\n+                    }\n+                },\n+                \"full-backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": true,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 1,\n+            \"drv\": \"qcow2\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"backing_file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.ovl2\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 197120,\n+                \"filename\": \"TEST_DIR/t.qcow2.ovl2\",\n+                \"format\": \"file\",\n+                \"actual-size\": 200704,\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": true,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"file\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.ovl2\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"backing-image\": {\n+                    \"backing-image\": {\n+                        \"virtual-size\": 67108864,\n+                        \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                        \"cluster-size\": 65536,\n+                        \"format\": \"qcow2\",\n+                        \"actual-size\": 397312,\n+                        \"format-specific\": {\n+                            \"type\": \"qcow2\",\n+                            \"data\": {\n+                                \"compat\": \"1.1\",\n+                                \"lazy-refcounts\": false,\n+                                \"refcount-bits\": 16,\n+                                \"corrupt\": false\n+                            }\n+                        },\n+                        \"dirty-flag\": false\n+                    },\n+                    \"backing-filename-format\": \"qcow2\",\n+                    \"virtual-size\": 67108864,\n+                    \"filename\": \"TEST_DIR/t.qcow2.ovl2\",\n+                    \"cluster-size\": 65536,\n+                    \"format\": \"qcow2\",\n+                    \"actual-size\": 200704,\n+                    \"format-specific\": {\n+                        \"type\": \"qcow2\",\n+                        \"data\": {\n+                            \"compat\": \"1.1\",\n+                            \"lazy-refcounts\": false,\n+                            \"refcount-bits\": 16,\n+                            \"corrupt\": false\n+                        }\n+                    },\n+                    \"full-backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                    \"backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                    \"dirty-flag\": false\n+                },\n+                \"backing-filename-format\": \"qcow2\",\n+                \"virtual-size\": 67108864,\n+                \"filename\": \"TEST_DIR/t.qcow2.ovl3\",\n+                \"cluster-size\": 65536,\n+                \"format\": \"qcow2\",\n+                \"actual-size\": 200704,\n+                \"format-specific\": {\n+                    \"type\": \"qcow2\",\n+                    \"data\": {\n+                        \"compat\": \"1.1\",\n+                        \"lazy-refcounts\": false,\n+                        \"refcount-bits\": 16,\n+                        \"corrupt\": false\n+                    }\n+                },\n+                \"full-backing-filename\": \"TEST_DIR/t.qcow2.ovl2\",\n+                \"backing-filename\": \"TEST_DIR/t.qcow2.ovl2\",\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"top2\",\n+            \"backing_file_depth\": 2,\n+            \"drv\": \"qcow2\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"backing_file\": \"TEST_DIR/t.qcow2.ovl2\",\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.ovl3\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 197120,\n+                \"filename\": \"TEST_DIR/t.qcow2.ovl3\",\n+                \"format\": \"file\",\n+                \"actual-size\": 200704,\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"file\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.ovl3\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 67108864,\n+                \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"cluster-size\": 65536,\n+                \"format\": \"qcow2\",\n+                \"actual-size\": 397312,\n+                \"format-specific\": {\n+                    \"type\": \"qcow2\",\n+                    \"data\": {\n+                        \"compat\": \"1.1\",\n+                        \"lazy-refcounts\": false,\n+                        \"refcount-bits\": 16,\n+                        \"corrupt\": false\n+                    }\n+                },\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": true,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"qcow2\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 393216,\n+                \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"format\": \"file\",\n+                \"actual-size\": 397312,\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": true,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"file\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"backing-image\": {\n+                    \"virtual-size\": 67108864,\n+                    \"filename\": \"TEST_DIR/t.qcow2.base\",\n+                    \"cluster-size\": 65536,\n+                    \"format\": \"qcow2\",\n+                    \"actual-size\": 397312,\n+                    \"format-specific\": {\n+                        \"type\": \"qcow2\",\n+                        \"data\": {\n+                            \"compat\": \"1.1\",\n+                            \"lazy-refcounts\": false,\n+                            \"refcount-bits\": 16,\n+                            \"corrupt\": false\n+                        }\n+                    },\n+                    \"dirty-flag\": false\n+                },\n+                \"backing-filename-format\": \"qcow2\",\n+                \"virtual-size\": 67108864,\n+                \"filename\": \"TEST_DIR/t.qcow2\",\n+                \"cluster-size\": 65536,\n+                \"format\": \"qcow2\",\n+                \"actual-size\": 200704,\n+                \"format-specific\": {\n+                    \"type\": \"qcow2\",\n+                    \"data\": {\n+                        \"compat\": \"1.1\",\n+                        \"lazy-refcounts\": false,\n+                        \"refcount-bits\": 16,\n+                        \"corrupt\": false\n+                    }\n+                },\n+                \"full-backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"backing-filename\": \"TEST_DIR/t.qcow2.base\",\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"top\",\n+            \"backing_file_depth\": 1,\n+            \"drv\": \"qcow2\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"backing_file\": \"TEST_DIR/t.qcow2.base\",\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2\",\n+            \"encryption_key_missing\": false\n+        },\n+        {\n+            \"iops_rd\": 0,\n+            \"detect_zeroes\": \"off\",\n+            \"image\": {\n+                \"virtual-size\": 197120,\n+                \"filename\": \"TEST_DIR/t.qcow2\",\n+                \"format\": \"file\",\n+                \"actual-size\": 200704,\n+                \"dirty-flag\": false\n+            },\n+            \"iops_wr\": 0,\n+            \"ro\": false,\n+            \"node-name\": \"NODE_NAME\",\n+            \"backing_file_depth\": 0,\n+            \"drv\": \"file\",\n+            \"iops\": 0,\n+            \"bps_wr\": 0,\n+            \"write_threshold\": 0,\n+            \"encrypted\": false,\n+            \"bps\": 0,\n+            \"bps_rd\": 0,\n+            \"cache\": {\n+                \"no-flush\": false,\n+                \"direct\": false,\n+                \"writeback\": true\n+            },\n+            \"file\": \"TEST_DIR/t.qcow2\",\n+            \"encryption_key_missing\": false\n+        }\n+    ]\n+}\n+{\n+    \"return\": {\n+    }\n+}\n+{\n+    \"timestamp\": {\n+        \"seconds\":  TIMESTAMP,\n+        \"microseconds\":  TIMESTAMP\n+    },\n+    \"event\": \"SHUTDOWN\",\n+    \"data\": {\n+        \"guest\": false\n+    }\n+}\n+image: TEST_DIR/t.IMGFMT\n+file format: IMGFMT\n+virtual size: 64M (67108864 bytes)\n+cluster_size: 65536\n+backing file: TEST_DIR/t.IMGFMT.base\n+backing file format: IMGFMT\n+image: TEST_DIR/t.IMGFMT.ovl2\n+file format: IMGFMT\n+virtual size: 64M (67108864 bytes)\n+cluster_size: 65536\n+backing file: TEST_DIR/t.IMGFMT.base\n+backing file format: IMGFMT\n+*** done\ndiff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group\nindex 108339cd03..63d4ee052c 100644\n--- a/tests/qemu-iotests/group\n+++ b/tests/qemu-iotests/group\n@@ -187,6 +187,7 @@\n 188 rw auto quick\n 189 rw auto\n 190 rw auto quick\n+191 rw auto\n 192 rw auto quick\n 194 rw auto migration quick\n 195 rw auto quick\n","prefixes":["4/5"]}