]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: don't set G_DEBUG=fatal-warnings on macOS
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 28 Apr 2022 10:37:59 +0000 (11:37 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 28 Apr 2022 12:45:44 +0000 (13:45 +0100)
commita055308668d007cdd6795ab42b8530efa2e49a95
tree4bfce7c5bbdbaeffdea3efd91f50e0315da1ebc9
parentd4d5cebdf18bda064a014166fa5876d42d519647
tests: don't set G_DEBUG=fatal-warnings on macOS

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 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.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/303
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
build-aux/syntax-check.mk
tests/meson.build