From nobody Wed May 14 20:25:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152810277680818.774278768584054; Mon, 4 Jun 2018 01:59:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA6E630B7DEA; Mon, 4 Jun 2018 08:59:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 910FF308BDB0; Mon, 4 Jun 2018 08:59:34 +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 2953F18033EE; Mon, 4 Jun 2018 08:59:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w548xBDW018679 for ; Mon, 4 Jun 2018 04:59:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id C826D2026E0E; Mon, 4 Jun 2018 08:59:11 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D35B2026DEF for ; Mon, 4 Jun 2018 08:59:11 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 4 Jun 2018 10:58:50 +0200 Message-Id: <123516cde5aaa37fac95898ead9f4ba8da570c6d.1528102541.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/10] tests: storage: Drop format probing from tests 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 04 Jun 2018 08:59:35 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Storage drivers now don't allow it so there's no need to test it. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/virstoragetest.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 0fe8ac7e7f..4d98310ee1 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -95,8 +95,7 @@ testCleanupImages(void) static virStorageSourcePtr testStorageFileGetMetadata(const char *path, int format, - uid_t uid, gid_t gid, - bool allow_probe) + uid_t uid, gid_t gid) { struct stat st; virStorageSourcePtr ret =3D NULL; @@ -118,7 +117,7 @@ testStorageFileGetMetadata(const char *path, if (VIR_STRDUP(ret->path, path) < 0) goto error; - if (virStorageFileGetMetadata(ret, uid, gid, allow_probe, false) < 0) + if (virStorageFileGetMetadata(ret, uid, gid, false, false) < 0) goto error; return ret; @@ -320,8 +319,7 @@ testStorageChain(const void *args) size_t i =3D 0; char *broken =3D NULL; - meta =3D testStorageFileGetMetadata(data->start, data->format, -1, -1, - (data->flags & ALLOW_PROBE) !=3D 0); + meta =3D testStorageFileGetMetadata(data->start, data->format, -1, -1); if (!meta) { if (data->flags & EXP_FAIL) { virResetLastError(); @@ -757,7 +755,7 @@ mymain(void) #define TEST_CHAIN(path, format, chain1, flags1, chain2, flags2) \ do { \ TEST_ONE_CHAIN(path, format, flags1, VIR_FLATTEN_1(chain1)); \ - TEST_ONE_CHAIN(path, format, ALLOW_PROBE | flags2, VIR_FLATTEN_1(c= hain2)); \ + TEST_ONE_CHAIN(path, format, flags2, VIR_FLATTEN_1(chain2)); \ } while (0) /* The actual tests, in several groups. */ @@ -798,7 +796,7 @@ mymain(void) (&qcow2, &raw), EXP_PASS); TEST_CHAIN(absqcow2, VIR_STORAGE_FILE_AUTO, (&qcow2_as_raw), EXP_PASS, - (&qcow2, &raw), EXP_PASS); + (&qcow2_as_raw), EXP_PASS); /* Rewrite qcow2 file to use absolute backing name */ virCommandFree(cmd); @@ -815,7 +813,7 @@ mymain(void) (&qcow2, &raw), EXP_PASS); TEST_CHAIN(absqcow2, VIR_STORAGE_FILE_AUTO, (&qcow2_as_raw), EXP_PASS, - (&qcow2, &raw), EXP_PASS); + (&qcow2_as_raw), EXP_PASS); /* Wrapped file access */ testFileData wrap =3D { @@ -852,7 +850,7 @@ mymain(void) }; TEST_CHAIN(abswrap, VIR_STORAGE_FILE_QCOW2, (&wrap_as_raw, &qcow2_as_raw), EXP_PASS, - (&wrap, &qcow2, &raw), EXP_PASS); + (&wrap_as_raw, &qcow2_as_raw), EXP_PASS); /* Rewrite qcow2 to a missing backing file, with backing type */ virCommandFree(cmd); @@ -954,7 +952,7 @@ mymain(void) (&qed, &raw), EXP_PASS); TEST_CHAIN(absqed, VIR_STORAGE_FILE_AUTO, (&qed_as_raw), EXP_PASS, - (&qed, &raw), EXP_PASS); + (&qed_as_raw), EXP_PASS); /* directory */ testFileData dir =3D { @@ -1101,7 +1099,7 @@ mymain(void) /* Test behavior of chain lookups, absolute backing from relative star= t */ chain =3D testStorageFileGetMetadata("wrap", VIR_STORAGE_FILE_QCOW2, - -1, -1, false); + -1, -1); if (!chain) { ret =3D -1; goto cleanup; @@ -1166,8 +1164,7 @@ mymain(void) /* Test behavior of chain lookups, relative backing from absolute star= t */ virStorageSourceFree(chain); - chain =3D testStorageFileGetMetadata(abswrap, VIR_STORAGE_FILE_QCOW2, - -1, -1, false); + chain =3D testStorageFileGetMetadata(abswrap, VIR_STORAGE_FILE_QCOW2, = -1, -1); if (!chain) { ret =3D -1; goto cleanup; @@ -1214,7 +1211,7 @@ mymain(void) /* Test behavior of chain lookups, relative backing */ virStorageSourceFree(chain); chain =3D testStorageFileGetMetadata("sub/link2", VIR_STORAGE_FILE_QCO= W2, - -1, -1, false); + -1, -1); if (!chain) { ret =3D -1; goto cleanup; --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list