Commit Graph

24825 Commits

Author SHA1 Message Date
Emmanuel Fleury
5931ed8c2b Move test files on slices from tests/ to glib/tests/
slice-color.c and slice-concurrent.c are moved from tests/ to glib/tests/

Related to issue #1434
2022-03-22 11:42:33 +00:00
Emmanuel Fleury
1f2f3d7f37 Convert tests/slice-concurrent.c to glib test framework 2022-03-22 11:42:33 +00:00
Emmanuel Fleury
6211971c41 Convert tests/slice-color.c to glib test framework 2022-03-22 11:42:33 +00:00
Emmanuel Fleury
495508cf84 Enabling disabled slice-color test case 2022-03-22 11:42:33 +00:00
Philip Withnall
56a3747038 Merge branch 'wip/carlosg/gdatetime-before-y1000' into 'main'
glib: Format GDateTime ISO8601 years as %C%y

See merge request GNOME/glib!2563
2022-03-21 13:47:48 +00:00
Carlos Garnacho
16fcd0814e glib: Add tests for far away GDateTimes
Poke near the limits (years 9 and 9990) to ensure these also
result in a correct ISO8601 format.
2022-03-21 12:56:42 +00:00
Carlos Garnacho
c3cc6bf5eb glib: Format GDateTime ISO8601 years as %C%y
The current use of %Y does not take into account that %Y will
not pad the year with 0's, meanwhile ISO8601 does expect a full
YYYY format for all dates. This breaks the formatting with dates
prior to the year 1000.

Split this into %C%y so 2-digit, 0-padded century and year are
printed separately, this gives the expected YYYY format.
2022-03-21 12:56:42 +00:00
Alexander Shopov
96efd662c9 Update Bulgarian translation 2022-03-21 12:43:03 +00:00
Philip Withnall
2e940e125f Merge branch 'w32-skips' into 'main'
Various win32 tests skip & fixes

See merge request GNOME/glib!2540
2022-03-21 12:19:24 +00:00
Philip Withnall
48a3e8f7f2 Merge branch 'move_g_basename_test' into 'main'
Move unit test on g_basename() function to glib/tests/fileutils.c

See merge request GNOME/glib!2558
2022-03-21 12:14:59 +00:00
Philip Withnall
47f905d2f6 Merge branch 'move_relation_tests' into 'main'
Move tests/relation-test.c to glib/tests/relation.c

See merge request GNOME/glib!2559
2022-03-21 12:12:38 +00:00
Andre Klapper
513afbb09f Fix invalid markup in Bulgarian translation 2022-03-19 20:32:49 +01:00
Alexander Shopov
596fa06aaf Update Bulgarian translation 2022-03-19 16:46:07 +00:00
Sebastian Dröge
c5e12d9577 Merge branch 'wip/pwithnall/update-other-cis' into 'main'
ci: Update Coverity, mingw and Android CI images to Fedora 34

See merge request GNOME/glib!2560
2022-03-18 11:45:34 +00:00
Philip Withnall
c53129911c Merge branch 'power-profile-monitor-docs' into 'main'
gpowerprofilemonitor: Tweak wording of documentation to make more sense

See merge request GNOME/glib!2534
2022-03-18 11:34:47 +00:00
Philip Withnall
46c6ed231e ci: Update Android NDK image to Fedora 34
Don’t take the opportunity to add support for Android API 31 or update
the version of the Android NDK we’re using to r23b, though, as I
couldn’t quickly get that to work and ran out of time.

Bumping the Fedora version will at least reduce our CI repository disk
usage through sharing the base image.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2605
2022-03-18 11:27:02 +00:00
Philip Withnall
4e7b76344c ci: Update mingw image to Fedora 34
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-18 10:38:41 +00:00
Philip Withnall
a9b68f1f9b ci: Update Coverity image to Fedora 34 and latest Coverity Scan tool
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-18 10:32:08 +00:00
Sebastian Dröge
a4810e652d Merge branch 'wip/pwithnall/update-fedora-ci' into 'main'
ci: Update the Fedora CI image to Fedora 34

See merge request GNOME/glib!2543
2022-03-18 10:16:07 +00:00
Sebastian Dröge
73f918b376 Merge branch 'gdbus-method-invocation-leak' into 'main'
gdbusmethodinvocation: Fix a leak on an early return path

See merge request GNOME/glib!2557
2022-03-18 09:25:28 +00:00
Sebastian Dröge
4c8caadcfa Merge branch 'strv-contains' into 'main'
gdbusconnection: Use g_strv_contains() rather than a home-grown version

