From nobody Fri Apr 26 07:06:14 2024 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=1678119852; cv=none; d=zohomail.com; s=zohoarc; b=SPhlRdIU5KKAMfz11KXyh+h4Xmv2g/XHFgPGyJZ/yca1BBmmaHGFwwHnjkqpqV2dUbu3Wu3aJhamvD1j0diKh+B5mhWxktTLm96WZa5ZxRNI19iAKU+mKWrDaPRqZOzDD8DTBbHwwsW2xAqJZBkkbk+hOE++v9VsKQVPpLeAEtc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678119852; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=NRMw94R9uqyOhSpUFa7vbxKLcihp3m/z4EJSCiF3DmU=; b=NRsiDwG95PQOXOtN+KtD+hF+MVhJepzABy9PS4x8p7CIyDNcOZc+7GvTiOLpN3ooxbuIKXds9fCIb69Hf7GMHDnUl2j8WzHAaoxjlYbhh+St4+bl+1Oht673xBWf6SH85fPvtW3jaLqubG8dFuT3mn+k1RqLUqVfIrL9s1n7qwA= 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 167811985246341.74562983314547; Mon, 6 Mar 2023 08:24:12 -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-65-zcbRBav-NxypBN-7TvVKCQ-1; Mon, 06 Mar 2023 11:24:09 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 533301011353; Mon, 6 Mar 2023 16:23:56 +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 E2B4B2026D4B; Mon, 6 Mar 2023 16:23:54 +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 9BC32194658D; Mon, 6 Mar 2023 16:23:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6FE8B194658C for ; Mon, 6 Mar 2023 16:23:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BFF752026D76; Mon, 6 Mar 2023 16:23:48 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.224.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F37D2026D4B for ; Mon, 6 Mar 2023 16:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678119851; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NRMw94R9uqyOhSpUFa7vbxKLcihp3m/z4EJSCiF3DmU=; b=GDM9tc26ZxkZc20UDaRkVHapGcY7JcP7jhnyBUuq8ljqBUKs9Abw8maCZghNxGl9zDrfrX mPQoRtRkaM2xKiKMYNIm4mp5YFzR1T7ChLpIleARriGlstYnVpIImE288U+y0Jq0G/ovcQ v0ZB1fpMC1FLdL6reXtc7jubwpMIKUM= X-MC-Unique: zcbRBav-NxypBN-7TvVKCQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2] tests: Undo recent breakages Date: Mon, 6 Mar 2023 17:23:46 +0100 Message-Id: <20230306162346.458697-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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.4 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: 1678119852769100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Turns out that those overrides I recently removed where actually there for a reason, and there was a motivation behind creating the driver config as unprivileged too O:-) Until a solution that can both ensure predictable output and avoid code duplication is developed, go back to the previous approach. Fixes: 2f56f69f7f7e ("tests: Create privileged config for QEMU driver") Fixes: 0f49b6cc6b81 ("tests: Drop no longer necessary overrides") Fixes: 0b464cd84ff3 ("tests: Drop more QEMU driver config overrides") Signed-off-by: Andrea Bolognani --- Pushed under the build breaker rule. Pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/797459727 Note that the aarch64-macos-12 job is marked as failed, but the underlying Cirrus CI job https://cirrus-ci.com/task/4640605947559936 finished successfully. tests/testutilsqemu.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index d3cdbdb4d5..d715252aee 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -631,7 +631,7 @@ int qemuTestDriverInit(virQEMUDriver *driver) =20 driver->hostarch =3D virArchFromHost(); =20 - cfg =3D virQEMUDriverConfigNew(true, NULL); + cfg =3D virQEMUDriverConfigNew(false, NULL); if (!cfg) goto error; driver->config =3D cfg; @@ -641,6 +641,24 @@ int qemuTestDriverInit(virQEMUDriver *driver) VIR_FREE(cfg->stateDir); VIR_FREE(cfg->configDir); =20 + /* Override paths to ensure predictable output + * + * FIXME Find a way to achieve the same result while avoiding + * code duplication + */ + VIR_FREE(cfg->libDir); + cfg->libDir =3D g_strdup("/var/lib/libvirt/qemu"); + VIR_FREE(cfg->channelTargetDir); + cfg->channelTargetDir =3D g_strdup("/var/lib/libvirt/qemu/channel/targ= et"); + VIR_FREE(cfg->memoryBackingDir); + cfg->memoryBackingDir =3D g_strdup("/var/lib/libvirt/qemu/ram"); + VIR_FREE(cfg->nvramDir); + cfg->nvramDir =3D g_strdup("/var/lib/libvirt/qemu/nvram"); + VIR_FREE(cfg->passtStateDir); + cfg->passtStateDir =3D g_strdup("/var/run/libvirt/qemu/passt"); + VIR_FREE(cfg->dbusStateDir); + cfg->dbusStateDir =3D g_strdup("/var/run/libvirt/qemu/dbus"); + if (!g_mkdtemp(statedir)) { fprintf(stderr, "Cannot create fake stateDir"); goto error; --=20 2.39.2