From nobody Fri Dec 19 16:07:47 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=1678274147; cv=none; d=zohomail.com; s=zohoarc; b=TZ7ijbjmYHOdjrye+/7Ibg9lk5YgDgI6GQWOqBNOWcLlVrIJGgjZEy3R/YWMpkOELe601h/i2LlPgFuHl0enAu7cJFF/kRtdnBf3AmEdN54w1bJkdljPhHNiLfmrXJ4m59GN7q4Dkhbb0AI5WUfS6Yg2dDqkd6TZnsZpB8/9fk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678274147; 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=7d6gKLp+MsMh5O/3uCgXgVXtWKKppSY0QnPmSG+mmgI=; b=DnLihuOBJBzUsEfZxr9SHWwDK2n1NU8p2S3KDzymrlNYGRrai7uj9oSMbQhkDWbrusrAcTf76IjOn/UjRo/Haw46ZceVDCmko/cRy8DhFzZh2rWrHopr3BCEo32elleT+Lpx35P3kdESa6sMHeFedNlSfH0C7FI0IF/oYxzu7nw= 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 1678274146998388.2905964020672; Wed, 8 Mar 2023 03:15:46 -0800 (PST) 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-332-qTlEzr_qPQGkC9pGHPLGTw-1; Wed, 08 Mar 2023 06:15:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 979B9882820; Wed, 8 Mar 2023 11:15:37 +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 84F822166B26; Wed, 8 Mar 2023 11:15:37 +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 54D5819465BC; Wed, 8 Mar 2023 11:15:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 00E4319465B1 for ; Wed, 8 Mar 2023 11:14:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DBCB51121330; Wed, 8 Mar 2023 11:14:45 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E1F31121314 for ; Wed, 8 Mar 2023 11:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678274146; 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=7d6gKLp+MsMh5O/3uCgXgVXtWKKppSY0QnPmSG+mmgI=; b=Oh8GaEJd+vhn+vPQm1bA2Q24BnAEuacNNqDpg1SF5g0nw91YBfrLBW8ar10oksPqu0nEMI YjPQQe5Z9k2WXmvhBv9JkmLkUPuPve8YZqYKvGc6pyjKRl52z4IEpWFcmcitDi7P8Xuj6U D3LhPd/D+K386W8V+m4FxjYeZY3LwzU= X-MC-Unique: qTlEzr_qPQGkC9pGHPLGTw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 04/14] qemuxml2argvtest: Use virnuma mock Date: Wed, 8 Mar 2023 12:14:31 +0100 Message-Id: <1e019acf635b9908226f9cf30424d492e57e6023.1678274036.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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.6 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: 1678274148298100001 Content-Type: text/plain; charset="utf-8"; x-default="true" While no part of cmd line building process currently depends on a host NUMA configuration, this will change soon. Use freshly changed virnumamock from qemuxml2argvtest and make the mock read NUMA data from vircaps2xmldata which seems to have the most rich NUMA configuration. This also means, we have to start building virnumamock unconditionally. But this is not a problem, since nothing inside of the mock relies on Linux specificity. The whole mock is merely just reading files and parsing them. Signed-off-by: Michal Privoznik --- tests/meson.build | 2 +- tests/qemuxml2argvtest.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 15b049c6ac..44a04698cf 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -88,13 +88,13 @@ mock_libs =3D [ { 'name': 'virportallocatormock' }, { 'name': 'virprocessmock' }, { 'name': 'virrandommock' }, + { 'name': 'virnumamock' }, ] =20 if host_machine.system() =3D=3D 'linux' mock_libs +=3D [ { 'name': 'virfilemock' }, { 'name': 'virnetdevbandwidthmock' }, - { 'name': 'virnumamock' }, { 'name': 'virtestmock' }, { 'name': 'virusbmock' }, ] diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 740d7a5db5..8bc0b5147f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -830,6 +830,8 @@ mymain(void) linuxCaps =3D driver.caps; macOSCaps =3D testQemuCapsInitMacOS(); =20 + virFileWrapperAddPrefix("/sys/devices/system", + abs_srcdir "/vircaps2xmldata/linux-basic/syste= m"); virFileWrapperAddPrefix(SYSCONFDIR "/qemu/firmware", abs_srcdir "/qemufirmwaredata/etc/qemu/firmwar= e"); virFileWrapperAddPrefix(PREFIX "/share/qemu/firmware", @@ -2908,7 +2910,8 @@ VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("domaincaps"), VIR_TEST_MOCK("virrandom"), VIR_TEST_MOCK("qemucpu"), - VIR_TEST_MOCK("virpci")) + VIR_TEST_MOCK("virpci"), + VIR_TEST_MOCK("virnuma")) =20 #else =20 --=20 2.39.2