From nobody Sun May 5 13:09:08 2024 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=1678113533; cv=none; d=zohomail.com; s=zohoarc; b=Q9x46zgc5Ahu9RA2KAF3IGGFveT2PAwAzsUjsS6ozKlQ3hv+3ODYIprGATpZ7T5F40lLZ+ZI39VdOLGGPW6Dt0BTwsCrTSCCLR97L0a5FHSNyuBdJLv7bshj/R9oxOz01sagTmq69438bYAgMcJGTJlHXuotr3IfR7doZiEZsY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678113533; 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=KtiMUK4pn7MMdl+7EUMOSDtiGx74lDM/7ZVpZ5ozYOA=; b=NjAr2AFaWNVswntOzIImwjlEV0tpmwCzqKG5V0ym9uuVsAUgE5vaSZr8kMQA4Pzg1SXv8uIEc4Lddxj0Tl7GB7O3uq+BGmzRCGBNYaX4TK+14LvDBlmEJrBkIKqtqWrO+4jVisVphnNO/u0euBz73qa0qBbrX1eFZR8rFo0cYvY= 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 1678113533823484.1320982012336; Mon, 6 Mar 2023 06:38:53 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-78-_jkbf3x7M5yLei6vnM0qxA-1; Mon, 06 Mar 2023 09:38:49 -0500 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 312932823803; Mon, 6 Mar 2023 14:38:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 656AB175AD; Mon, 6 Mar 2023 14:38:44 +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 27810194658D; Mon, 6 Mar 2023 14:38:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8B040194658C for ; Mon, 6 Mar 2023 14:38:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7E97214171C4; Mon, 6 Mar 2023 14:38:43 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.224.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D91814171C3 for ; Mon, 6 Mar 2023 14:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678113532; 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=KtiMUK4pn7MMdl+7EUMOSDtiGx74lDM/7ZVpZ5ozYOA=; b=V5Yd02GXRJLYK9ACOwbMvccvTb8EVxLgwCCrdI1E2xxDYFhc9SeCD2xKUVhnUvJG7Cgk2u U8wREMDU+OqBEB95DuJTrzjGs/pWJ6Jsv2umohi+9wT3cVlLqc2OqAhIG1Ts7mm9C7d3Tg MZZWO5BTXotCAxhA6wkZKxI7BBapYLQ= X-MC-Unique: _jkbf3x7M5yLei6vnM0qxA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] tests: Undo recent breakages Date: Mon, 6 Mar 2023 15:38:41 +0100 Message-Id: <20230306143841.376559-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: 1678113535456100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Turns out that those overrides that I recently removed where actually there for a reason :) Until a solution that can both ensure predictable output and avoid code duplication is developed, return to the (slightly improved) status quo. Fixes: 0f49b6cc6b81 ("tests: Drop no longer necessary overrides") Fixes: 0b464cd84ff3 ("tests: Drop more QEMU driver config overrides") Signed-off-by: Andrea Bolognani --- I will push this under the build breaker rule as soon as the corresponding pipeline[1] has successfully completed. [1] https://gitlab.com/abologna/libvirt/-/pipelines/797404546 tests/testutilsqemu.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index d3cdbdb4d5..e7030cf318 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -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 all + * the duplicated code + */ + 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