From nobody Sat Feb 7 06:20:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) client-ip=216.205.24.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 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=1585131512; cv=none; d=zohomail.com; s=zohoarc; b=jWL0Y2lMDSM24V4WHvBVDcrBiHXuS2wiCNkeGCW9vlaxKzXcAzWMvOwQmE5+XEkjiij9L4ZvzAqiGoa0FVV3nbexOMUohd6cDXanv25wz8/jpi75lJs9AAQEIFR+xSuNHhukPtc9BwWm4ptqdnzo+rol+PF/KBWunkZAmMyGL+k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585131512; 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=csFrDRaWRyzE1gN6334KNEI1jEXb3W65NcFDoMKzHyk=; b=WF0m9AxAyFmOFMVujDrW4m5PYphVsUb1WcXMCPOFGno0SYQA9eZCioe1RJAjXVfOAHnwsKgkS8FnjUo8T6rqhPtpwtroHX2uZmtf3G8GRdnrn9f9SIfNLgJu8ATEJCLxpkdBjpNcjH90AUbkybNwQy5zIBWrZ+M3/NW6ixlrxf8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.zohomail.com with SMTPS id 1585131512383422.3144902245474; Wed, 25 Mar 2020 03:18:32 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-1ZiuROvnMg-QinoaS4rbhA-1; Wed, 25 Mar 2020 06:18:29 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11044107ACCA; Wed, 25 Mar 2020 10:18:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9014F953AB; Wed, 25 Mar 2020 10:18:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BAEBF944C4; Wed, 25 Mar 2020 10:18:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02PAIHRO000348 for ; Wed, 25 Mar 2020 06:18:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 08ED7385; Wed, 25 Mar 2020 10:18:17 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.151]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C9FB46 for ; Wed, 25 Mar 2020 10:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585131511; 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=csFrDRaWRyzE1gN6334KNEI1jEXb3W65NcFDoMKzHyk=; b=FhX4SrJzDkSFVi5+U9z0n3DGYA/SRhjLr1RP8JWYIayIJr1Cm/N9LtK6DvQHtHZn531q4F FSSHKO87Wn6U7vH4UzpbpMDmvpBW+O8h2AEggsKaopY05k8I+rZNp7aO8li7XKBus0SB6h xcGpVcZprjAwX7wgUjET9ewxNnweZuw= X-MC-Unique: 1ZiuROvnMg-QinoaS4rbhA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/9] tests: Fix virQEMUDriverConfigNew() calling with respect to @root Date: Wed, 25 Mar 2020 11:18:01 +0100 Message-Id: <166ddd3346bc17e7e80fb2728b7c0033ec5fcbbf.1585130420.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The virQEMUDriverConfigNew() accepts path to root directory for embed mode as an argument. If the argument is not NULL it uses the passed value as prefix for some internal paths (e.g. cfg->libDir). If it is NULL though, it looks if the other argument, @privileged is true or false and generates internal paths accordingly. But when calling the function from the test suite, instead of passing NULL for @root, an empty string is passed. Fortunately, this doesn't create a problem because in both problematic cases the generated paths are "fixed" to point somewhere into build dir or the code which is tested doesn't access them. Signed-off-by: Michal Privoznik Reviewed-by: Andrea Bolognani --- tests/domaincapstest.c | 2 +- tests/testutilsqemu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index fb803eaa47..c3a9f4ef91 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -369,7 +369,7 @@ mymain(void) #endif =20 #if WITH_QEMU - virQEMUDriverConfigPtr cfg =3D virQEMUDriverConfigNew(false, ""); + virQEMUDriverConfigPtr cfg =3D virQEMUDriverConfigNew(false, NULL); =20 if (!cfg) return EXIT_FAILURE; diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index f3b4e2b3b2..cb68ac0488 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -390,7 +390,7 @@ int qemuTestDriverInit(virQEMUDriver *driver) return -1; =20 driver->hostarch =3D virArchFromHost(); - driver->config =3D virQEMUDriverConfigNew(false, ""); + driver->config =3D virQEMUDriverConfigNew(false, NULL); if (!driver->config) goto error; =20 --=20 2.24.1