From nobody Mon Feb 9 17:56:08 2026 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=1651144983; cv=none; d=zohomail.com; s=zohoarc; b=DuG58O3CYWco8gLaVKsIJhgYTLPvkl8i7EILUEH8I6McinDrWxYwzWwGE+1KoyEYRr+KM3ORUtFgeLIzDuIpcIhK4golojUDg+gI7t5GaBHq8SqRJ8nveDCRlkJ8afOBJ8C6cIPo9RScH+OrMY8YG9DBjsDIB9UWKDfhZSuZT88= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651144983; 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=OwGzmeNiZ3Ga3V+ZHfH2GFlaZzudKb7dzwrPtk53/Zc=; b=IAuMlgZziQaHXLFC8lPYio9KWXmtNB2dC7IkMKzGViuIrt3f/L7Ezzjs+y3OA4b4vXf70k1BNOzqJgBjlOAnLYh0wNzpsAxzkhwhS1jlsMpzTAQwOJOZN6a924eoXtAtjcO7Azq4cdRoM/q7FpJkJyMmBwCyJaZKXThAf1H9QeE= 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 1651144983259899.8245307059875; Thu, 28 Apr 2022 04:23:03 -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-599-KdNpAgXZO52wE55Qv_0tTA-1; Thu, 28 Apr 2022 07:22:25 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6466801E80; Thu, 28 Apr 2022 11:22:22 +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 B230F40869CB; Thu, 28 Apr 2022 11:22:22 +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 62FDF1947046; Thu, 28 Apr 2022 11:22:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B59BC194706B for ; Thu, 28 Apr 2022 11:22:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 980795690D8; Thu, 28 Apr 2022 11:22:19 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id F24F05690CF; Thu, 28 Apr 2022 11:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651144982; 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=OwGzmeNiZ3Ga3V+ZHfH2GFlaZzudKb7dzwrPtk53/Zc=; b=SHlCLvq4DFifFtIAFkCxPisF5hz4HambtJCi0BcWsxDv7AVX7SrGEXo5g5W9E4WN6n+c/T VHr6FxtePzbRrfO3qxcS4KpiO67CNRH/HxR2QS+595BU0zNXwTKrKJ6LPmcTR+8ZBbki+l FP55fXz96brjAiR8f34VfuibZzuskoU= X-MC-Unique: KdNpAgXZO52wE55Qv_0tTA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS Date: Thu, 28 Apr 2022 12:22:14 +0100 Message-Id: <20220428112214.949430-3-berrange@redhat.com> In-Reply-To: <20220428112214.949430-1-berrange@redhat.com> References: <20220428112214.949430-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1651144984391100003 On macOS when BROKEN_POLL is set in GLib, our tests will periodically trigger a warning: (process:50880): GLib-WARNING **: 02:54:15.272: poll(2) failed due to: Ba= d file descriptor. Our code is inherantly racy, calling g_source_destroy which removes the FD from the event thread poll asynchronously but we close the FD immediately after g_source_destroy returns. With poll() this results in POLLNVAL which we're ignoring, but with select() it generates the BADF error on macOS. We need to ignore the warnings on macOS to avoid abort()ing our test programs. Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/meson.build | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index fd78d8a2fd..08d2ae67cb 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -39,9 +39,24 @@ tests_env =3D [ 'abs_top_srcdir=3D@0@'.format(meson.source_root()), 'LC_ALL=3DC', 'LIBVIRT_AUTOSTART=3D0', - 'G_DEBUG=3Dfatal-warnings', ] =20 + +# On macOS when BROKEN_POLL is set for GLib, our tests will +# periodically trigger a warning: +# +# (process:50880): GLib-WARNING **: 02:54:15.272: poll(2) failed due to: = Bad file descriptor. +# +# Our code is inherantly racy, calling g_source_destroy which +# removes the FD from the event thread poll asynchronously +# but we close the FD immediately after g_source_destroy returns. +# +# With poll() this results in POLLNVAL, but with select() it +# generates the BADF error on macOS +if host_machine.system() !=3D 'darwin' + tests_env +=3D ['G_DEBUG=3Dfatal-warnings'] +endif + if use_expensive_tests tests_env +=3D 'VIR_TEST_EXPENSIVE=3D1' else --=20 2.35.1