From nobody Mon Feb 9 05:20:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1688478037; cv=none; d=zohomail.com; s=zohoarc; b=JHyUkCoszy+zd/g+RHPmEYuJBseIHadtaFhG1347AWCxuFBbuiGJoOOLQqCSCB/eotNblvsytxHYxkXHQs6lAvjzKTRcfdcTX72Q5AYxMRjBn2kosImOYjE9YQT70Nv4utWXMZ+NmO2Di7QKJ+TWt/qbhqkv5A36Okr1iO8hMh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688478037; 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=RDb+ukje1aYpJbQgnoz++s3Gxgd5Sp+PXva351lLXdg=; b=kRxa1+BsZvXbW7CzYsK7MYMjucHzNqfREf+SEwxntEhtdTjACKNWjc4C3Ga60mvfO2p6nEKMFqeqaC5PH+AHxqIw1kzVbmrDbyNWm8IlYu9WYwR/wx9HgD/4CnJt+I/3uHQ34qexgUGbPa/Z90Ah2La09rwwfg/nQ8J9zjcS4BM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1688478037687612.1474741158295; Tue, 4 Jul 2023 06:40:37 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-52-FfRAaooGMFq3_-c823B7Eg-1; Tue, 04 Jul 2023 09:40:32 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 644EC3810D43; Tue, 4 Jul 2023 13:40:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EFCB40C2077; Tue, 4 Jul 2023 13:40:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 10E3E194658C; Tue, 4 Jul 2023 13:40:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2BB921946589 for ; Tue, 4 Jul 2023 13:40:26 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0F3344021522; Tue, 4 Jul 2023 13:40:26 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F59E4021526 for ; Tue, 4 Jul 2023 13:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688478036; 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=RDb+ukje1aYpJbQgnoz++s3Gxgd5Sp+PXva351lLXdg=; b=MKN58/KqdYufS/ldp6dat4OJFuux6B86q+jR7dJti9B8WmlAkop0Dt3gsG/o/WAlg1nzIo 6hkYaK+WoXJIfmkSgMx4LrPaZsPqiWppfFGpSHRb775IXvsH4cdfDnlvAm7ymS/9M7Bc4+ +pCqczyWJJoy5pqJ2pThc1xpenfH8bg= X-MC-Unique: FfRAaooGMFq3_-c823B7Eg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/10] qemumemlocktest: Use 'testQemuInsertRealCaps' Date: Tue, 4 Jul 2023 15:40:15 +0200 Message-ID: <654d33a27163a631450cff9d75c98f4b97ee8ec0.1688477951.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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: 1688478038194100015 Content-Type: text/plain; charset="utf-8" Rewrite the capability fetching to use the new helper, thus simplifying the code. Signed-off-by: Peter Krempa --- tests/qemumemlocktest.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c index 7d219fcc40..a2888732f7 100644 --- a/tests/qemumemlocktest.c +++ b/tests/qemumemlocktest.c @@ -47,14 +47,8 @@ mymain(void) { g_autoptr(GHashTable) capslatest =3D testQemuGetLatestCaps(); g_autoptr(GHashTable) capscache =3D virHashNew(virObjectUnref); - g_autoptr(virQEMUCaps) qemuCaps_x86_64 =3D NULL; - g_autoptr(virQEMUCaps) qemuCaps_ppc64 =3D NULL; int ret =3D 0; - if (!(qemuCaps_x86_64 =3D testQemuGetRealCaps("x86_64", "latest", "", = capslatest, capscache, NULL, NULL)) || - !(qemuCaps_ppc64 =3D testQemuGetRealCaps("ppc64", "latest", "", c= apslatest, capscache, NULL, NULL))) - return EXIT_FAILURE; - if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; @@ -85,11 +79,11 @@ mymain(void) qemuTestSetHostArch(&driver, VIR_ARCH_X86_64); - virFileCacheClear(driver.qemuCapsCache); - if (qemuTestCapsCacheInsert(driver.qemuCapsCache, qemuCaps_x86_64) < 0= ) { + if (testQemuInsertRealCaps(driver.qemuCapsCache, "x86_64", "latest", "= ", + capslatest, capscache, NULL, NULL) < 0) { ret =3D -1; goto cleanup; - }; + } DO_TEST("pc-kvm", 0); DO_TEST("pc-tcg", 0); @@ -105,11 +99,12 @@ mymain(void) DO_TEST("pc-locked+hostdev", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED); qemuTestSetHostArch(&driver, VIR_ARCH_PPC64); - virFileCacheClear(driver.qemuCapsCache); - if (qemuTestCapsCacheInsert(driver.qemuCapsCache, qemuCaps_ppc64) < 0)= { + + if (testQemuInsertRealCaps(driver.qemuCapsCache, "ppc64", "latest", "", + capslatest, capscache, NULL, NULL) < 0) { ret =3D -1; goto cleanup; - }; + } DO_TEST("pseries-kvm", 20971520); DO_TEST("pseries-tcg", 0); --=20 2.41.0