Re: [libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS

2022-05-03 Thread Daniel P . Berrangé
On Mon, May 02, 2022 at 03:28:50PM +0200, Martin Kletzander wrote: > On Fri, Apr 29, 2022 at 01:05:42AM -0700, Andrea Bolognani wrote: > > On Thu, Apr 28, 2022 at 05:55:41PM +0100, Daniel P. Berrangé wrote: > > > On Thu, Apr 28, 2022 at 08:33:46AM -0700, Andrea Bolognani wrote: > > > > In other wor

Re: [libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS

2022-05-02 Thread Martin Kletzander
On Fri, Apr 29, 2022 at 01:05:42AM -0700, Andrea Bolognani wrote: On Thu, Apr 28, 2022 at 05:55:41PM +0100, Daniel P. Berrangé wrote: On Thu, Apr 28, 2022 at 08:33:46AM -0700, Andrea Bolognani wrote: > In other words, the current implementation of g_poll() on macOS > doesn't follow the contract

Re: [libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS

2022-04-29 Thread Andrea Bolognani
On Thu, Apr 28, 2022 at 05:55:41PM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 28, 2022 at 08:33:46AM -0700, Andrea Bolognani wrote: > > In other words, the current implementation of g_poll() on macOS > > doesn't follow the contract defined by GLib itself. It seems to me > > that this is a (fair

Re: [libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS

2022-04-28 Thread Daniel P . Berrangé
On Thu, Apr 28, 2022 at 08:33:46AM -0700, Andrea Bolognani wrote: > On Thu, Apr 28, 2022 at 02:52:45PM +0100, Daniel P. Berrangé wrote: > > > #else > > > if (select() < 0) > > > if (!EBADF) > > > return -1; > > > #endif > > > > > > > > instead? If acting on an fd that's alread

Re: [libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS

2022-04-28 Thread Andrea Bolognani
On Thu, Apr 28, 2022 at 02:52:45PM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 28, 2022 at 06:39:42AM -0700, Andrea Bolognani wrote: > > Shouldn't GLib be > > changed to do something like > > > > #ifndef BROKEN_POLL > > if (poll() < 0) > > if (!POLLNVAL) > > return -1; > > Th

Re: [libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS

2022-04-28 Thread Daniel P . Berrangé
On Thu, Apr 28, 2022 at 06:39:42AM -0700, Andrea Bolognani wrote: > On Thu, Apr 28, 2022 at 12:22:14PM +0100, Daniel P. Berrangé wrote: > > +# On macOS when BROKEN_POLL is set for GLib, our tests will > > +# periodically trigger a warning: > > +# > > +# (process:50880): GLib-WARNING **: 02:54:15.2

Re: [libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS

2022-04-28 Thread Andrea Bolognani
On Thu, Apr 28, 2022 at 12:22:14PM +0100, Daniel P. Berrangé wrote: > +# 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 inh

[libvirt PATCH 2/2] tests: don't set G_DEBUG=fatal-warnings on macOS

2022-04-28 Thread Daniel P . Berrangé
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: Bad file descriptor. Our code is inherantly racy, calling g_source_destroy which removes the FD from the event thread poll asynchronou