1. 10 Oct, 2019 2 commits
  2. 08 Oct, 2019 1 commit
  3. 02 Oct, 2019 1 commit
  4. 30 Sep, 2019 2 commits
  5. 21 Sep, 2019 1 commit
    • Philip Withnall's avatar
      gatomic: Add various casts to use of g_atomic_*()s to fix warnings · 55f9c6d2
      Philip Withnall authored
      When compiling GLib with `-Wsign-conversion`, we get various warnings
      about the atomic calls. A lot of these were fixed by
      3ad375a6, but some remain. Fix them by
      adding appropriate casts at the call sites.
      Note that `g_atomic_int_{and,or,xor}()` actually all operate on `guint`s
      rather than `gint`s (which is what the rest of the `g_atomic_int_*()`
      functions operate on). I can’t find any written reasoning for this, but
      assume that it’s because signedness is irrelevant when you’re using an
      integer as a bit field. It’s unfortunate that they’re named a
      `g_atomic_int_*()` rather than `g_atomic_uint_*()` functions.
      Tested by compiling GLib as:
      CFLAGS=-Wsign-conversion jhbuild make -ac |& grep atomic
      I’m not going to add `-Wsign-conversion` to the set of default warnings
      for building GLib, because it mostly produces false positives throughout
      the rest of GLib.
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
      Fixes: #1565
  6. 05 Sep, 2019 2 commits
  7. 02 Sep, 2019 3 commits
    • Will Thompson's avatar
      gdbus-codegen: emit GUnixFDLists if an arg has type 'h' · 4aba0356
      Will Thompson authored
      Previously, if a method was not annotated with org.gtk.GDBus.C.UnixFD
      then the generated code would never contain GUnixFDList parameters, even
      if the method has 'h' (file descriptor) parameters. However, in this
      case, the generated code is essentially useless: the method cannot be
      called or handled except in degenerate cases where the file descriptors
      are missing or ignored.
      Check the argument types for 'h', and if present, generate code as if
      org.gtk.GDBus.C.UnixFD annotation were specified.
      This change will break any existing code which refers to the (useless)
      wrappers for such methods. The workaround for such code is to add the
      org.gtk.GDBus.C.UnixFD annotation, which will cause the same generated
      code to be emitted before and after this change.
      If this is found to cause widespread problems, we can explore a
      different approach (perhaps emitting a warning from the code generator,
      or annotating the symbols as deprecated).
    • Philip Withnall's avatar
    • Will Thompson's avatar
      gdbus-codegen: process C.UnixFD annotation in one place · 9b827e56
      Will Thompson authored
      This will make it simpler to enable this behaviour based on the method
  8. 29 Aug, 2019 1 commit
    • Ting-Wei Lan's avatar
      meson: Move libdl_dep to the top level · fe3c1660
      Ting-Wei Lan authored
      Instead of letting each directory to find its way to link with libdl,
      it is easier to put the check in the top level, so its result can be
      used by all directories.
      It is a follow-up of !810.
  9. 21 Aug, 2019 4 commits
  10. 29 Jul, 2019 1 commit
  11. 25 Jul, 2019 1 commit
  12. 24 Jul, 2019 1 commit
    • Emmanuele Bassi's avatar
      build: Remove unsupported `install` directives · 00d7568e
      Emmanuele Bassi authored
      We're using the `install` argument for configure_file() all over the
      The support for an `install` argument for configure_file() was added in
      Meson 0.50, but we haven't bumped the minimum version of Meson we
      require, yet; which means we're getting compatibility warnings when
      using recent versions of Meson, and undefined behaviour when using older
      The configure_file() object defaults to `install: false`, unless an
      install directory is used. This means that all instances of an `install`
      argument with an explicit `true` or `false` value can be removed,
      whereas all instances of `install` with a value determined from a
      configuration option must be turned into an explicit conditional.
  13. 16 Jul, 2019 1 commit
  14. 15 Jul, 2019 1 commit
  15. 13 Jul, 2019 1 commit
  16. 11 Jul, 2019 1 commit
    • Chun-wei Fan's avatar
      meson: Mostly assume clang-cl is MSVC · e8d471f3
      Chun-wei Fan authored
      We need to enable building the dirent and gnulib sources for clang-cl,
      as we are still using the Microsoft-style headers and lib's and CRT.
      We need to also do this for the following, for similar reasoning:
      -Symbol export (via __declspec(dllexport))
      -Dependency discovery without pkg-config files
      -long long and ssize_t detection
      We do, however, enable the autoptr tests for clang-cl builds.  Note that
      at this point real MSVC builds are still better supported than clang-cl
      builds, and it will likely remain so for at least the near future,
      alhtough real MSVC builds of the GTK stack are consumable and are usable
      by clang-cl.
  17. 04 Jul, 2019 2 commits
    • Matthew Leeds's avatar
      gdbus-connection-loss: Fix test failure · 59ce6b10
      Matthew Leeds authored
      Now that we're not calling g_object_run_dispose() indirectly in
      g_test_dbus_down() (see commit "Revert "gtestdbus: Properly close server
      connections""), the test gdbus-connection-loss is failing with the
      message "Bail out! GLib-GIO-FATAL-WARNING: Weak notify timeout, object
      ref_count=1". This is because we're holding a reference to the singleton
      connection object while calling session_bus_down() in the test's main().
      So then we end up waiting for 30 seconds in
      _g_object_unref_and_wait_weak_notify() for the GWeakNotify to be
      triggered, which never happens.
      The fix is to unref the connection before calling session_bus_down().
      This is consistent with how other tests work, and is safe because the
      only method called on the connection has already errored out, as
      asserted by the test.
    • Matthew Leeds's avatar
      Revert "Work around test failure in gdbus-names" · 1c63d5d5
      Matthew Leeds authored
      This reverts commit c37cd19f.
      Now that we've reverted the commit "gtestdbus: Properly close server
      connections", g_test_dbus_down() no longer returns early and we no
      longer need this workaround. Since the gdbus-names test seems to
      properly unref its GDBusConnection objects it's not clear to me why it
      needed the sleep to succeed. However even at the time the failure wasn't
      reproducible according to this comment[1] so it's probably not worth
      spending more effort trying to reproduce it now.
      [1] #787 (comment 214235)
  18. 28 Jun, 2019 1 commit
    • Philip Withnall's avatar
      tests: Don’t spawn test processes via the terminal in the appinfo test · d50caa8f
      Philip Withnall authored
      There seems to be no reason to do so, and since the `appinfo` test was
      ported to use `G_TEST_OPTION_ISOLATE_DIRS`, it has been causing
      coredumps to accumulate. `gnome-terminal` was chosen as the terminal,
      but it couldn’t find its GSettings schemas due to all the XDG
      environment variables being cleared to `/dev/null` by
      In order to keep using `gnome-terminal` as a subprocess in the tests,
      we’d need to explicitly set up its environment so it can load the right
      GSettings schemas. That’s a lot of work for not much gain.
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
      Helps: #436
  19. 24 Jun, 2019 2 commits
    • Chun-wei Fan's avatar
      Fix module tests on Visual Studio builds · dbea8d54
      Chun-wei Fan authored
      On Visual Studio, Meson builds modules as xxxx.dll, not libxxxx.dll when
      xxxx is specified as the name for the shared_module() build directive.
      This means that in the test programs if we expect for libxxxx for the
      module name, the test will fail as there is no libxxxx.dll but there is
      xxxx.dll.  This makes the test program look for the module files
    • Chun-wei Fan's avatar
      gio/tests/resourceplugin.c: Ensure entry points are exported · edc5eb98
      Chun-wei Fan authored
      Ensure that the entry points/symbols are exported on Visual Studio
      builds as well.
  20. 17 Jun, 2019 4 commits
    • Michael Catanzaro's avatar
      gdbus: run peer test multiple times with different addresses · 16cdda5d
      Michael Catanzaro authored
      This ensures that D-Bus connections established with unix:dir and
      unix:path addresses actually work properly. Previously, we only tested
      unix:tmpdir and TCP addresses.
    • Michael Catanzaro's avatar
      gdbus: Fix minor leak in peer test · eca16677
      Michael Catanzaro authored
      This has to be freed even on Windows.
    • Michael Catanzaro's avatar
      gdbus: Clean up sockets and nonces from filesystem · beac9fe2
      Michael Catanzaro authored
      When we close the GDBusServer, it should remove any non-abstract Unix
      sockets or TCP nonce files it created from the filesystem.
      Fixes #1808
    • Michael Catanzaro's avatar
      gdbus: support unix:dir= addresses · fc597fa5
      Michael Catanzaro authored
      unix:dir= addresses are exactly the same as unix:tmpdir= addresses,
      already supported by GDBus, except they forbid use of abstract sockets.
      This is convenient for situations where abstract sockets are
      impermissible, such as when a D-Bus client inside a network namespace
      needs to connect to a server running in a different network namespace.
      An abstract socket cannot be shared between two processes in different
      network namespaces.
      Applications could use unix:path= addresses instead, so this is only a
      convenience, but there's no good reason not to support unix:dir=.
      Currently it is not supported simply because unix:dir= is a relatively
      recent addition to the D-Bus spec.
  21. 11 Jun, 2019 1 commit
  22. 10 Jun, 2019 2 commits
  23. 04 Jun, 2019 1 commit
  24. 03 Jun, 2019 2 commits
  25. 31 May, 2019 1 commit
    • Philip Withnall's avatar
      tests: Fix small race in GSubprocess tests · 7f256e63
      Philip Withnall authored
      This was introduced in commit 7846d615: g_subprocess_get_identifier()
      will return NULL after the subprocess has exited, and the subprocess in
      the `noop` test will exit as soon as it has started spawning. So if the
      scheduler scheduled the testprog subprocess quickly, descheduled the
      parent test process until the testprog exited, then the return value
      from g_subprocess_get_identifier() would be NULL.
      Move the g_subprocess_get_identifier() test to one which calls testprog
      in `sleep-forever` mode, since that is guaranteed not to exit until
      killed (which we do later in the test).
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>