Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814340/?format=api
{ "id": 814340, "url": "http://patchwork.ozlabs.org/api/patches/814340/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170915170204.14023-1-kwolf@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "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": "<20170915170204.14023-1-kwolf@redhat.com>", "list_archive_url": null, "date": "2017-09-15T17:02:04", "name": "[7/6] qemu-iotests: Test change-backing-file command", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "b435018254a9c0b1358168bcc4915aec7ddaef53", "submitter": { "id": 2714, "url": "http://patchwork.ozlabs.org/api/people/2714/?format=api", "name": "Kevin Wolf", "email": "kwolf@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170915170204.14023-1-kwolf@redhat.com/mbox/", "series": [ { "id": 3264, "url": "http://patchwork.ozlabs.org/api/series/3264/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=3264", "date": "2017-09-15T10:10:02", "name": "block: Fix permissions after ro/rw reopen", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/3264/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814340/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814340/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-mx05.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx05.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 3xv2090c08z9s7m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 03:07:53 +1000 (AEST)", "from localhost ([::1]:54322 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 1dsu5n-0004Sa-7J\n\tfor incoming@patchwork.ozlabs.org; Fri, 15 Sep 2017 13:07:51 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:51141)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <kwolf@redhat.com>) id 1dsu0Y-0000Sn-Ih\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 13:02:28 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <kwolf@redhat.com>) id 1dsu0V-0005yR-Ew\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 13:02:26 -0400", "from mx1.redhat.com ([209.132.183.28]:56404)\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 1dsu0L-0005oF-Pc; Fri, 15 Sep 2017 13:02:14 -0400", "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\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 A76BA52779;\n\tFri, 15 Sep 2017 17:02:12 +0000 (UTC)", "from localhost.localdomain.com (ovpn-117-157.ams2.redhat.com\n\t[10.36.117.157])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 9E6B417CDD;\n\tFri, 15 Sep 2017 17:02:08 +0000 (UTC)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com A76BA52779", "From": "Kevin Wolf <kwolf@redhat.com>", "To": "qemu-block@nongnu.org", "Date": "Fri, 15 Sep 2017 19:02:04 +0200", "Message-Id": "<20170915170204.14023-1-kwolf@redhat.com>", "In-Reply-To": "<20170915101008.16646-1-kwolf@redhat.com>", "References": "<20170915101008.16646-1-kwolf@redhat.com>", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]);\n\tFri, 15 Sep 2017 17:02:12 +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 7/6] qemu-iotests: Test change-backing-file\n\tcommand", "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, famz@redhat.com, qemu-devel@nongnu.org,\n\tmreitz@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": "This involves a temporary read-write reopen if the backing file link in\nthe middle of a backing file chain should be changed and is therefore a\ngood test for the latest bdrv_reopen() vs. op blockers fixes.\n\nSigned-off-by: Kevin Wolf <kwolf@redhat.com>\n---\n\nI actually managed to find a simple case that reproduces the bug that\nis fixed in this series, but outside of my commit job improvements that\noriginally led me to this work.\n\n tests/qemu-iotests/195 | 92 ++++++++++++++++++++++++++++++++++++++++++++++\n tests/qemu-iotests/195.out | 78 +++++++++++++++++++++++++++++++++++++++\n tests/qemu-iotests/group | 1 +\n 3 files changed, 171 insertions(+)\n create mode 100755 tests/qemu-iotests/195\n create mode 100644 tests/qemu-iotests/195.out", "diff": "diff --git a/tests/qemu-iotests/195 b/tests/qemu-iotests/195\nnew file mode 100755\nindex 0000000000..05a239cbf5\n--- /dev/null\n+++ b/tests/qemu-iotests/195\n@@ -0,0 +1,92 @@\n+#!/bin/bash\n+#\n+# Test change-backing-file command\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+_cleanup()\n+{\n+ _cleanup_test_img\n+ rm -f \"$TEST_IMG.mid\"\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+\n+_supported_fmt qcow2\n+_supported_proto file\n+_supported_os Linux\n+\n+function do_run_qemu()\n+{\n+ echo Testing: \"$@\" | _filter_imgfmt\n+ $QEMU -nographic -qmp-pretty stdio -serial none \"$@\"\n+ echo\n+}\n+\n+function run_qemu()\n+{\n+ do_run_qemu \"$@\" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp \\\n+ | _filter_qemu_io | _filter_generated_node_ids\n+}\n+\n+size=64M\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+\n+echo\n+echo \"Change backing file of mid (opened read-only)\"\n+echo\n+\n+run_qemu -drive if=none,file=\"$TEST_IMG\",backing.node-name=mid <<EOF\n+{\"execute\":\"qmp_capabilities\"}\n+{\"execute\":\"change-backing-file\", \"arguments\":{\"device\":\"none0\",\"image-node-name\":\"mid\",\"backing-file\":\"/dev/null\"}}\n+{\"execute\":\"quit\"}\n+EOF\n+\n+TEST_IMG=\"$TEST_IMG.mid\" _img_info\n+\n+echo\n+echo \"Change backing file of top (opened writable)\"\n+echo\n+\n+TEST_IMG=\"$TEST_IMG.mid\" _make_test_img -b \"$TEST_IMG.base\"\n+\n+run_qemu -drive if=none,file=\"$TEST_IMG\",node-name=top <<EOF\n+{\"execute\":\"qmp_capabilities\"}\n+{\"execute\":\"change-backing-file\", \"arguments\":{\"device\":\"none0\",\"image-node-name\":\"top\",\"backing-file\":\"/dev/null\"}}\n+{\"execute\":\"quit\"}\n+EOF\n+\n+_img_info\n+\n+# success, all done\n+echo \"*** done\"\n+rm -f $seq.full\n+status=0\ndiff --git a/tests/qemu-iotests/195.out b/tests/qemu-iotests/195.out\nnew file mode 100644\nindex 0000000000..7613575c64\n--- /dev/null\n+++ b/tests/qemu-iotests/195.out\n@@ -0,0 +1,78 @@\n+QA output created by 195\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+\n+Change backing file of mid (opened read-only)\n+\n+Testing: -drive if=none,file=TEST_DIR/t.IMGFMT,backing.node-name=mid\n+{\n+ QMP_VERSION\n+}\n+{\n+ \"return\": {\n+ }\n+}\n+{\n+ \"return\": {\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+\n+image: TEST_DIR/t.IMGFMT.mid\n+file format: IMGFMT\n+virtual size: 64M (67108864 bytes)\n+cluster_size: 65536\n+backing file: /dev/null\n+backing file format: IMGFMT\n+\n+Change backing file of top (opened writable)\n+\n+Formatting 'TEST_DIR/t.IMGFMT.mid', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base\n+Testing: -drive if=none,file=TEST_DIR/t.IMGFMT,node-name=top\n+{\n+ QMP_VERSION\n+}\n+{\n+ \"return\": {\n+ }\n+}\n+{\n+ \"return\": {\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+\n+image: TEST_DIR/t.IMGFMT\n+file format: IMGFMT\n+virtual size: 64M (67108864 bytes)\n+cluster_size: 65536\n+backing file: /dev/null\n+backing file format: IMGFMT\n+*** done\ndiff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group\nindex 94e764865a..108339cd03 100644\n--- a/tests/qemu-iotests/group\n+++ b/tests/qemu-iotests/group\n@@ -189,3 +189,4 @@\n 190 rw auto quick\n 192 rw auto quick\n 194 rw auto migration quick\n+195 rw auto quick\n", "prefixes": [ "7/6" ] }