From nobody Mon May 13 10:24:52 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1698984308839547.1940510665034; Thu, 2 Nov 2023 21:05:08 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 8B7AF183D; Fri, 3 Nov 2023 00:05:07 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 6D9D21823; Fri, 3 Nov 2023 00:03:32 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D5E1D1819; Fri, 3 Nov 2023 00:03:26 -0400 (EDT) Received: from mx1.osci.io (polly.osci.io [8.43.85.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5C90617A6 for ; Fri, 3 Nov 2023 00:03:24 -0400 (EDT) Received: by mx1.osci.io (Postfix, from userid 994) id F159A21DD4; Fri, 3 Nov 2023 00:03:23 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by mx1.osci.io (Postfix) with ESMTPS id 88C5121CAA for ; Fri, 3 Nov 2023 00:03:23 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-541-Qw28IFgvP56BMhTx10nOGA-1; Fri, 03 Nov 2023 00:03:19 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6A60780F82E for ; Fri, 3 Nov 2023 04:03:19 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.32.79]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FC171C060BA; Fri, 3 Nov 2023 04:03:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: Qw28IFgvP56BMhTx10nOGA-1 From: Laine Stump To: devel@lists.libvirt.org Subject: [PATCH] tests: ignore $__CF_USER_TEXT_ENCODING in env during commandtest Date: Fri, 3 Nov 2023 00:00:30 -0400 Message-ID: <20231103040319.510083-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: 5IGN4GDMDSXWDG5CJZB7AASX4EPNDW6P X-Message-ID-Hash: 5IGN4GDMDSXWDG5CJZB7AASX4EPNDW6P X-MailFrom: SRS0=oeq8=GQ=redhat.com=laine@osci.io X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Andrea Bolognani X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8"; x-default="true" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1698984310647100001 This environment variable is supposedly set according to the contents of ~/.CFUserTextEncoding, and certainly on MacOS 14 (Sonoma) it shows up in the environment, causing commandtest to fail. However, the value that is shown in $__CF_USER_TEXT_ENCODING during the test 1) is not in the environment of the shell the test is run from, and 2) doesn't match the contents of ~/.CFUserTextEncoding. It is true, though, that filtering out this environment setting from the test results permits commandtest to pass on MacOS 14. Signed-off-by: Laine Stump Reviewed-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- [*] There may be a better way to suppress this environment setting (maybe something done to prevent it from ever being added to the environment in the first place?), and that would be fine too. This patch does work though. [*] Andrea's patches to force rpcgen to generate ANSI C code are also required for the test suite to pass on MacOS 14. tests/commandhelper.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/commandhelper.c b/tests/commandhelper.c index 9b56feb120..08ee48a3a8 100644 --- a/tests/commandhelper.c +++ b/tests/commandhelper.c @@ -169,9 +169,12 @@ static int printEnvironment(FILE *log) =20 for (i =3D 0; i < length; i++) { /* Ignore the variables used to instruct the loader into - * behaving differently, as they could throw the tests off. */ - if (!STRPREFIX(newenv[i], "LD_")) + * behaving differently, as they could throw the tests off. + * Also ignore __CF_USER_TEXT_ENCODING, which is set by MacOS. */ + if (!STRPREFIX(newenv[i], "LD_") && + !STRPREFIX(newenv[i], "__CF_USER_TEXT_ENCODING=3D")) { fprintf(log, "ENV:%s\n", newenv[i]); + } } =20 return 0; --=20 2.41.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org