From nobody Mon Feb 9 07:39:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1680183603; cv=none; d=zohomail.com; s=zohoarc; b=Vq2/SBIFE8+HFATIbKsdf4bMErVaxojx4V0jUKufZUFQUAcy1sRCWQxI7GVhKKtiQ3OayhSJUA0snQ/u2pFFhJPdmdbhLj3dNReBZ3fqrpd9PMQriK7RcSLfCI+E3N/js9AilBvqoyj1RSgtbohxl3R8eQbqk6ysy0YYk/olgM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680183603; 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=3spqEqdde/J1M1rYUsLoR2JPxGTBYDYmHOzV3M0fXBk=; b=E4rpn4pFnQ1wkBx6CsJVXz/aZECfk/4ynmFSAD2Fq3L5N5PyrKV+HDt21uNzmC2l4nZOWmdbLCazVrG5aWj2qy19RF7CCaJ7a5DS/sQlXZ5veeECvTiGswJLmLpX/7oCc++mDE82LgZvvpuJqZEcejZOnDewtzqKFYIuszb6gzI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1680183603789900.4680615458559; Thu, 30 Mar 2023 06:40:03 -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-335-Fpbd73VvMHKDRSSZ8pSFgQ-1; Thu, 30 Mar 2023 09:39:21 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5FEF53814943; Thu, 30 Mar 2023 13:39:18 +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 4CFE240BC797; Thu, 30 Mar 2023 13:39:18 +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 0BEFF1946A62; Thu, 30 Mar 2023 13:38:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 218E61946587 for ; Thu, 30 Mar 2023 13:38:41 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 07AFC2166B37; Thu, 30 Mar 2023 13:38:41 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C19B2166B35 for ; Thu, 30 Mar 2023 13:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680183602; 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=3spqEqdde/J1M1rYUsLoR2JPxGTBYDYmHOzV3M0fXBk=; b=OhnXR7IHvNKNkvO1GKkle1kHd5puVlsJH1Wac9h5+9lHnwIr0KvYB6YmRzpJXAO6cdJ346 EI1F7GNGaAQQibcWS65GIsLuhbgZpcw/pfbh/w6nVcJuo84Ga1D7wfLEpN5E6XU2gURauW gMrq5JoWiKheib38vrj0dHPRiW/5LXc= X-MC-Unique: Fpbd73VvMHKDRSSZ8pSFgQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 14/31] qemumemlocktest: Use real capabilities Date: Thu, 30 Mar 2023 15:38:08 +0200 Message-Id: <893e5931c817ad2d311618f04b7f144985f39177.1680182808.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.2 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: 1680183604376100001 Content-Type: text/plain; charset="utf-8" Use testQemuGetRealCaps to fetch real capabilities and use it in place of the faked caps. Signed-off-by: Peter Krempa --- tests/qemumemlocktest.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c index efed232407..61b73e1d79 100644 --- a/tests/qemumemlocktest.c +++ b/tests/qemumemlocktest.c @@ -45,8 +45,15 @@ testCompareMemLock(const void *data) static int 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; - g_autoptr(virQEMUCaps) qemuCaps =3D NULL; + + 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; @@ -78,18 +85,15 @@ mymain(void) qemuTestSetHostArch(&driver, VIR_ARCH_X86_64); - DO_TEST("pc-kvm", 0); - DO_TEST("pc-tcg", 0); - - qemuCaps =3D virQEMUCapsNew(); - - virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI); - - if (qemuTestCapsCacheInsert(driver.qemuCapsCache, qemuCaps) < 0) { + virFileCacheClear(driver.qemuCapsCache); + if (qemuTestCapsCacheInsert(driver.qemuCapsCache, qemuCaps_x86_64) < 0= ) { ret =3D -1; goto cleanup; }; + DO_TEST("pc-kvm", 0); + DO_TEST("pc-tcg", 0); + DO_TEST("pc-hardlimit", 2147483648); DO_TEST("pc-locked", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED); DO_TEST("pc-hostdev", 2147483648); @@ -100,9 +104,8 @@ mymain(void) DO_TEST("pc-locked+hostdev", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED); qemuTestSetHostArch(&driver, VIR_ARCH_PPC64); - - virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); - if (qemuTestCapsCacheInsert(driver.qemuCapsCache, qemuCaps) < 0) { + virFileCacheClear(driver.qemuCapsCache); + if (qemuTestCapsCacheInsert(driver.qemuCapsCache, qemuCaps_ppc64) < 0)= { ret =3D -1; goto cleanup; }; --=20 2.39.2