From nobody Sun Apr 28 14:11:23 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=1557163865; cv=none; d=zoho.com; s=zohoarc; b=QRQViAIABGuU0pR3hbApmTTEZQCB6Z0M/slki4mLSoesvAwQII69Abvvp0HogaNgA1OO0IcGZ0oIBq2e89SoWqiMCmTHARByhBGsUqK5nIkC1MFRbVs/as/sc5fDRjAVkNE054skI1SA7u1iE2u0iHrFWsG2Bxj4p1+AAxbBSKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557163865; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=scLh/XJc8dvYZqkKv8ZqGD0k/41YbsWoBxb/3cWUH/8=; b=i3qrG8VS2bZm9rHUbert1DxTNntKQkY5cC+rAacAKqlvqbdkYF2TIezgfHk2hUw7u9pV/vhCTTso+qCR5ed0YNvTCGJitz6bgLL8bfKtoJ4NHYQmP0wILviDjRcmGTkbY2x6J4afgdqGS/XsZbXpQ6RaT+QoAKeqN7LR8JaapC4= 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 15571638651761017.108351199223; Mon, 6 May 2019 10:31:05 -0700 (PDT) Received: from localhost ([127.0.0.1]:59849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNhSC-0007WH-5a for importer@patchew.org; Mon, 06 May 2019 13:31:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNhIk-0007zl-5i for qemu-devel@nongnu.org; Mon, 06 May 2019 13:21:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNhIj-0007bt-36 for qemu-devel@nongnu.org; Mon, 06 May 2019 13:21:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54138) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNhIg-0007Yw-II; Mon, 06 May 2019 13:21:14 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E241F3082E1E; Mon, 6 May 2019 17:21:13 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-15.phx2.redhat.com [10.3.116.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D1945C1B5; Mon, 6 May 2019 17:21:13 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 6 May 2019 12:21:11 -0500 Message-Id: <20190506172111.31594-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 06 May 2019 17:21:13 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] iotests: Tweak 221 sizing for different hole granularities X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , thuth@redhat.com, qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" For some particular configurations of ext4, sizing an image to 84 sectors + 1 byte causes test failures when the size of the hole is rounded to a 4k alignment. Let's instead size things to 128 sectors + 1 byte, as the 64k boundary is more likely to work with various hole granularities. Reported-by: Thomas Huth Signed-off-by: Eric Blake Tested-by: Thomas Huth --- I have been unable to reproduce Thomas' failure, but suspect that this will address it. If I can get a Tested-by, then I'm happy to add it through my NBD tree, as I have a couple other iotest fixes ready for a pull request. tests/qemu-iotests/221 | 10 +++++----- tests/qemu-iotests/221.out | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/qemu-iotests/221 b/tests/qemu-iotests/221 index 808cd9a289c..25dd47bcfe4 100755 --- a/tests/qemu-iotests/221 +++ b/tests/qemu-iotests/221 @@ -2,7 +2,7 @@ # # Test qemu-img vs. unaligned images # -# Copyright (C) 2018 Red Hat, Inc. +# Copyright (C) 2018-2019 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -41,16 +41,16 @@ echo echo "=3D=3D=3D Check mapping of unaligned raw image =3D=3D=3D" echo -_make_test_img 43009 # qemu-img create rounds size up +_make_test_img 65537 # qemu-img create rounds size up $QEMU_IMG map --output=3Djson "$TEST_IMG" | _filter_qemu_img_map -truncate --size=3D43009 "$TEST_IMG" # so we resize it and check again +truncate --size=3D65537 "$TEST_IMG" # so we resize it and check again $QEMU_IMG map --output=3Djson "$TEST_IMG" | _filter_qemu_img_map -$QEMU_IO -c 'w 43008 1' "$TEST_IMG" | _filter_qemu_io # writing also round= s up +$QEMU_IO -c 'w 65536 1' "$TEST_IMG" | _filter_qemu_io # writing also round= s up $QEMU_IMG map --output=3Djson "$TEST_IMG" | _filter_qemu_img_map -truncate --size=3D43009 "$TEST_IMG" # so we resize it and check again +truncate --size=3D65537 "$TEST_IMG" # so we resize it and check again $QEMU_IMG map --output=3Djson "$TEST_IMG" | _filter_qemu_img_map # success, all done diff --git a/tests/qemu-iotests/221.out b/tests/qemu-iotests/221.out index a9c0190aadc..9f9dd52bb0b 100644 --- a/tests/qemu-iotests/221.out +++ b/tests/qemu-iotests/221.out @@ -2,15 +2,15 @@ QA output created by 221 =3D=3D=3D Check mapping of unaligned raw image =3D=3D=3D -Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D43009 -[{ "start": 0, "length": 43520, "depth": 0, "zero": true, "data": false, "= offset": OFFSET}] -[{ "start": 0, "length": 43520, "depth": 0, "zero": true, "data": false, "= offset": OFFSET}] -wrote 1/1 bytes at offset 43008 +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D65537 +[{ "start": 0, "length": 66048, "depth": 0, "zero": true, "data": false, "= offset": OFFSET}] +[{ "start": 0, "length": 66048, "depth": 0, "zero": true, "data": false, "= offset": OFFSET}] +wrote 1/1 bytes at offset 65536 1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -[{ "start": 0, "length": 40960, "depth": 0, "zero": true, "data": false, "= offset": OFFSET}, -{ "start": 40960, "length": 2049, "depth": 0, "zero": false, "data": true,= "offset": OFFSET}, -{ "start": 43009, "length": 511, "depth": 0, "zero": true, "data": false, = "offset": OFFSET}] -[{ "start": 0, "length": 40960, "depth": 0, "zero": true, "data": false, "= offset": OFFSET}, -{ "start": 40960, "length": 2049, "depth": 0, "zero": false, "data": true,= "offset": OFFSET}, -{ "start": 43009, "length": 511, "depth": 0, "zero": true, "data": false, = "offset": OFFSET}] +[{ "start": 0, "length": 65536, "depth": 0, "zero": true, "data": false, "= offset": OFFSET}, +{ "start": 65536, "length": 1, "depth": 0, "zero": false, "data": true, "o= ffset": OFFSET}, +{ "start": 65537, "length": 511, "depth": 0, "zero": true, "data": false, = "offset": OFFSET}] +[{ "start": 0, "length": 65536, "depth": 0, "zero": true, "data": false, "= offset": OFFSET}, +{ "start": 65536, "length": 1, "depth": 0, "zero": false, "data": true, "o= ffset": OFFSET}, +{ "start": 65537, "length": 511, "depth": 0, "zero": true, "data": false, = "offset": OFFSET}] *** done --=20 2.20.1