From nobody Sun Feb 8 23:26:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1583931405; cv=none; d=zohomail.com; s=zohoarc; b=DG9atRUfanWsNN37UWcadRrxlIKT+MP9rWt4cyPrqLvZSsA/S3Mre4faKXuD42X4eW7BHAzhboXF8qh1uSt/cIh5sQCxQhxg7QYPotc5s4i4lY2RfuvxvUjX8aOn4ZTQbwlikZDtW6Xlo0ORaHOUiNvk0dbCfPMrxJyDHD8yY/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583931405; h=Content-Type:Content-Transfer-Encoding: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=Ej7xAJ3ndZpV4aEDLx+MHkiCpALelVnvz4w9JQWI6VI=; b=M+fd4EhCTb3Z5dHkQy5kuWaUc7en4cbkjCpSCIpnGVUvzl8Zq24K1s8Aj9X/R3wSW0rGBD48PieTzD8pdpiLa5LDol3ovtLt4+jV/ke28NVxfGU8YfZMdKnBwKLwnzZZitZNuSwOCP7lrSz4k6kYzbMB5brAag82ABVRwFOd+Rs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1583931405968794.8157591889873; Wed, 11 Mar 2020 05:56:45 -0700 (PDT) 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-35-E_ixQVteOpKfHCok_AfbYg-1; Wed, 11 Mar 2020 08:56:40 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 324D9477; Wed, 11 Mar 2020 12:56:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0890310027A4; Wed, 11 Mar 2020 12:56:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B953D86A22; Wed, 11 Mar 2020 12:56:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02BCuXxQ009395 for ; Wed, 11 Mar 2020 08:56:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7DDA35C57D; Wed, 11 Mar 2020 12:56:33 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 475ED5C54A; Wed, 11 Mar 2020 12:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583931403; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Ej7xAJ3ndZpV4aEDLx+MHkiCpALelVnvz4w9JQWI6VI=; b=CAu2D7OwlVxpKHE6cLJWmXOxNPuU+xvq6LKz21N9S8krqDGtixdC+YV/vBToagTePKWFSE t9x0HDpmhO8O+BpHs1k0IIUQRw8aApL3HzVnbN35Vx/IuLGwKJp06IvV14xozU6Xap/8LB rjr3VD8WGF2I+E4wpxp7wtK9McTC2mo= X-MC-Unique: E_ixQVteOpKfHCok_AfbYg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 10/19] qemublocktest: Fix and optimize fake image chain Date: Wed, 11 Mar 2020 13:55:55 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Set the 'id' field of the backing chain properly so that we can look up images and initialize 6 images instead of 10 as we don't use more currently. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- tests/qemublocktest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 7b7948d4c6..a6b6376c7d 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -570,6 +570,7 @@ testQemuBackupIncrementalBitmapCalculateGetFakeImage(si= ze_t idx) if (!(ret =3D virStorageSourceNew())) abort(); + ret->id =3D idx; ret->type =3D VIR_STORAGE_TYPE_FILE; ret->format =3D VIR_STORAGE_FILE_QCOW2; ret->path =3D g_strdup_printf("/image%zu", idx); @@ -589,7 +590,7 @@ testQemuBackupIncrementalBitmapCalculateGetFakeChain(vo= id) n =3D ret =3D testQemuBackupIncrementalBitmapCalculateGetFakeImage(1); - for (i =3D 2; i < 10; i++) { + for (i =3D 2; i < 6; i++) { n->backingStore =3D testQemuBackupIncrementalBitmapCalculateGetFak= eImage(i); n =3D n->backingStore; } --=20 2.24.1