From nobody Fri Dec 19 19:17:59 2025 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=1679064843; cv=none; d=zohomail.com; s=zohoarc; b=oH5wEguSZ8lnEGrfj2HPMnpUMRhNgWOaDsZ2RAjxH6DHS0IgFEeyjCEI2Se5OpeyCs35e/kUo3K0x4l08WGObYFTTA/tvVhnddQaUGR/1+l7ERf1VXfo4ThitcJaIsq8SDbUq8AOXBoy813ckPP07zZAfURihx1qIA+0r3Cc9WY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679064843; 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=TLO3DENQ021bKO8jkXcRo2+1i/5uOTCcLaFBK1kdby0=; b=fQrrNZ3p6IcaZFLEiJnRC5Ct22nk7xzSGgbCYYTgZz/QYMEqXtRqwnx7pw8ojN5u+JCl9NjfaEj4Bw815KStftPpjgGX7olBQO4C92kl+MflDPULBQfZ+qhvYNkYEfbq4usoMlZwyydv9PKxWy5ZnASzPlfQpPEQ+8aaD0QOfm0= 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 1679064843553399.8922930508684; Fri, 17 Mar 2023 07:54:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-425-2hBK40JLNB-VFrKlpMNh7Q-1; Fri, 17 Mar 2023 10:53:14 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 294B787B2AC; Fri, 17 Mar 2023 14:53:09 +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 15AFB43FBE; Fri, 17 Mar 2023 14:53:09 +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 A82CE194658D; Fri, 17 Mar 2023 14:53:08 +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 EB3911946587 for ; Thu, 16 Mar 2023 16:13:33 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DC2B02166B26; Thu, 16 Mar 2023 16:13:33 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 862482166B29 for ; Thu, 16 Mar 2023 16:13:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679064842; 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=TLO3DENQ021bKO8jkXcRo2+1i/5uOTCcLaFBK1kdby0=; b=Q1zFBzFfEFyj6DGwtaMuFiYQ8G5R6D18LqHP/fAvuCwr3RYMsCDGOkNCl3nW5MRMUzMyoJ HqWaCxv1GvW486GsV//6baNdETkNgcod6RVzcFgwCmeoPoTA5FCGakc/z8ckFA+iDBmm5z ELFd0wit5PLEwrckfT8P6ejy9kWfEOg= X-MC-Unique: 2hBK40JLNB-VFrKlpMNh7Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 23/24] qemuxml2xmltest: Remove infrastructure for fake-caps testing on OSX Date: Thu, 16 Mar 2023 17:11:52 +0100 Message-Id: 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.5 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: 1679064845280100001 Content-Type: text/plain; charset="utf-8" The last tests using it were refactored to use real capabilities and no new tests should ever use it. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 62c9d8a492..e561c735ab 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -18,8 +18,6 @@ #define VIR_FROM_THIS VIR_FROM_NONE static virQEMUDriver driver; -static virCaps *linuxCaps; -static virCaps *macOSCaps; enum { WHEN_INACTIVE =3D 1, @@ -31,23 +29,12 @@ enum { static int testXML2XMLCommon(const struct testQemuInfo *info) { - int rc; - if (testQemuInfoInitArgs((struct testQemuInfo *) info) < 0) return -1; - if (info->args.hostOS =3D=3D HOST_OS_MACOS) - driver.caps =3D macOSCaps; - else - driver.caps =3D linuxCaps; - virFileCacheClear(driver.qemuCapsCache); - if (info->args.hostOS =3D=3D HOST_OS_MACOS) - rc =3D qemuTestCapsCacheInsertMacOS(driver.qemuCapsCache, info->qe= muCaps); - else - rc =3D qemuTestCapsCacheInsert(driver.qemuCapsCache, info->qemuCap= s); - if (rc < 0) + if (qemuTestCapsCacheInsert(driver.qemuCapsCache, info->qemuCaps) < 0) return -1; return 0; @@ -139,13 +126,6 @@ mymain(void) if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; - /* By default, the driver gets a virCaps instance that's suitable for - * tests that expect Linux as the host OS. We create another one for - * macOS and keep around pointers to both: this allows us to later - * pick the appropriate one for each test case */ - linuxCaps =3D driver.caps; - macOSCaps =3D testQemuCapsInitMacOS(); - cfg =3D virQEMUDriverGetConfig(&driver); if (!(conn =3D virGetConnect())) @@ -208,11 +188,6 @@ mymain(void) #define DO_TEST_NOCAPS(name) \ DO_TEST_FULL(name, "", WHEN_BOTH, ARG_END) -#define DO_TEST_MACOS(name, ...) \ - DO_TEST_FULL(name, "", WHEN_BOTH, \ - ARG_HOST_OS, HOST_OS_MACOS, \ - ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) - /* Unset or set all envvars here that are copied in qemudBuildCommandL= ine * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected * values for these envvars */ --=20 2.39.2