From nobody Fri May 17 05:54:43 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=1660752734; cv=none; d=zohomail.com; s=zohoarc; b=KnNXWQeIPbHbWGlPpKoz08dKFSVszEr4v3BHSOdPsp6ay4G9tqnyR57ZhnuCfwVO1y1vgJc8YgNH0ATj8LUEV2CONBP84/+CU0SfUUsLahCHcgvT3po14hYWKukwvllxDtjXTpTtH4nAARLGb1lQJZs0YN/f9o8Jx2ZxfwiAUps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660752734; 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=Yb8n+WS3IecmlIYHnqqKVCjVWbvMd5O8YxUCQO/k8Io=; b=Oi5cFs3+Us1PwOcRQIXopDU481GpL79/2aucPyt6F1BfBmnu0tcFlF6hTqESdcaWc7O9oCXAFNLv2LA5xCc+1okvRHtEmY+gKPgIK3RDB+htSELtchH1bIcN4hAjWC3itDoZQG4H4lPB0R2/5WdVY8GnzVO1XL7P2yLTDB7dtuc= 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 1660752734766865.814346318031; Wed, 17 Aug 2022 09:12:14 -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-261-hLgxC1dpN3Ciz-pCPCHRmA-1; Wed, 17 Aug 2022 12:12:05 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B85538039BC; Wed, 17 Aug 2022 16:12:00 +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 450854010D42; Wed, 17 Aug 2022 16:11:59 +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 3C4F3194E016; Wed, 17 Aug 2022 16:11:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 32F831946A40 for ; Wed, 17 Aug 2022 16:03:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 19208403344; Wed, 17 Aug 2022 16:03:23 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 963B8492C3B for ; Wed, 17 Aug 2022 16:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660752732; 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=Yb8n+WS3IecmlIYHnqqKVCjVWbvMd5O8YxUCQO/k8Io=; b=LFKjTA0dkg5QOJklKXco6PlyI7AFk80Lp5EMJKjnEs7M4kyrSivYDlRQllShi2OCKe2g78 Dpr4GR4GTvjJw4r0fcHkGDXnkMkFyhWqiXE6VNCuHHcMLMeO64HyQIgmOObI2YmaAyZEQa ha1mG25o2DCvx3omHqgOUbfV5aIudRs= X-MC-Unique: hLgxC1dpN3Ciz-pCPCHRmA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] util: Preserve macOS dyld environment by default Date: Wed, 17 Aug 2022 18:03:19 +0200 Message-Id: <20220817160320.40462-2-abologna@redhat.com> In-Reply-To: <20220817160320.40462-1-abologna@redhat.com> References: <20220817160320.40462-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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 2.84 on 10.11.54.2 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: 1660752735950100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The DYLD_* environment variables on macOS have the same purpose as the LD_* variables have on Linux. Since we're preserving the latter by default, it makes sense to do the same for the former as well. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/util/vircommand.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index d78c666f28..4e003266bf 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -1417,6 +1417,8 @@ virCommandAddEnvPassCommon(virCommand *cmd) =20 virCommandAddEnvPass(cmd, "LD_PRELOAD"); virCommandAddEnvPass(cmd, "LD_LIBRARY_PATH"); + virCommandAddEnvPass(cmd, "DYLD_INSERT_LIBRARIES"); + virCommandAddEnvPass(cmd, "DYLD_FORCE_FLAT_NAMESPACE"); virCommandAddEnvPass(cmd, "PATH"); virCommandAddEnvPass(cmd, "HOME"); virCommandAddEnvPass(cmd, "USER"); --=20 2.37.2 From nobody Fri May 17 05:54:43 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=1660752728; cv=none; d=zohomail.com; s=zohoarc; b=mtCM1cS7u2K+vnQH3rawtrLL2AMZOKpo3XPgFSnl6Pe55m6TxKlFP5gZaxMz0IOAi2rNCvgPawBUWR+FSydQaejX2B68uxQDYl+3YjVYy9xsmYR5Xr27Zjhgyr3y7A228POilPSzDVhB/qy03MS1JK96u0fxzWnQO7LVA7MGbNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660752728; 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=ZzOZ1fJMLCDmDftV9TiChajUKKJ+oqF1K1IYkt0HJLo=; b=Y8IiH2xmW58Dmfpkdl8jej/Qz2cG6ajcczz54VBMIt8lNX1GyKyGJqUE7SngJ+P1aOFphC9osodk2pgkjOnv6axN0ZKEgV+a+KLOKU5EZpSoodFPxOjBaVyQDvBtiiPDsm2kUmFF26oJC2MXVhSwsGjPuc0tYZh50MEcrGStPVo= 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 1660752728912428.03314606947674; Wed, 17 Aug 2022 09:12:08 -0700 (PDT) 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-64-wyPb4BiNOoeysE-7Hnw5GQ-1; Wed, 17 Aug 2022 12:12:03 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B7859294EDEC; Wed, 17 Aug 2022 16:12:00 +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 661FE112131B; Wed, 17 Aug 2022 16:11: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 22BF1194E009; Wed, 17 Aug 2022 16:11:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EB69C1946A40 for ; Wed, 17 Aug 2022 16:03:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DDA8B403340; Wed, 17 Aug 2022 16:03:23 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66845492C3B for ; Wed, 17 Aug 2022 16:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660752727; 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=ZzOZ1fJMLCDmDftV9TiChajUKKJ+oqF1K1IYkt0HJLo=; b=ECoWVWOmnTZFa3s67BNzZ9vkLhtW6UqgHPCuKtLrZ8pvEkr6KaXlR1ACwZ+cNJV384XCQS PLh1EHqM2kO0YUolYQJOe9a6N5PftDp2hwTaJf15ubs1vbchFW9VU9mTYKQuOtDgXE2+/V Bhq13cMfD0byX5yGdVYQ2SCxl9qucT0= X-MC-Unique: wyPb4BiNOoeysE-7Hnw5GQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] tests: Reset macOS dyld environment Date: Wed, 17 Aug 2022 18:03:20 +0200 Message-Id: <20220817160320.40462-3-abologna@redhat.com> In-Reply-To: <20220817160320.40462-1-abologna@redhat.com> References: <20220817160320.40462-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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 2.78 on 10.11.54.3 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: 1660752729900100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This is needed to ensure the environment variables that we need for the test program itself, specifically to load mock libraries, does not interfere with any command that gets invoked by it, either directly or indirectly. We already perform the same cleanup step for LD_* variables. This makes the test failures error : virCommandWait:2752 : internal error: Child process (/usr/libexec/qemu/vhost-user/test-vhost-user-gpu --print-capabilities) unexpected fatal signal 6: dyld[8896]: symbol not found in flat namespace '_virQEMUCapsGet' error : qemuVhostUserFillDomainGPU:394 : operation failed: Unable to find a satisfying vhost-user-gpu that were showing up on macOS 12 go away. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 8933e373f7..4ecccdc272 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1053,6 +1053,8 @@ mymain(void) g_unsetenv("TMPDIR"); g_unsetenv("LD_PRELOAD"); g_unsetenv("LD_LIBRARY_PATH"); + g_unsetenv("DYLD_INSERT_LIBRARIES"); + g_unsetenv("DYLD_FORCE_FLAT_NAMESPACE"); g_unsetenv("QEMU_AUDIO_DRV"); g_unsetenv("SDL_AUDIODRIVER"); =20 --=20 2.37.2