From nobody Wed Feb 11 03:03:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1690294864; cv=none; d=zohomail.com; s=zohoarc; b=Z+HWXJrCddlqatbpn7gZRwEUbm+olEHiPetFPHfwL/waumhexWnr+5g0dR7sHiw8ISA9HEec6AXG8+UVVVd1G52O6/sgTjb30v68Uxf4qalPCi6+yegltNT92wSbesyPLHR1TFiSl7rwHnKJrxL8qHuR6ivMyw6KItB/eTIICsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690294864; h=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=pMSNPxAWGxF+lDy8Hhk1C/MKJRUlaBiwTYUH5uNcg9g=; b=nJV6//JcPdWikFzIhpqpriCzn+Ta7h+DCjEFSrZC+ZUvILPlDlLUUvDQe9FJ+rSDVH2/mL4FQfRUtz1545IkHJ/JvcM7WDzUqVZJTw1izQwuKVc5m0HsOs3umElC729ANax41WHDYVKt4G7z2odWu8aLTzNW291H9rZ+ps3os8E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1690294864686674.8346062763358; Tue, 25 Jul 2023 07:21:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOIsv-0001GJ-G0; Tue, 25 Jul 2023 10:19:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOIst-0001CQ-Mt for qemu-devel@nongnu.org; Tue, 25 Jul 2023 10:19:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOIss-00015N-3u for qemu-devel@nongnu.org; Tue, 25 Jul 2023 10:19:31 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-gYn8ls09OSWSB3mP9EUcUA-1; Tue, 25 Jul 2023 10:19:27 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F1DD588CC49; Tue, 25 Jul 2023 14:19:26 +0000 (UTC) Received: from localhost (unknown [10.39.192.118]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71A801121330; Tue, 25 Jul 2023 14:19:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690294769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pMSNPxAWGxF+lDy8Hhk1C/MKJRUlaBiwTYUH5uNcg9g=; b=gpdnoc+WOj1DMYOS4IPf7plscsMzYhndIQKhUL/OlZ5MnC/SxoojyBZAy0f8cHFk2IjXfk sdwFf7x29dLB+DFtUKRoFInVeU1WJEH6y9x+/eOaTPetjWcIBm53gBC4VL79VnlsdL6FDN iSGdRT+rfpJO8F3GZIsCNGFE68vXs0s= X-MC-Unique: gYn8ls09OSWSB3mP9EUcUA-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Stefan Hajnoczi , Hanna Reitz , Kevin Wolf Subject: [PATCH 4/7] iotests: filter img create backing_file when IMGPROTO is modified Date: Tue, 25 Jul 2023 10:19:12 -0400 Message-ID: <20230725141915.386364-5-stefanha@redhat.com> In-Reply-To: <20230725141915.386364-1-stefanha@redhat.com> References: <20230725141915.386364-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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=170.10.129.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1690294865167100003 Content-Type: text/plain; charset="utf-8" 197 and 215 modify IMGPROTO, IMGFMT, etc temporarily while creating an additional image file after the main test image. The backing file name still has the old IMGPROTO, IMGFMT, etc. This means _filter_img_create will not filter the backing_file=3D output from qemu-img. Add a helper that filters backing_file=3D output so these test cases are more robust. This will be necessary in order to enable the io_uring protocol driver in qemu-iotests. Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/197 | 4 +++- tests/qemu-iotests/197.out | 2 +- tests/qemu-iotests/215 | 4 +++- tests/qemu-iotests/215.out | 2 +- tests/qemu-iotests/common.filter | 8 ++++++++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/197 b/tests/qemu-iotests/197 index a2547bc280..756603b19e 100755 --- a/tests/qemu-iotests/197 +++ b/tests/qemu-iotests/197 @@ -68,7 +68,9 @@ fi _make_test_img 4G $QEMU_IO -c "write -P 55 3G 1k" "$TEST_IMG" | _filter_qemu_io IMGPROTO=3Dfile IMGFMT=3Dqcow2 TEST_IMG_FILE=3D"$TEST_WRAP" \ - _make_test_img --no-opts -F "$IMGFMT" -b "$TEST_IMG" | _filter_img_cre= ate + _make_test_img --no-opts -F "$IMGFMT" -b "$TEST_IMG" | \ + _filter_img_create_backing_file | \ + _filter_img_create $QEMU_IO -f qcow2 -c "write -z -u 1M 64k" "$TEST_WRAP" | _filter_qemu_io =20 # Ensure that a read of two clusters, but where one is already allocated, diff --git a/tests/qemu-iotests/197.out b/tests/qemu-iotests/197.out index ad414c3b0e..bbfb3413e4 100644 --- a/tests/qemu-iotests/197.out +++ b/tests/qemu-iotests/197.out @@ -5,7 +5,7 @@ QA output created by 197 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D4294967296 wrote 1024/1024 bytes at offset 3221225472 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Formatting 'TEST_DIR/t.wrap.IMGFMT', fmt=3DIMGFMT size=3D4294967296 backin= g_file=3DTEST_DIR/t.IMGFMT backing_fmt=3DIMGFMT +Formatting 'TEST_DIR/t.wrap.IMGFMT', fmt=3DIMGFMT size=3D4294967296 backin= g_file=3DBACKING_FILE backing_fmt=3DIMGFMT wrote 65536/65536 bytes at offset 1048576 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 131072/131072 bytes at offset 1048576 diff --git a/tests/qemu-iotests/215 b/tests/qemu-iotests/215 index d464596f14..145f2bb3eb 100755 --- a/tests/qemu-iotests/215 +++ b/tests/qemu-iotests/215 @@ -65,7 +65,9 @@ fi _make_test_img 4G $QEMU_IO -c "write -P 55 3G 1k" "$TEST_IMG" | _filter_qemu_io IMGPROTO=3Dfile IMGFMT=3Dqcow2 TEST_IMG_FILE=3D"$TEST_WRAP" \ - _make_test_img --no-opts -F "$IMGFMT" -b "$TEST_IMG" | _filter_img_cre= ate + _make_test_img --no-opts -F "$IMGFMT" -b "$TEST_IMG" | \ + _filter_img_create_backing_file | \ + _filter_img_create $QEMU_IO -f qcow2 -c "write -z -u 1M 64k" "$TEST_WRAP" | _filter_qemu_io =20 # Ensure that a read of two clusters, but where one is already allocated, diff --git a/tests/qemu-iotests/215.out b/tests/qemu-iotests/215.out index 5a2fe40d03..d10cce71bc 100644 --- a/tests/qemu-iotests/215.out +++ b/tests/qemu-iotests/215.out @@ -5,7 +5,7 @@ QA output created by 215 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D4294967296 wrote 1024/1024 bytes at offset 3221225472 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Formatting 'TEST_DIR/t.wrap.IMGFMT', fmt=3DIMGFMT size=3D4294967296 backin= g_file=3DTEST_DIR/t.IMGFMT backing_fmt=3DIMGFMT +Formatting 'TEST_DIR/t.wrap.IMGFMT', fmt=3DIMGFMT size=3D4294967296 backin= g_file=3DBACKING_FILE backing_fmt=3DIMGFMT wrote 65536/65536 bytes at offset 1048576 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 131072/131072 bytes at offset 1048576 diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.f= ilter index 4acac16c52..b047fe43a0 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -206,6 +206,14 @@ _filter_img_create() done } =20 +# When creating additional images with different IMGPROTO, IMGFMT, etc tha= n the +# main test image, _filter_img_create cannot filter backing_file since it +# contains different IMGPROTO, IMGFMT, etc values than currently in use. +_filter_img_create_backing_file() +{ + sed -e "s/ backing_file=3D[^ ]*/ backing_file=3DBACKING_FILE/g" +} + _filter_img_create_size() { gsed -e "s# size=3D[0-9]\\+# size=3DSIZE#g" --=20 2.41.0