From nobody Sun Apr 27 03:51:14 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1603468455; cv=none; d=zohomail.com; s=zohoarc; b=dr8nFmCsQ5y2o7h8jpiyXWQPz8u7fWs6/MJrglE2ZuRsiQL4BqOlGC0G6rv23VOlm4/f7PNcCJsAQa97PDbuP8zEV4WlNZpJe8cLz5QH6Gpor8AYOAyBBKk9ViwL3W959a3vtelRGJe8RluIBegcRc3BAvpa+YHN28XkF8wjvyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603468455; h=Content-Type: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=Itz/H77O8YQ99CGzsq9afhukogYzz/U6DlCXeUrgRFQ=; b=XKxIYsfUSTCNQK17+qTSjDw344qwwPo/4+y8N2cvdvIYchx1LH5QlmFEh/WL2Fr/BHD2Qkcld0kyNgmwBtOO+iiOOnjE3vQhlCn76sDd7xVNCN6y2io2O7VHev6ydNYj0ZeKzf9SqxbHnMY/8HL+SrsbTxTnoI5IgKhmZowZSNE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=<stefanha@redhat.com> (p=none dis=none) header.from=<stefanha@redhat.com> Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603468455065423.36708434749346; Fri, 23 Oct 2020 08:54:15 -0700 (PDT) Received: from localhost ([::1]:39222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+importer=patchew.org@nongnu.org>) id 1kVzOP-0005iq-Up for importer@patchew.org; Fri, 23 Oct 2020 11:54:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <stefanha@redhat.com>) id 1kVyvZ-0007sg-Lh for qemu-devel@nongnu.org; Fri, 23 Oct 2020 11:24:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from <stefanha@redhat.com>) id 1kVyvT-00011J-FE for qemu-devel@nongnu.org; Fri, 23 Oct 2020 11:24:25 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-mhvkXWAYN8W6KKZ2M-_9jw-1; Fri, 23 Oct 2020 11:24:15 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id BEC57106B491; Fri, 23 Oct 2020 15:23:54 +0000 (UTC) Received: from localhost (ovpn-114-178.ams2.redhat.com [10.36.114.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B30919646; Fri, 23 Oct 2020 15:23:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603466658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Itz/H77O8YQ99CGzsq9afhukogYzz/U6DlCXeUrgRFQ=; b=BZaBvvFnRfW5Y2HLtDdP8z1S8V4CdhGUZt4QnanCHXXkHWjx0sjRIRYPCCNqYNf0iJsVSE sQmqVsmg4Z8f9fsPew2NP+Wl3ko+Ygmj3PQkhSEcEGv/SZaii+C7zHUanGZBGgiUrk5u1a x1qlp5YwocIdvXGrudf0Y+5Ngo3Dfr4= X-MC-Unique: mhvkXWAYN8W6KKZ2M-_9jw-1 From: Stefan Hajnoczi <stefanha@redhat.com> To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org> Subject: [PULL v3 28/28] iotests: add commit top->base cases to 274 Date: Fri, 23 Oct 2020 16:21:47 +0100 Message-Id: <20201023152147.1016281-29-stefanha@redhat.com> In-Reply-To: <20201023152147.1016281-1-stefanha@redhat.com> References: <20201023152147.1016281-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=63.128.21.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:46:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MIME_BASE64_TEXT=1.741, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://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>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>, Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, qemu-block@nongnu.org, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Coiby Xu <Coiby.Xu@gmail.com>, Markus Armbruster <armbru@redhat.com>, Alberto Garcia <berto@igalia.com>, Stefan Hajnoczi <stefanha@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Max Reitz <mreitz@redhat.com> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+importer=patchew.org@nongnu.org> X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> These cases are fixed by previous patches around block_status and is_allocated. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 20200924194003.22080-6-vsementsov@virtuozzo.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- tests/qemu-iotests/274 | 20 +++++++++++ tests/qemu-iotests/274.out | 68 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/tests/qemu-iotests/274 b/tests/qemu-iotests/274 index d4571c5465..76b1ba6a52 100755 --- a/tests/qemu-iotests/274 +++ b/tests/qemu-iotests/274 @@ -115,6 +115,26 @@ with iotests.FilePath('base') as base, \ iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid) iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff),= mid) =20 + iotests.log('=3D=3D=3D Testing qemu-img commit (top -> base) =3D=3D=3D= ') + + create_chain() + iotests.qemu_img_log('commit', '-b', base, top) + iotests.img_info_log(base) + iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, base) + iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff),= base) + + iotests.log('=3D=3D=3D Testing QMP active commit (top -> base) =3D=3D= =3D') + + create_chain() + with create_vm() as vm: + vm.launch() + vm.qmp_log('block-commit', device=3D'top', base_node=3D'base', + job_id=3D'job0', auto_dismiss=3DFalse) + vm.run_job('job0', wait=3D5) + + iotests.img_info_log(mid) + iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, base) + iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff),= base) =20 iotests.log('=3D=3D Resize tests =3D=3D') =20 diff --git a/tests/qemu-iotests/274.out b/tests/qemu-iotests/274.out index bf5abd4c10..cfe17a8659 100644 --- a/tests/qemu-iotests/274.out +++ b/tests/qemu-iotests/274.out @@ -135,6 +135,74 @@ read 1048576/1048576 bytes at offset 0 read 1048576/1048576 bytes at offset 1048576 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) =20 +=3D=3D=3D Testing qemu-img commit (top -> base) =3D=3D=3D +Formatting 'TEST_DIR/PID-base', fmt=3Dqcow2 cluster_size=3D65536 extended_= l2=3Doff compression_type=3Dzlib size=3D2097152 lazy_refcounts=3Doff refcou= nt_bits=3D16 + +Formatting 'TEST_DIR/PID-mid', fmt=3Dqcow2 cluster_size=3D65536 extended_l= 2=3Doff compression_type=3Dzlib size=3D1048576 backing_file=3DTEST_DIR/PID-= base backing_fmt=3Dqcow2 lazy_refcounts=3Doff refcount_bits=3D16 + +Formatting 'TEST_DIR/PID-top', fmt=3Dqcow2 cluster_size=3D65536 extended_l= 2=3Doff compression_type=3Dzlib size=3D2097152 backing_file=3DTEST_DIR/PID-= mid backing_fmt=3Dqcow2 lazy_refcounts=3Doff refcount_bits=3D16 + +wrote 2097152/2097152 bytes at offset 0 +2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +Image committed. + +image: TEST_IMG +file format: IMGFMT +virtual size: 2 MiB (2097152 bytes) +cluster_size: 65536 +Format specific information: + compat: 1.1 + compression type: zlib + lazy refcounts: false + refcount bits: 16 + corrupt: false + extended l2: false + +read 1048576/1048576 bytes at offset 0 +1 MiB, 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) + +=3D=3D=3D Testing QMP active commit (top -> base) =3D=3D=3D +Formatting 'TEST_DIR/PID-base', fmt=3Dqcow2 cluster_size=3D65536 extended_= l2=3Doff compression_type=3Dzlib size=3D2097152 lazy_refcounts=3Doff refcou= nt_bits=3D16 + +Formatting 'TEST_DIR/PID-mid', fmt=3Dqcow2 cluster_size=3D65536 extended_l= 2=3Doff compression_type=3Dzlib size=3D1048576 backing_file=3DTEST_DIR/PID-= base backing_fmt=3Dqcow2 lazy_refcounts=3Doff refcount_bits=3D16 + +Formatting 'TEST_DIR/PID-top', fmt=3Dqcow2 cluster_size=3D65536 extended_l= 2=3Doff compression_type=3Dzlib size=3D2097152 backing_file=3DTEST_DIR/PID-= mid backing_fmt=3Dqcow2 lazy_refcounts=3Doff refcount_bits=3D16 + +wrote 2097152/2097152 bytes at offset 0 +2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +{"execute": "block-commit", "arguments": {"auto-dismiss": false, "base-nod= e": "base", "device": "top", "job-id": "job0"}} +{"return": {}} +{"execute": "job-complete", "arguments": {"id": "job0"}} +{"return": {}} +{"data": {"device": "job0", "len": 1048576, "offset": 1048576, "speed": 0,= "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds= ": "USECS", "seconds": "SECS"}} +{"data": {"device": "job0", "len": 1048576, "offset": 1048576, "speed": 0,= "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microsec= onds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "job0"}} +{"return": {}} +image: TEST_IMG +file format: IMGFMT +virtual size: 1 MiB (1048576 bytes) +cluster_size: 65536 +backing file: TEST_DIR/PID-base +backing file format: IMGFMT +Format specific information: + compat: 1.1 + compression type: zlib + lazy refcounts: false + refcount bits: 16 + corrupt: false + extended l2: false + +read 1048576/1048576 bytes at offset 0 +1 MiB, 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) + =3D=3D Resize tests =3D=3D =3D=3D=3D preallocation=3Doff =3D=3D=3D Formatting 'TEST_DIR/PID-base', fmt=3Dqcow2 cluster_size=3D65536 extended_= l2=3Doff compression_type=3Dzlib size=3D6442450944 lazy_refcounts=3Doff ref= count_bits=3D16 --=20 2.26.2