From patchwork Thu Dec 19 14:38:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 11303811 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC4E3921 for ; Thu, 19 Dec 2019 14:52:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1886206D8 for ; Thu, 19 Dec 2019 14:52:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YRYWwMjH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1886206D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihxAI-0008Dt-IK for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 Dec 2019 09:52:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58625) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihwxP-0005Rq-La for qemu-devel@nongnu.org; Thu, 19 Dec 2019 09:39:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihwxO-0006jE-DH for qemu-devel@nongnu.org; Thu, 19 Dec 2019 09:39:15 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:46891 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihwxM-0006e9-IK for qemu-devel@nongnu.org; Thu, 19 Dec 2019 09:39:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576766346; 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=O8BsVxTHP0LkBab6ZspcAKAGv/IC3QN54ftjntgQfuw=; b=YRYWwMjHSSesYjkc+UeYDKFjuELPxI2QQvx3ku3s7O4L3WkRV44xTge63rQkv2+uApgVhb hwISakAegnMP4GX6fv40J4O81dmOLumMJiQu9WvXB6fr3eT/O/sJYjhQaqhEfnBaN4uXhO BOxJ1rMAsK3Jx9lmgfF4jTCWf22WLa8= 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-203-DKrwkmGkPq2_JzbeqSTwzA-1; Thu, 19 Dec 2019 09:39:04 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFE27102C86C; Thu, 19 Dec 2019 14:39:03 +0000 (UTC) Received: from localhost (ovpn-205-138.brq.redhat.com [10.40.205.138]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F085B6F43E; Thu, 19 Dec 2019 14:39:01 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 11/18] iotests: Avoid renaming images Date: Thu, 19 Dec 2019 15:38:11 +0100 Message-Id: <20191219143818.1646168-12-mreitz@redhat.com> In-Reply-To: <20191219143818.1646168-1-mreitz@redhat.com> References: <20191219143818.1646168-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: DKrwkmGkPq2_JzbeqSTwzA-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This generally does not work on non-file protocols. It is better to create the image with the final name from the start, and most tests do this already. Let 013 and 046 follow suit. Signed-off-by: Max Reitz --- tests/qemu-iotests/013 | 4 +++- tests/qemu-iotests/013.out | 2 +- tests/qemu-iotests/046 | 5 +++-- tests/qemu-iotests/046.out | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013 index b977290480..a2c748c55e 100755 --- a/tests/qemu-iotests/013 +++ b/tests/qemu-iotests/013 @@ -46,6 +46,8 @@ TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 +TEST_IMG_SAVE=$TEST_IMG +TEST_IMG="$TEST_IMG.orig" _make_test_img 6G echo "Testing empty image" @@ -63,7 +65,7 @@ done echo "Compressing image" echo -mv "$TEST_IMG" "$TEST_IMG.orig" +TEST_IMG=$TEST_IMG_SAVE _make_test_img 6G $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c -n "$TEST_IMG.orig" "$TEST_IMG" diff --git a/tests/qemu-iotests/013.out b/tests/qemu-iotests/013.out index 07323a742b..23e3160b49 100644 --- a/tests/qemu-iotests/013.out +++ b/tests/qemu-iotests/013.out @@ -1,5 +1,5 @@ QA output created by 013 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image At offset 0: diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index a066eec605..1dca1f4f30 100755 --- a/tests/qemu-iotests/046 +++ b/tests/qemu-iotests/046 @@ -47,6 +47,8 @@ size=128M echo echo "== creating backing file for COW tests ==" +TEST_IMG_SAVE=$TEST_IMG +TEST_IMG="$TEST_IMG.base" _make_test_img $size backing_io() @@ -67,8 +69,7 @@ backing_io() backing_io 0 32 write | $QEMU_IO "$TEST_IMG" | _filter_qemu_io -mv "$TEST_IMG" "$TEST_IMG.base" - +TEST_IMG=$TEST_IMG_SAVE _make_test_img -b "$TEST_IMG.base" 6G echo diff --git a/tests/qemu-iotests/046.out b/tests/qemu-iotests/046.out index ca2c7404a9..15d9ebd232 100644 --- a/tests/qemu-iotests/046.out +++ b/tests/qemu-iotests/046.out @@ -1,7 +1,7 @@ QA output created by 046 == creating backing file for COW tests == -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 65536/65536 bytes at offset 65536