summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | build/gmodule-2.0.pc: Move compiler flags from Libs to CflagsJan Tojnar2023-03-313-8/+10
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, `-Wl,--export-dynamic` was in `Libs` key of `gmodule-2.0.pc`, even though `-Wl` is a compiler flag, rather than a linker one. This caused issues with API reference builds in evolution-data-server, which passes the output of `pkg-config --libs` through `--ldflags` argument of `gtkdoc-scan`, which are forwarded unchanged to `ld`: ld: unrecognized option '-Wl,--export-dynamic' Let’s move the flag to `Cflags` so that the compiler can deal with it. https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/463
* | | | | | | | Merge branch 'fuzz-normalize-utf8' into 'main'Philip Withnall2023-04-142-0/+49
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add fuzzing harness for g_utf8_normalize() See merge request GNOME/glib!3342
| * | | | | | | | Add fuzzing harness for g_utf8_normalize()Todd Carson2023-04-142-0/+49
| | | | | | | | |
* | | | | | | | | Merge branch 'meson-system-libintl-detection' into 'main'Philip Withnall2023-04-141-3/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | meson: Fix detection of a system-provided proxy-libintl See merge request GNOME/glib!3352
| * | | | | | | | | meson: Fix detection of a system-provided proxy-libintlNirbheek Chauhan2023-03-261-3/+4
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proxy-libintl defines ngettext() as a define in the header that points to the actual symbol in the library which is g_libintl_ngettext(). Same with bind_textdomain_codeset().
* | | | | | | | | Merge branch 'socket-nonblock' into 'main'Philip Withnall2023-04-147-66/+122
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gsocket/inotify/gwakeup: Use SOCK_NONBLOCK and O_NONBLOCK to avoid fcntl() syscalls where possible See merge request GNOME/glib!3347
| * | | | | | | | | gsocket: Improve wording in a warning message slightlyPhilip Withnall2023-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | gwakeup: Use O_NONBLOCK to avoid a fcntl() syscall where possiblePhilip Withnall2023-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create the wakeup pipe using the `O_NONBLOCK` flag for `pipe2()`, where possible. This saves a couple of `fcntl()` syscalls every time a wakeup pipe is created, which is at least once per `GMainContext`. This uses the `O_NONBLOCK` support added to `g_unix_open_pipe()` in the previous commit. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | glib-unix: Add O_NONBLOCK support to g_unix_open_pipe()Philip Withnall2023-03-234-23/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for it, but don’t use it anywhere yet — this is an API addition, but currently doesn’t cause any functional changes. It’ll be used in the next commit. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | inotify: Use IN_NONBLOCK to avoid a fcntl() syscall where possiblePhilip Withnall2023-03-231-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `inotify_init1()` API has supported this flag for a long time (possibly since it was first introduced, although I haven’t bothered doing the archaeology). This saves a syscall when first connecting to inotify. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | gsocket: Use SOCK_NONBLOCK to avoid a fcntl() syscall where possiblePhilip Withnall2023-03-231-38/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the libc and kernel support `SOCK_NONBLOCK`, we can specify that in the `socket()` flags, and avoid a subsequent call to `fcntl()` to set `O_NONBLOCK`. For modern Linux distributions, this will save a syscall when creating a socket. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | | | | | | | | | Merge branch 'move-msvc-recommended-pragmas' into 'main'Philip Withnall2023-04-143-5/+5
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | meson: Move msvc_recommended_pragmas.h to a subdirectory See merge request GNOME/glib!3340
| * | | | | | | | | | meson: Move msvc_recommended_pragmas.h to a subdirectoryPhilip Withnall2023-03-213-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It’s cluttering up the root directory. This should introduce no functional changes. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | | | | | | | | | | Merge branch 'gio-tool-info-strings' into 'main'Philip Withnall2023-04-141-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gio-tool-info: Fix a duplicate attribute name in the UI See merge request GNOME/glib!3337
| * | | | | | | | | | | gio-tool-info: Fix a duplicate attribute name in the UIPhilip Withnall2023-03-211-1/+1
| | |_|_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `gio info` currently prints ‘display name:’ twice. One of those should be ‘edit name:’ — this regressed in commit a374b7c806ca99f75439cffd746e7fbef0fa7a9b. Various translations still have the old string, but some unfortunately do not, so this is effectively a new translatable string again. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | | | | | | | | | | Merge branch 'bsd-libelf-enabled' into 'main'Philip Withnall2023-04-141-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | meson: allow -Dlibelf=enabled without pkg-config See merge request GNOME/glib!3335
| * | | | | | | | | | | meson: allow -Dlibelf=enabled without pkg-configJan Beich2023-03-201-1/+1
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gio/meson.build:933:0: ERROR: Dependency "libelf" not found, tried pkgconfig
* | | | | | | | | | | Merge branch 'post-release-version-stuff' into 'main'Philip Withnall2023-04-144-1/+13
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build: Post-release version bump See merge request GNOME/glib!3378
| * | | | | | | | | | | docs: Add 2.78 release series documentation pages to the buildPhilip Withnall2023-04-143-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | | | build: Post-release version bumpPhilip Withnall2023-04-141-1/+1
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | | | | | | | | | | Merge branch '1264-gdbus-double-unref' into 'main'Philip Withnall2023-04-142-56/+72
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdbusconnection: Fix double unref on timeout/cancel sending a message Closes #1264 See merge request GNOME/glib!3291
| * | | | | | | | | | gdbusconnection: Improve refcount handling of timeout sourcePhilip Withnall2023-04-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ref on the timeout source owned by `SendMessageData` was being dropped just after attaching the source to the main context, leaving it unowned in that struct. That meant the only ref on the source was held by the `GMainContext` it was attached to. This ref was dropped when returning `G_SOURCE_REMOVE` from `send_message_with_reply_timeout_cb()`. Before that happens, `send_message_data_deliver_error()` is called, which normally calls `send_message_with_reply_cleanup()` and destroys the source. However, if `send_message_data_deliver_error()` is called when the message has already been delivered, calling `send_message_with_reply_cleanup()` will be skipped. This leaves the source pointer in `SendMessageData` dangling, which will cause problems when `g_source_destroy()` is subsequently called on it. I’m not sure if it’s possible in practice for this situation to occur, but the code certainly does nothing to prevent it, and it’s easy enough to avoid by keeping a strong ref on the source in `SendMessageData`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1264
| * | | | | | | | | | gdbusconnection: Rearrange refcount handling of map_method_serial_to_taskPhilip Withnall2023-04-141-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It already implicitly held a strong ref on its `GTask` values, but didn’t have a free function set so that they would be automatically unreffed on removal from the map. This meant that the functions handling removals from the map, `on_worker_closed()` (via `cancel_method_on_close()`) and `send_message_with_reply_cleanup()` had to call unref once more than they would otherwise. In `send_message_with_reply_cleanup()`, this behaviour depended on whether it was called with `remove == TRUE`. If not, it was `(transfer none)` not `(transfer full)`. This led to bugs in its callers. For example, this led to a direct leak in `cancel_method_on_close()`, as it needed to remove tasks from `map_method_serial_to_task`, but called `send_message_with_reply_cleanup(remove = FALSE)` and erroneously didn’t call unref an additional time. Try and simplify it all by setting a `GDestroyNotify` on `map_method_serial_to_task`’s values, and making the refcount handling of `send_message_with_reply_cleanup()` not be conditional on its arguments. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1264
| * | | | | | | | | | gdbusprivate: Use G_SOURCE_REMOVE in a source callbackPhilip Withnall2023-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is equivalent to the current behaviour, but a little clearer in its meaning. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1264
| * | | | | | | | | | gdbusprivate: Improve ownership docs for write_message_async()Philip Withnall2023-04-141-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ownership transfers in this code are a bit complex, so adding some extra documentation and `g_steal_pointer()` calls should hopefully help clarify things. This doesn’t introduce any functional changes, just code documentation. Another drive-by improvement in the quest for #1264. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1264
| * | | | | | | | | | gdbusprivate: Ensure data->task is cleared when it returnsPhilip Withnall2023-04-141-21/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing comment in the code was correct that `data` is freed when the task callback is called, because `data` is also pointed to by the `user_data` for the task, and that’s freed at the end of the callback. So the existing code was correct to take a copy of `data->task` before calling `g_task_return_*()`. After calling `g_task_return_*()`, the existing code unreffed the task (which is correct), but then didn’t clear the `data->task` pointer, leaving `data->task` dangling. That could cause a use-after-free or a double-unref. Avoid that risk by explicitly clearing `data->task` before calling `g_task_return_*()`. After some testing, it turns out this doesn’t actually fix any bugs, but it’s still a good robustness improvement. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1264
| * | | | | | | | | | gdbusprivate: Improve docs on message ownership in MessageToWriteDataPhilip Withnall2023-02-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn’t introduce any functional changes, but should make the code a little clearer. Drive-by improvements while trying to debug #1264. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1264
| * | | | | | | | | | gdbusconnection: Improve docs of message ownership in closuresPhilip Withnall2023-02-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces no functional changes, but makes it a little clearer how the ownership of these `GDBusMessage` instances works. The free function is changed to `g_clear_object()` to avoid the possibility of somehow using the messages after freeing them. Basically just some drive-by docs improvements while trying to debug issue #1264. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1264
| * | | | | | | | | | gdbusconnection: Fix the type of a free functionPhilip Withnall2023-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This didn’t actually cause any observable bugs, since the structures of `PropertyData` and `PropertyGetAllData` were equivalent for the members which the free function touches. Definitely should be fixed though. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | | gdbusconnection: Fix double unref on timeout/cancel sending a messagePhilip Withnall2023-02-231-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This appears to fix an intermittent failure seen when sending a D-Bus message with either of a cancellable or a timeout set. In particular, I can reliably reproduce it with: ``` meson test gdbus-test-codegen-min-required-2-64 --repeat 10000 ``` It can be caught easily with asan when reproduced. Tracking down the location of the refcount mismatch was a little tricky, but was simplified by replacing a load of `g_object_ref (message)` calls with `g_dbus_message_copy (message, NULL)` to switch `GDBusMessage` handling to using copy semantics. This allowed asan to home in on where the refcount mismatch was happening. The problem was that `send_message_data_deliver_error()` takes ownership of the `GTask` passed to it, but the `send_message_with_replace_cancelled_idle_cb()` and `send_message_with_reply_timeout_cb()` functions which were calling it, were not passing in a strong reference as they should have. Another approach to fixing this would have been to change the transfer semantics of `send_message_data_deliver_error()` so it was `(transfer none)` on its `GTask`. That would probably have resulted in cleaner code, but would have been a lot harder to verify/review the fix, and easier to inadvertently introduce new bugs. The fact that the bug was only triggered by the cancellation and timeout callbacks explains why it was intermittent: these code paths are typically never hit, but the timeout path may sometimes be hit on a very slow test run. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #1264
* | | | | | | | | | | Merge branch 'signal-handler-matching-docs' into 'main'Marco Trevisan2023-04-142-8/+23
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gsignal: Clarify documentation for GSignalMatchType matching See merge request GNOME/glib!3377
| * | | | | | | | | | | gsignal: Clarify documentation for GSignalMatchType matchingPhilip Withnall2023-04-142-8/+23
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of ‘OR’ in the existing documentation suggests that the matching is disjunctive, but it’s actually conjunctive. Clarify that in the documentation and add a test. Spotted while reviewing https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3376. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | | | | | | | | | | Merge branch '95-markup-docs' into 'main'Emmanuele Bassi2023-04-133-0/+174
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docs: Add simple GMarkup parser example Closes #95 See merge request GNOME/glib!3364
| * | | | | | | | | | | docs: Add simple GMarkup parser exampleDavid King2023-04-113-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on an initial parser by Luc Pionchon. Tweaked to update to the latest coding standards by Philip Withnall. Fixes: #95
* | | | | | | | | | | | Merge branch '799-app-info-monitor-docs' into 'main'Emmanuele Bassi2023-04-132-33/+102
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gappinfo: Clarify one-shot behaviour of GAppInfoMonitor::changed in docs Closes #799 See merge request GNOME/glib!3346
| * | | | | | | | | | | | tests: Add some explanatory comments to appmonitor testPhilip Withnall2023-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should split the code up into logical blocks a bit better, and make it a bit easier to see what the test is doing at a glance. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | | | | tests: Port appmonitor test from GMainLoop to using GMainContext directlyPhilip Withnall2023-03-221-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the exit conditions for each main loop clearer, and eliminates use of global variables. It introduces no functional changes. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | | | | tests: Fix non-removal of a timeout in appmonitor testPhilip Withnall2023-03-221-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the first part of the test takes less than 3s (which is normal), the timeout for it is not removed, and could spuriously fire during the second part of the test, causing a false failure. Instead of relying on source IDs, just use (and explicitly destroy) a `GSource` for the timeouts. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | | | | tests: Fix a FIXME in the appmonitor testPhilip Withnall2023-03-221-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test thought that calling `g_app_info_get()` was a bit of a hack, but actually it (or calling another `g_app_info_*()` function) is the right way to use the `GAppInfoMonitor` API. See the documentation improvements a couple of commits back for details. The remaining FIXME higher up in the test should probably be fixed by getting `g_app_info_monitor_get()` to arm the signal. That requires changes in `g_app_info_monitor_get()` to call `desktop_file_dir_init()`. That will have to happen another time. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #799
| * | | | | | | | | | | | tests: Use g_assert_*() rather than g_assert() in appmonitor testsPhilip Withnall2023-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It won’t get compiled out with `G_DISABLE_ASSERT`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | | | | | | | | | | tests: Add copyright/licensing header to appmonitor testsPhilip Withnall2023-03-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is put together through git archaeology: ``` git log gio/tests/appmonitor.c ``` The following commits were too trivial to have meaningful copyright: - 54047080e963b2d6c3f966340dcd9d788b73ac9c - 4e7d22e268a4e06beb1c09585a48288c31004da5 - f2c1cfe8c770f73367a021044bcdda550348714c - f8f344923eba57ca13d82e53f3e7b82633179f43 - 3ce00b29ec0bb240412506affb5c65bdb18c7ad3 - 346836962521cce76f3cbd53259a985d3bef6a2a - e9d9edde824df1229bc5539610b98c98013e93aa Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1415
| * | | | | | | | | | | | gappinfo: Clarify one-shot behaviour of GAppInfoMonitor::changed in docsPhilip Withnall2023-03-221-7/+28
| | |_|_|_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #799
* | | | | | | | | | | | Merge branch 'libicu-tests' into 'main'Emmanuele Bassi2023-04-132-1/+53
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unicode: add tests for g_utf8_normalize() and empty strings See merge request GNOME/glib!3326
| * | | | | | | | | | | | glib: unicode: add some empty string testsGuillaume Desmottes2023-03-151-0/+12
| | | | | | | | | | | | |
| * | | | | | | | | | | | glib: unicode: add tests for g_utf8_normalize()Guillaume Desmottes2023-03-151-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test corner cases and some examples from Unicode Standard Annex #15 http://unicode.org/reports/tr15/
| * | | | | | | | | | | | glib: unicode: fix unicode standard linkGuillaume Desmottes2023-03-151-1/+1
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge branch '322-proxy-subclass-example' into 'main'Emmanuele Bassi2023-04-131-0/+102
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests: Finish update of gdbus-example-proxy-subclass to new GDBus API Closes #322 See merge request GNOME/glib!3332
| * | | | | | | | | | | | | tests: Finish update of gdbus-example-proxy-subclass to new GDBus APIColin Walters2023-03-201-0/+102
| | |_|_|_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug #624696. Incorporates a more recent change from 1dc774a653e992e1 to drop the `g_type_init()` call, and reformats the indentation a bit. Fixes: #322
* | | | | | | | | | | | | Merge branch 'update-unicode-normalisation-tests' into 'main'Emmanuele Bassi2023-04-131-5/+87
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests: Update Unicode normalisation tests from Unicode 15 See merge request GNOME/glib!3351
| * | | | | | | | | | | | | tests: Update Unicode normalisation tests from Unicode 15Philip Withnall2023-03-241-5/+87
| | |_|_|_|_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file comes from https://www.unicode.org/Public/UCD/latest/ucd/NormalizationTest.txt. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>