GLib merge requestshttps://gitlab.gnome.org/GNOME/glib/-/merge_requests2021-11-22T13:54:43Zhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/2342tests: Reformat mkenums.py slightly to make run-black.sh happy2021-11-22T13:54:43ZPhilip Withnalltests: Reformat mkenums.py slightly to make run-black.sh happyThis should remove some warnings from the CI, making it easier to see
legitimate CI failures.
For example, see https://gitlab.gnome.org/GNOME/glib/-/jobs/1621041.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>This should remove some warnings from the CI, making it easier to see
legitimate CI failures.
For example, see https://gitlab.gnome.org/GNOME/glib/-/jobs/1621041.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>Philip WithnallPhilip Withnallhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/2348gio/tests/codegen.py: bump timeout to 100 seconds2021-11-22T11:17:57ZAlexander Kanavingio/tests/codegen.py: bump timeout to 100 secondsThis may be necessary on overloaded CI systems.This may be necessary on overloaded CI systems.https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2341tests: Wait for gdbus-testserver to die when killing it2021-11-17T07:45:52ZPhilip Withnalltests: Wait for gdbus-testserver to die when killing itThis was previously done (by commit 63038d1e4c) in one of the cases
where `kill_test_service()` was called — but not the other.
This meant that one instance of `gdbus-testserver` could still be
around when (as it happens, due to the ord...This was previously done (by commit 63038d1e4c) in one of the cases
where `kill_test_service()` was called — but not the other.
This meant that one instance of `gdbus-testserver` could still be
around when (as it happens, due to the order of the tests) the
`/gdbus/proxy/no-match-rule` test was run. It would start a second
instance of `gdbus-testserver`, which would exit early due to the test
name still being owned on the bus. The first (killed) instance of
`gdbus-testserver` would then exit, leaving no test servers running, and
hence the new test would fail.
This was being seen as frequent CI failures, particularly on FreeBSD
(must have slightly different timing for process signalling and
termination from Linux).
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>Philip WithnallPhilip Withnallhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/2336tests: Drop arbitrary and flaky waits from actions tests2021-11-16T14:37:26ZPhilip Withnalltests: Drop arbitrary and flaky waits from actions testsThe `actions` test previously waited an arbitrary 100ms for various
D-Bus messages to be sent/received, before checking the results of those
messages.
Normally, this would work, but on heavily loaded CI systems, it would
sometimes fail....The `actions` test previously waited an arbitrary 100ms for various
D-Bus messages to be sent/received, before checking the results of those
messages.
Normally, this would work, but on heavily loaded CI systems, it would
sometimes fail. For example,
https://gitlab.gnome.org/GNOME/glib/-/jobs/1611701.
Fix that by waiting for the condition being checked to evaluate to true,
rather than waiting an arbitrary period of time. On faster machines,
this will speed the tests up too.
Assume that the global default `GMainContext` is in use, so a
`GMainContext*` pointer doesn’t have to be passed around.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
---
Also includes a fix for some tiny leaks in the test.Philip WithnallPhilip Withnallhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/552glib-2-58: tests: Allocate gvariant data from the heap to guarantee alignment2021-11-10T22:06:00ZMart Raudseppglib-2-58: tests: Allocate gvariant data from the heap to guarantee alignmentOn glib-2-58 branch we don't have !455, thus we need aligned data
for the gvariant tests to not fail on i686.
Fixes #1626On glib-2-58 branch we don't have !455, thus we need aligned data
for the gvariant tests to not fail on i686.
Fixes #16262.58.3https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2268gcontenttype: Ignore intentional one-time leaks from xdgmime2021-11-03T15:42:21ZPhilip Withnallgcontenttype: Ignore intentional one-time leaks from xdgmimeSee the commit messages for details.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2310
Closes #2310See the commit messages for details.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2310
Closes #2310Philip WithnallPhilip Withnallhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/2310tests: Fix a typo in a test message in gdatetime.c2021-10-25T12:11:18ZPhilip Withnalltests: Fix a typo in a test message in gdatetime.cSigned-off-by: Philip Withnall <pwithnall@endlessos.org>Signed-off-by: Philip Withnall <pwithnall@endlessos.org>Philip WithnallPhilip Withnallhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/336Meson: Fix missing files when installing tests2021-09-13T21:20:31ZXavier Claessensxclaesse@gmail.comMeson: Fix missing files when installing testsCloses #1527Closes #15272.60Philip WithnallPhilip Withnallhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/2229tests: Rewrite thread-pool test for freeing queued items2021-09-06T14:27:11ZPhilip Withnalltests: Rewrite thread-pool test for freeing queued itemsThe previous test was racy: it assumed that not all queued thread pool
jobs would start to be executed before `g_thread_pool_free()` was
called, whereas actually on some systems (particularly BSD ones), they
would all start (or even fini...The previous test was racy: it assumed that not all queued thread pool
jobs would start to be executed before `g_thread_pool_free()` was
called, whereas actually on some systems (particularly BSD ones), they
would all start (or even finish) being executed, and hence the free
function might never be called.
Rewrite the test to:
* Synchronise the test function and worker thread functions more
closely.
* Not bother about ordering the shared and exclusive variants of the
test differently. That seems to be a hangover from another test
above.
* Limit the number of worker threads to 1, rather than 2, since this
makes the test easier to control.
This has been tested with `--repeat 10000` on Linux, and it succeeds all
of those runs whereas previously it failed quite reliably.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2456
Closes #24562.69.2Philip WithnallPhilip Withnallhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/2240gio: Fix conditions in memory-monitor test2021-09-06T13:07:23ZBastien Noceragio: Fix conditions in memory-monitor testWe were lucky that this worked in some cases (the test is racy), but we
should actually run the condition check each loop, rather than when the
function is called.
Spotted by Martin Pitt:
https://github.com/GNOME/glib/commit/96a8c02d240...We were lucky that this worked in some cases (the test is racy), but we
should actually run the condition check each loop, rather than when the
function is called.
Spotted by Martin Pitt:
https://github.com/GNOME/glib/commit/96a8c02d240d7c9ae366c63771291413384bdfb7#r547738312.69.3https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2157tests: Add missing wakeup calls to gdbus-names test2021-08-19T10:46:03ZPhilip Withnalltests: Add missing wakeup calls to gdbus-names testThe tests in `gdbus-names.c` use a mixture of `GMainLoop` and iterating
a `GMainContext` directly. Some of the helper functions based around the
`OwnNameData` struct use the `loop` `GMainLoop` even when called from
tests like `watch_with...The tests in `gdbus-names.c` use a mixture of `GMainLoop` and iterating
a `GMainContext` directly. Some of the helper functions based around the
`OwnNameData` struct use the `loop` `GMainLoop` even when called from
tests like `watch_with_different_context()` which themselves use
`GMainContext` directly.
Thus, it’s possible for the `GMainLoop` to not be running, while the
test is iterating on `g_main_context_iteration()`. In this case,
`g_main_loop_quit()` is a no-op and will not wake up the `GMainContext`.
This causes the test to livelock in around 1 in 1200 test runs.
Fix this by adding an explicit `g_main_context_wakeup()` call after each
`g_main_loop_quit()` call. A more comprehensive fix would be to port all
the tests in this file to iterating `GMainContext` directly, and drop
all the `GMainLoop` usage, but I don’t have time for that right now.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>2.69.2https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2216tests: Fix error handling when testing gtestutils2021-08-05T14:13:21ZSimon McVittietests: Fix error handling when testing gtestutilsWe had two compensating bugs here. We didn't correctly clear the
error indicator after testing a test-case that calls g_test_fail(),
which meant we were leaving the error set to exit status 1 when
falling through to the next test; and th...We had two compensating bugs here. We didn't correctly clear the
error indicator after testing a test-case that calls g_test_fail(),
which meant we were leaving the error set to exit status 1 when
falling through to the next test; and then we didn't check the exit
status of the next test, but instead assumed that g_spawn_sync()
would fail (it does not).https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2130Revert "tests: Deactivate tls-bindings test suite for windows"2021-07-22T18:57:39ZPhilip WithnallRevert "tests: Deactivate tls-bindings test suite for windows"This reverts commit 7f2fef5c2691210444a08b2998b003e56b4d59f3.
There have been some changes to the gitlab-ci-win32-runner pre-clone
script which should be more successful at killing the remaining
processes after this test. See
https://gi...This reverts commit 7f2fef5c2691210444a08b2998b003e56b4d59f3.
There have been some changes to the gitlab-ci-win32-runner pre-clone
script which should be more successful at killing the remaining
processes after this test. See
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2008#note_1127126https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2162testgdate: fix -Wmisleading-indentation warning2021-06-17T09:24:48ZMichael Catanzarotestgdate: fix -Wmisleading-indentation warningNo behavior changes. Just reindent the existing code to avoid a GCC
warning spam.
I considered changing the code to not run fflush() on every iteration of
the loop, but I doubt it matters much, so I left it be.No behavior changes. Just reindent the existing code to avoid a GCC
warning spam.
I considered changing the code to not run fflush() on every iteration of
the loop, but I doubt it matters much, so I left it be.https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2152tests: A few small improvements to GBytes tests2021-06-16T13:51:41ZPhilip Withnalltests: A few small improvements to GBytes testsImprove the coverage and fix the perennial issue of using `g_assert()` in tests.Improve the coverage and fix the perennial issue of using `g_assert()` in tests.https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2154tests: Allow GResource external data tests to use llvm-objcopy2021-06-14T16:19:18ZPhilip Withnalltests: Allow GResource external data tests to use llvm-objcopyRelax the requirement for the test to only be compiled/run under gcc,
since a version of LLVM was released which supports `--add-symbol`.
`objcopy` should be overrideable to be `llvm-objcopy` by using a machine
file as per https://meson...Relax the requirement for the test to only be compiled/run under gcc,
since a version of LLVM was released which supports `--add-symbol`.
`objcopy` should be overrideable to be `llvm-objcopy` by using a machine
file as per https://mesonbuild.com/Machine-files.html#binaries.
Suggested and tested by Grigory Vasilyev.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2423
Closes #2423https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2105tests: Use a temporary file in the bookmarkfile tests2021-06-14T15:47:44ZPhilip Withnalltests: Use a temporary file in the bookmarkfile testsRather than always writing to `out.xbel` in the build directory, which
could cause issues when running tests in parallel, or expecting the
tests to not touch the build directory.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>Rather than always writing to `out.xbel` in the build directory, which
could cause issues when running tests in parallel, or expecting the
tests to not touch the build directory.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2100tests: Add missing return value check in string test2021-05-11T22:27:45ZMichael Catanzarotests: Add missing return value check in string testCoverity noticed that we were not testing the return value here. Good
Coverity!Coverity noticed that we were not testing the return value here. Good
Coverity!https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1885Extend dbus watching name tests with auto start flags and use of closures.2021-03-18T21:10:22ZMARTINSONS FredericExtend dbus watching name tests with auto start flags and use of closures.This raises the coverage of [gdbusnamewatching.c](https://gitlab.gnome.org/GNOME/glib/-/blob/master/gio/gdbusnamewatching.c) to:
- 88% lines (compared to 80% before)
- 88% functions (compared to 80% before)
- 64% branches (compared...This raises the coverage of [gdbusnamewatching.c](https://gitlab.gnome.org/GNOME/glib/-/blob/master/gio/gdbusnamewatching.c) to:
- 88% lines (compared to 80% before)
- 88% functions (compared to 80% before)
- 64% branches (compared to 52%)
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
Helps #2011https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1995tests: Fix copy/paste error in queue test2021-03-16T18:11:56ZMichael Catanzarotests: Fix copy/paste error in queue testCoverity is pretty good at detecting copy/paste errors.Coverity is pretty good at detecting copy/paste errors.