From nobody Sun Feb 8 15:46:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1631177393; cv=none; d=zohomail.com; s=zohoarc; b=eRMM6BuAONxuiDwuo/r3HgXMZSjC/qSZNPgyXiwbuoVxNvMPmVZfleQzIUmbvlDBlSatGk8l1hdBGxDGlCsOphrDNtQ/tq1fABkO7ONNbxzD3fehtGguPO1KomXM5cZD7cxkKyt2Wuzp3JPSXmPN+fNsuSTOb1YLUrfXTlD//NU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631177393; 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=JWbXm/HLS+IJir8jHHGEeqRPm0didCsXyGBpYV3WFFg=; b=i0rkdBm3/vN4nVZTdcwEF9c2+T2DXzfu47VntwS8K5uGet7nNYTSa/C1gxPX3s4zdjzF3Nd6wOcKHwx9ZBG1upjn6Tv/2KHZezmiA0N2o2r6E4IWs61hLzzjRU99TNUAgPXGjKgTZ3bYgqjg7M4OlhqHbwFjsCMZ2LeTPqA6YOA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1631177393247880.911250241723; Thu, 9 Sep 2021 01:49:53 -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-109-vDC_xLz5N9eiBOBAIfhIEA-1; Thu, 09 Sep 2021 04:49:50 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E9CB8101AFC0; Thu, 9 Sep 2021 08:49:45 +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 CD3735FC13; Thu, 9 Sep 2021 08:49:45 +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 9E4584EA40; Thu, 9 Sep 2021 08:49:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1898nicj030148 for ; Thu, 9 Sep 2021 04:49:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 447A21A7E9; Thu, 9 Sep 2021 08:49:44 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id A741419736 for ; Thu, 9 Sep 2021 08:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631177392; 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=JWbXm/HLS+IJir8jHHGEeqRPm0didCsXyGBpYV3WFFg=; b=DP8KQIWkPthIcuaJFgvxHEuQHbue/z6ThaB1JLPOqXfHm+CHlCZh2dHkOdwxfI0SiJG/o7 fUbKMPu7wJPnnVD5TSixA0VNobIG44ZZJbcl7hzqKQCRoNfiyiXgZCXI2o1XjmzJFPSlV6 +14FimqMT5SK4+oNYrnQv3e5USDRRN8= X-MC-Unique: vDC_xLz5N9eiBOBAIfhIEA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 09/24] virstoragetest: Use a pre-formatted QED file for testing backing store extraction Date: Thu, 9 Sep 2021 10:49:09 +0200 Message-Id: <7c06e54d4f97c4dffbbf3baccb171f7367467a5b.1631177237.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1631177395318100003 Content-Type: text/plain; charset="utf-8" The QED format isn't really being developed any more. Use a pre-formatted image to test the existing code. In this instance we switch to using a relative backing path for simplicity. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 21 +++++------------- .../images/qed_raw-raw-relative | Bin 0 -> 327680 bytes tests/virstoragetestdata/images/raw | Bin 0 -> 1024 bytes tests/virstoragetestdata/out/qed-auto_raw | 2 +- tests/virstoragetestdata/out/qed-qed_raw | 8 +++---- 5 files changed, 11 insertions(+), 20 deletions(-) create mode 100644 tests/virstoragetestdata/images/qed_raw-raw-relative create mode 100644 tests/virstoragetestdata/images/raw diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 3736280611..96aeaef9ce 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -42,7 +42,6 @@ VIR_LOG_INIT("tests.storagetest"); * raw: 1024-byte raw file * qcow2: qcow2 file with 'raw' as backing * wrap: qcow2 file with 'qcow2' as backing - * qed: qed file with 'raw' as backing * sub/link1: symlink to qcow2 * sub/link2: symlink to wrap * @@ -55,7 +54,6 @@ static char *qemuimg; static char *absraw; static char *absqcow2; static char *abswrap; -static char *absqed; static char *abslink2; static void @@ -65,7 +63,6 @@ testCleanupImages(void) VIR_FREE(absraw); VIR_FREE(absqcow2); VIR_FREE(abswrap); - VIR_FREE(absqed); VIR_FREE(abslink2); if (chdir(abs_builddir) < 0) { @@ -136,7 +133,6 @@ testPrepImages(void) absraw =3D g_strdup_printf("%s/raw", datadir); absqcow2 =3D g_strdup_printf("%s/qcow2", datadir); abswrap =3D g_strdup_printf("%s/wrap", datadir); - absqed =3D g_strdup_printf("%s/qed", datadir); abslink2 =3D g_strdup_printf("%s/sub/link2", datadir); if (g_mkdir_with_parents(datadir "/sub", 0777) < 0) { @@ -181,15 +177,6 @@ testPrepImages(void) if (virCommandRun(cmd, NULL) < 0) goto skip; - /* Create a qed file. */ - virCommandFree(cmd); - cmd =3D virCommandNewArgList(qemuimg, "create", "-f", "qed", NULL); - virCommandAddArgFormat(cmd, "-obacking_file=3D%s,backing_fmt=3Draw", - absraw); - virCommandAddArg(cmd, "qed"); - if (virCommandRun(cmd, NULL) < 0) - goto skip; - #ifdef WITH_SYMLINK /* Create some symlinks in a sub-directory. */ if (symlink("../qcow2", datadir "/sub/link1") < 0 || @@ -562,8 +549,12 @@ mymain(void) TEST_CHAIN("qcow2-qcow2_nbd-raw", absqcow2, VIR_STORAGE_FILE_QCOW2, EX= P_PASS); /* qed file */ - TEST_CHAIN("qed-qed_raw", absqed, VIR_STORAGE_FILE_QED, EXP_PASS); - TEST_CHAIN("qed-auto_raw", absqed, VIR_STORAGE_FILE_AUTO, EXP_PASS); + TEST_CHAIN("qed-qed_raw", + abs_srcdir "/virstoragetestdata/images/qed_raw-raw-relative= ", + VIR_STORAGE_FILE_QED, EXP_PASS); + TEST_CHAIN("qed-auto_raw", + abs_srcdir "/virstoragetestdata/images/qed_raw-raw-relative= ", + VIR_STORAGE_FILE_AUTO, EXP_PASS); /* directory */ TEST_CHAIN("directory-raw", abs_srcdir "/virstoragetestdata/images/", = VIR_STORAGE_FILE_RAW, EXP_PASS); diff --git a/tests/virstoragetestdata/images/qed_raw-raw-relative b/tests/v= irstoragetestdata/images/qed_raw-raw-relative new file mode 100644 index 0000000000000000000000000000000000000000..5c91c3fcfe3dc4f25455bafada2= 7b9c95c28c6e7 GIT binary patch literal 327680 zcmeIuu?>JQ3cvEfb)7>21k!b^Ep^X_=3Dpy^xEHP@A-bLEY+zx zjvg&cmMzZ literal 0 HcmV?d00001 diff --git a/tests/virstoragetestdata/images/raw b/tests/virstoragetestdata= /images/raw new file mode 100644 index 0000000000000000000000000000000000000000..06d7405020018ddf3cacee90fd4= af10487da3d20 GIT binary patch literal 1024 ScmZQz7zLvtFd70QH3R?z00031 literal 0 HcmV?d00001 diff --git a/tests/virstoragetestdata/out/qed-auto_raw b/tests/virstoragete= stdata/out/qed-auto_raw index e8ab498038..292a8fa7fb 100644 --- a/tests/virstoragetestdata/out/qed-auto_raw +++ b/tests/virstoragetestdata/out/qed-auto_raw @@ -1,4 +1,4 @@ -path:ABS_BUILDDIR/virstoragedata/qed +path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative backingStoreRaw: capacity: 0 encryption: 0 diff --git a/tests/virstoragetestdata/out/qed-qed_raw b/tests/virstoragetes= tdata/out/qed-qed_raw index 70a75c4e37..043ec4240b 100644 --- a/tests/virstoragetestdata/out/qed-qed_raw +++ b/tests/virstoragetestdata/out/qed-qed_raw @@ -1,5 +1,5 @@ -path:ABS_BUILDDIR/virstoragedata/qed -backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw +path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative +backingStoreRaw: raw capacity: 1024 encryption: 0 relPath: @@ -8,11 +8,11 @@ format:15 protocol:none hostname: -path:ABS_BUILDDIR/virstoragedata/raw +path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: capacity: 0 encryption: 0 -relPath: +relPath:raw type:1 format:1 protocol:none --=20 2.31.1