See merge request GNOME/glib!2556
2022-03-18 09:04:13 +00:00
Marc-André Lureau
e38e92e37b gio/tests/codegen: skip tests that require /dev/stdout on win32
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-18 00:20:14 +04:00
Marc-André Lureau
0bdd37b7ff glib/tests: disable a racy check on mainloop test
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-18 00:16:38 +04:00
Marc-André Lureau
56405a2fda glib/tests: skip a failing test with a FIXME
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-18 00:16:38 +04:00
Marc-André Lureau
20f8007f73 glib/tests: fix random failure due to rounding
GLib:ERROR:../glib/tests/timer.c:41:test_timer_basic: assertion failed (micros == ((guint64)(elapsed * 1e6)) % 1000000): (11 == 10)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-18 00:16:38 +04:00
Marc-André Lureau
b3d6946c27 tests/socket: skip a test if AF_UNIX is not supported on win32
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-18 00:16:38 +04:00
Marc-André Lureau
e014b9272a gio/tests: skip filemonitor tests on win32
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-18 00:16:38 +04:00
Marc-André Lureau
cfc47558fc tests: enable defaultvalue and debugcontroller on win32
The test still requires dbus-daemon.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-18 00:16:38 +04:00
Marc-André Lureau
e9d9edde82 tests: skip appmonitor test on win32
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-18 00:16:14 +04:00
Philip Withnall
a7750cd020 tests: Add unit tests for GDBusMethodInvocation
These should cover everything to do with returning a value or error from
a `GDBusMethodInvocation` object.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-17 19:17:41 +00:00
Philip Withnall
7143457076 gdbusmethodinvocation: Drop redundant quote from warning message
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-17 19:05:56 +00:00
Philip Withnall
76f5460107 gdbusmethodinvocation: Fix dead code for type checking GetAll
`property_info` is only ever set for `Get` and `Set` calls, not for
`GetAll`, as it only represents a single property. So this code was
never reachable.

Move it out so that it is reachable.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-17 19:05:56 +00:00
Philip Withnall
a3b8846e54 gdbusmethodinvocation: Fix a leak on an early return path
When doing an early return from `g_dbus_method_invocation_return_*()`
due to passing in the wrong type (or no return value when one was
expected), the parameters were not correctly sunk and were leaked.

Fix that. A unit test will be added in a following commit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Coverity CID: #1474536
2022-03-17 19:04:42 +00:00
Emmanuel Fleury
2d6dc9ff2e Move tests/relation-test.c to glib/tests/relation.c
Related to issue #1434
2022-03-17 18:36:58 +01:00
Emmanuel Fleury
372b63bf1a Convert test/relation-test.c to glib test framework 2022-03-17 18:32:31 +01:00
Emmanuel Fleury
7f7b5ba093 Move unit test on g_basename() function to glib/tests/fileutils.c
g_basename() function is defined in glib/gfileutils.c which is tested
by glib/tests/fileutils.c test set. Until now, g_basename() test was
in glib/test/utils.c. This patch move the unit test to the proper file.
2022-03-17 18:10:09 +01:00
Philip Withnall
4ef27174af tests: Use g_strv_contains() rather than a home-grown version
The public `g_strv_contains()` API didn’t exist at the time this code
was originally written. Now, happily, it does.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-17 16:28:41 +00:00
Philip Withnall
e4d77f7e89 gdbusconnection: Use g_strv_contains() rather than a home-grown version
The public `g_strv_contains()` API didn’t exist at the time this code
was originally written. Now, happily, it does.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-17 16:24:08 +00:00
Philip Withnall
9b77b75f2d Merge branch 'w32-contenttype' into 'main'
Various contenttype-related test fixes on win32

See merge request GNOME/glib!2499
2022-03-17 15:14:14 +00:00
Philip Withnall
96279325b7 Merge branch 'cleanup-warnings-split-6' into 'main'
Cleanup warnings split 6

See merge request GNOME/glib!2495
2022-03-17 15:13:14 +00:00
Philip Withnall
411a20af2b Merge branch 'find_program_python3' into 'main'
meson: simplify lookup of python command

See merge request GNOME/glib!2541
2022-03-17 15:12:39 +00:00
Philip Withnall
1756dde873 Merge branch '2312-codegen-test-leak-fix' into 'main'
tests: Fix a leak in gdbus-test-codegen test

Closes #2312

See merge request GNOME/glib!2546
2022-03-17 15:12:08 +00:00
Philip Withnall
8697c1a53c 2.72.0
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-17 15:01:31 +00:00
Charles Monzat
bc88032651 Update French translation 2022-03-17 10:57:34 +00:00
Milo Casagrande
41c9c09bc3 Update Italian translation 2022-03-17 08:34:54 +00:00
Мирослав Николић
612ab10958 Update Serbian translation 2022-03-17 06:58:23 +00:00
Simon McVittie
2fd4382821 Merge branch '2620-timezone-offset' into 'main'
gtimezone: Fix assertion failure when called with a huge offset

Closes #2620

See merge request GNOME/glib!2554
2022-03-16 16:23:35 +00:00
Philip Withnall
7ab9359af0 gtimezone: Fix assertion failure when called with a huge offset
This looks like a regression from commit 3356934db5, but prior to that
commit there was always an assertion failure when calling
`g_time_zone_new_offset()` with an offset which is too large (such as 44
hours), ever since the function was added in commit cf24867b93.

It would be ideal if we could return a `NULL` timezone to indicate the
error, but that’s not part of the API for `g_time_zone_new_offset()`, so
we have to go with the dated and not-ideal approach of returning the UTC
timezone and letting the caller figure it out.

Another potential approach would be to reduce the `offset` modulo 24
hours. This makes the error less easily detectable than if returning
UTC, though, and still returns an invalid result: `+44:00` is not the
same timezone as `+20:00` (it’s one day further ahead).

Add a unit test.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2620
2022-03-16 12:52:13 +00:00
Philip Withnall
7f0f87355b Merge branch 'mcatanzaro/typo' into 'main'
gtlsconnection: fix typo in docs

See merge request GNOME/glib!2552
2022-03-16 12:43:21 +00:00
Michael Catanzaro
69a1867d51 gtlsconnection: fix typo in docs
Grrr, copy/paste error detected.
2022-03-16 10:38:34 +00:00