From nobody Fri Dec 19 16:08:42 2025 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=1679064979; cv=none; d=zohomail.com; s=zohoarc; b=I3PvseN4R040T09u4HfvR6L/sStxcfTB3aeCZW4EUyVKD+4C/IKbwBXrNtNH+AARMhzflm/Msx7a8pCrTQWjFP4nRD8QA2nTgRyaU4Lq51i1OdsBS5xsOC8shc4E1V+9DJ5QEOtuKW1FZuDbz4t1ersszFExOPVJns7ZJhTSBjQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679064979; 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=B1zCHgGEbYIgCuvJ9KtoHmmv3elOAnlwbo7CGcXckBU=; b=KievE7IpEB4eeE0072CV1F7jeST4I9h+Ak7qkmnhAKsWB0UwIAGup9jsaP51gLL0LjOWT2LNTdcukhq+AFgj6LxXyVstSAZYGGmQliEe8ZyZQche8R7xrTDOkF30BiPwPsoOGpP9YcwWYra+mUkWe0bbq4nFxztxPEjxrOzwEb8= 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 1679064979020984.1836110736294; Fri, 17 Mar 2023 07:56:19 -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-587-o7wuDncHOMesATduG3hpSA-1; Fri, 17 Mar 2023 10:56:06 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EC1A7801CFD; Fri, 17 Mar 2023 14:55:58 +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 C5AD5C15BAD; Fri, 17 Mar 2023 14:55:58 +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 43F9A1946A7F; Fri, 17 Mar 2023 14:55: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 089DE1946587 for ; Thu, 16 Mar 2023 16:13:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EBD472166B2A; Thu, 16 Mar 2023 16:13:29 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89E882166B26 for ; Thu, 16 Mar 2023 16:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679064978; 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=B1zCHgGEbYIgCuvJ9KtoHmmv3elOAnlwbo7CGcXckBU=; b=aqi6kCW7JUm577beKxBhoSS46d1EHVFYQUyWglpXDdQUrLp2D95uGex+ifiujR7ZHdfIn0 FRI2ycWVBsOJq+B9AqwzSbwwZzhdm+NWclNBYp9RSAmrou7fyjBE+ck0B+tgyCxZc/85Uj O5+jzLMZsfXgu8xL8RhTpE8RVMjaqvU= X-MC-Unique: o7wuDncHOMesATduG3hpSA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 22/24] qemuxml2argvtest: Remove infrastructure for fake-caps testing on OSX Date: Thu, 16 Mar 2023 17:11:51 +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.8 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: 1679064980097100003 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/qemuxml2argvtest.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index bf8cbb0ddd..e24350c26a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -31,8 +31,6 @@ # define VIR_FROM_THIS VIR_FROM_QEMU static virQEMUDriver driver; -static virCaps *linuxCaps; -static virCaps *macOSCaps; static unsigned char * fakeSecretGetValue(virSecretPtr obj G_GNUC_UNUSED, @@ -605,18 +603,12 @@ testCompareXMLToArgv(const void *data) g_autofree char *archstr =3D NULL; virArch arch =3D VIR_ARCH_NONE; g_autoptr(virIdentity) sysident =3D virIdentityGetSystem(); - int rc; memset(&monitor_chr, 0, sizeof(monitor_chr)); if (testQemuInfoInitArgs((struct testQemuInfo *) info) < 0) goto cleanup; - if (info->args.hostOS =3D=3D HOST_OS_MACOS) - driver.caps =3D macOSCaps; - else - driver.caps =3D linuxCaps; - if (info->arch !=3D VIR_ARCH_NONE && info->arch !=3D VIR_ARCH_X86_64) qemuTestSetHostArch(&driver, info->arch); @@ -664,11 +656,7 @@ testCompareXMLToArgv(const void *data) 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) goto cleanup; if (info->migrateFrom && @@ -823,13 +811,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(); - virFileWrapperAddPrefix("/sys/devices/system", abs_srcdir "/vircaps2xmldata/linux-basic/syste= m"); virFileWrapperAddPrefix(SYSCONFDIR "/qemu/firmware", @@ -951,10 +932,6 @@ mymain(void) DO_TEST_FULL(name, "", \ ARG_GIC, gic, \ ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) -# define DO_TEST_MACOS(name, ...) \ - DO_TEST_FULL(name, "", \ - ARG_HOST_OS, HOST_OS_MACOS, \ - ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) # define DO_TEST_FAILURE(name, ...) \ DO_TEST_FULL(name, "", \ --=20 2.39.2