Commit Graph

24572 Commits

Author SHA1 Message Date
Philip Withnall
10e5c21102 Merge branch 'desktop-app-info-leak' into 'main'
gdesktopappinfo: Fix a leak when launching URIs over D-Bus

See merge request GNOME/glib!2510
2022-02-18 12:06:13 +00:00
Philip Withnall
e80569bd86 Merge branch 'iochannel-test' into 'main'
tests: Merge iochannel-test into io-channel tests in glib directory

See merge request GNOME/glib!2502
2022-02-18 10:39:43 +00:00
Philip Withnall
a60424b644 Merge branch 'backtrace-unused-variable' into 'main'
gbacktrace: Fix a set-but-not-used variable

See merge request GNOME/glib!2503
2022-02-18 10:39:22 +00:00
Philip Withnall
3583526c2d Merge branch 'disable-assert-fix' into 'main'
gresource-tool: Fix unused-but-set-variable warn with G_DISABLE_ASSERT

See merge request GNOME/glib!2506
2022-02-18 10:38:44 +00:00
Philip Withnall
5046dd8679 Merge branch 'fix-style-check' into 'main'
codegen: Reformat parser.py according to black

See merge request GNOME/glib!2508
2022-02-18 10:38:05 +00:00
Philip Withnall
f6aafcd028 gdesktopappinfo: Fix a leak when launching URIs over D-Bus
If any platform data is set, the temporary `GVariantDict` was being
leaked.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-18 10:35:10 +00:00
Philip Withnall
d551e81812 Merge branch 'fix-compile-resources-leak' into 'main'
glib-compile-resources: Fix a memory leak of the compiler option

See merge request GNOME/glib!2501
2022-02-18 10:34:25 +00:00
Philip Withnall
019aed7bc5 Merge branch 'cleanup-warnings-split-1' into 'main'
Cleanup warnings split 1

See merge request GNOME/glib!2490
2022-02-18 10:23:34 +00:00
Philip Withnall
51b707bdc6 Merge branch 'debugcontroller-test-fix' into 'main'
gdebugcontrollerdbus: Track pending tasks with weak refs

See merge request GNOME/glib!2504
2022-02-18 10:10:56 +00:00
Loic Le Page
258775a1a6 Hide non-fatal level-4 warnings and repetitions during build 2022-02-18 10:24:57 +01:00
Loic Le Page
1e9f5d6392 Update subproject pcre.wrap to last version
Last pcre.wrap version cleans up warnings on Windows builds.
2022-02-18 10:19:07 +01:00
Kukuh Syafaat
979b9af242 Update Indonesian translation 2022-02-18 02:04:31 +00:00
Philip Withnall
f300e883e7 codegen: Reformat parser.py according to black
This fixes the `style-check-diff` CI job.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-18 01:45:10 +00:00
Philip Withnall
425702df9c gresource-tool: Fix unused-but-set-variable warn with G_DISABLE_ASSERT
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-18 01:40:44 +00:00
Philip Withnall
9652a3dd79 gdebugcontrollerdbus: Track pending tasks with weak refs
Rather than tracking them with a counter. This should close the race in
tracking the finalisation of the tasks by the task worker thread.
There’s no way to synchronise with that thread as it’s internal to
`g_task_run_in_thread()`.

This should hopefully stop the `debugcontroller` test being flaky.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2486#note_1384102

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-18 00:46:07 +00:00
Philip Withnall
0694c1a5ad gbacktrace: Fix a set-but-not-used variable
It’s only used if building for lldb. Spotted in the log from an oss-fuzz
build:
https://oss-fuzz-build-logs.storage.googleapis.com/log-051f05da-adf5-42c1-8f14-5e36ba750573.txt:
```
Step #12 - "compile-honggfuzz-address-x86_64": [36/1232] Compiling C object glib/libglib-2.0.a.p/gbacktrace.c.o
Step #12 - "compile-honggfuzz-address-x86_64": ../../src/glib/glib/gbacktrace.c:324:24: warning: variable 'line_idx' set but not used [-Wunused-but-set-variable]
Step #12 - "compile-honggfuzz-address-x86_64":   int sel, idx, state, line_idx;
Step #12 - "compile-honggfuzz-address-x86_64":                        ^
Step #12 - "compile-honggfuzz-address-x86_64": 1 warning generated.
```

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-17 21:46:39 +00:00
Philip Withnall
5b7383c544 tests: Merge iochannel-test into io-channel tests in glib directory
We’re trying to eliminate the legacy `tests/` directory. This commit
moves the code from `tests/iochannel-test.c` into
`glib/tests/io-channel.c` and ports it to the latest GLib test coding
standards:
 * Change `g_assert()` to `g_assert_*()`
 * Print verbose messages with `g_test_message()`
 * Rename some variables to conform to modern conventions
 * Use `GTest`

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

Helps: #1434
2022-02-17 21:42:35 +00:00
Philip Withnall
a09aca68d4 glib-compile-resources: Fix a memory leak of the compiler option
`G_OPTION_ARG_STRING` returns a newly allocated string, not a `const`
one.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-17 21:18:27 +00:00
Philip Withnall
d286ea0c57 Merge branch 'unix_mount_points' into 'main'
Add cache to g_unix_mount_points_get()

See merge request GNOME/glib!1707
2022-02-16 10:53:40 +00:00
rim
37b39c525f Add cache to g_unix_mount_points_get() 2022-02-16 10:53:40 +00:00
Philip Withnall
c70673d011 Merge branch 'w32-tests-date' into 'main'
Various glib/tests/date fixes on win32

See merge request GNOME/glib!2480
2022-02-16 00:07:53 +00:00
Marc-André Lureau
4549a97a75 glib/tests: ucrt locale date output is a bit different
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-02-15 23:21:49 +00:00
Marc-André Lureau
f7c66423a4 glib/tests: set Polish ThreadLocale on win32 to fix a test
Fixes /date/month_substring
Bail out! GLib:ERROR:../glib/tests/date.c:1090:test_month_substring: 'g_date_valid (&date)' should be TRUE

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-02-15 23:21:49 +00:00
Marc-André Lureau
051d000acd glib/tests: fix checking two-digit years on Windows
Fixes:
ok 10 /date/parse_locale_change

(when locale th_TH available)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-02-15 23:21:49 +00:00
Marc-André Lureau
acb46f8b36 glib/tests: add comment about %Z strftime on w32
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-02-16 03:00:06 +04:00
Yosef Or Boczko
11997a4d25 Update Hebrew translation 2022-02-15 20:57:50 +00:00
Luming Zh
19ff527cda Update Chinese (China) translation 2022-02-15 19:10:16 +00:00
Philip Withnall
40fc53d3aa 2.71.2
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-15 14:25:23 +00:00
Philip Withnall
c39c2a2821 Merge branch 'ebassi/issue-2601' into 'main'
Fix the DocBook codegen

Closes #2601

See merge request GNOME/glib!2489
2022-02-15 14:07:02 +00:00
Emmanuele Bassi
3bf76da56e Merge branch 'coverage-link' into 'main'
ci: Add link to Coverage output at end of coverage job

See merge request GNOME/glib!2467
2022-02-15 13:17:44 +00:00
Philip Withnall
b5873878cd Merge branch '1190-debugging-docs' into 'main'
gdebugcontroller: Add documentation and tests

Closes #1190

See merge request GNOME/glib!2486
2022-02-15 12:47:50 +00:00
Emmanuele Bassi
47ce6432f3 codegen: Verify that we're generating valid XML
We should output valid XML even when getting an iffy annotation.
2022-02-15 12:14:49 +00:00
Philip Withnall
00ba3ceacc Merge branch 'wip/smcv/aligned-alloc-tests' into 'main'
Fix some problems with g_aligned_alloc() tests

See merge request GNOME/glib!2488
2022-02-15 11:52:46 +00:00
Emmanuele Bassi
17f38affa2 codegen: Add missing closing angular bracket
We are matching `<parameter>` as well as `<para>`, and we
end up with broken XML in case the (expanded) description
starts with `<parameter>`.

Fixes: #2601
2022-02-15 11:51:11 +00:00
Emmanuele Bassi
6ddf760507 codegen: Remove flake8 lint rule
Using `flake8: noqa` disables ALL linting on a file. Adding
an error code does not limit the linter to that error.
2022-02-15 11:48:58 +00:00
Emmanuele Bassi
128ae2b5f5 codegen: Fix whitespace
This is Python, not C.
2022-02-15 11:48:28 +00:00
Emmanuele Bassi
fe3f699371 Add .flake8 file
The flake8 validation tool prefers an actual configuration
file to inline comments to disable the lint.
2022-02-15 11:47:30 +00:00
Philip Withnall
27798cda22 Merge branch 'fix_gdate_tests' into 'main'
Fix unit test on date format '%Z' which is too versatile to be trustable

See merge request GNOME/glib!2482
2022-02-15 11:46:59 +00:00
Simon McVittie
b0f686a00e tests: Don't test invalid aligned allocations if avoiding UB
We can't exercise precondition check failures if GLib was (inadvisably)
compiled with -Dglib_checks=false, and we shouldn't necessarily exercise
precondition check failures when using QA tools like valgrind, so skip
these tests if run with -m no-undefined.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-15 11:03:00 +00:00
Simon McVittie
38cdfe3c02 tests: Make g_aligned_alloc tests fail if preconditions aren't checked
Previously, these tests would always pass. If the precondition check
failed (as we want it to), the subprocess would exit unsuccessfully;
but if the precondition check wrongly passed, the subprocess would
continue, allocate a nonzero amount of memory, and fail the
g_assert_null(), resulting in the subprocess exiting unsuccessfully
and the test still passing.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-15 10:52:59 +00:00
Simon McVittie
d04f3491af tests: Don't assume that all platforms are 64-bit
On ILP32 platforms, 4 is a valid alignment for g_aligned_alloc(), so
use 2 as our invalid alignment instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-15 10:49:51 +00:00
Emmanuel Fleury
81764b6508 Fix unit test on date format '%Z' which is too versatile to be trustable 2022-02-15 11:43:25 +01:00
Rafael Fontenelle
66857db98e Update Brazilian Portuguese translation 2022-02-14 22:20:24 +00:00
Matej Urbančič
e613aed96d Update Slovenian translation 2022-02-14 21:40:52 +00:00
Fran Dieguez
ac06c48b31 Update Galician translation 2022-02-14 20:44:29 +00:00
Marek Černocký
b28166cdbc Updated Czech translation 2022-02-14 20:40:54 +01:00
Philip Withnall
b7d3e3f16e tests: Add tests for GDebugController
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #1190
2022-02-14 14:42:17 +00:00
Philip Withnall
1b3e6bab53 gdebugcontrollerdbus: Add stop() method
This allows the controller to explicitly be removed from the bus, in a
way that allows the caller to synchronise with it and know that all
other references to the controller should have been dropped (i.e. after
this method returns, there should be no in-flight D-Bus calls still
holding a reference to the object).

This is needed to be able to guarantee finalisation of the controller in
unit tests (and comparable real-world situations).

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

Helps: #1190
2022-02-14 14:42:17 +00:00
Hugo Carvalho
6338db9c97 Update Portuguese translation 2022-02-14 14:01:37 +00:00
Yuri Chornoivan
010194fbf3 Update Ukrainian translation 2022-02-14 13:56:00 +00:00