Commit Graph

18796 Commits

Author SHA1 Message Date
Aurimas Černius
0fba231a6b Updated Lithuanian translation 2018-08-05 23:25:59 +03:00
Michael Catanzaro
08fe93589e Update documentation of g_tls_client_connection_set_use_ssl3()
We now send the fallback SCSV, meaning use of this function will cause
modern servers to immediately terminate the connection, so let's warn
API users to expect that behavior and be crystal clear that this
function should only be used as a fallback when a normal connection
attempt has already failed.

Also, the documentation is mostly duplicated between the property and
the function, so let's just reference the function documentation from
the property.
2018-08-04 16:33:28 -05:00
Simon McVittie
54a5f37f12 g_test_run: Document g_test_incomplete's similarity to g_test_skip
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:33:52 +01:00
Simon McVittie
0a180bb51b testing: Assert that test-case results are combined correctly
This repurposes the existing skip-all test as "combining", since it
is no longer entirely about runs where every test-case was skipped.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:30:10 +01:00
Simon McVittie
bbefa73997 testutils: Treat incomplete tests more like skipped tests
If a test is marked with g_test_incomplete(), then it is expected to
fail, so when it fails the test executable should still exit 0
(or possibly 77, if all tests are either skipped or incomplete).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:28:21 +01:00
Simon McVittie
ba3b442152 testing: Use g_assert_true(), which is preferred for unit tests
In the test for the unit testing framework, we might as well have
exemplary behaviour. Leave behind a single call to g_assert (TRUE)
just to prove that it still works.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 13:44:51 +01:00
Simon McVittie
ffe0402e02 testing: Assert that skipped tests cause g_test_failed()
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 13:42:57 +01:00
Simon McVittie
49a877764d testing: Clarify why incomplete tests cause g_test_failed()
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 13:42:38 +01:00
Simon McVittie
7cc5565e7c testutils: Correctly print incomplete tests as "not ok # TODO"
The TAP specification says that failing tests that are currently
expected to fail (like Automake's XFAIL) are to be reported as
"not ok", with that failure ignored as a result of the TODO
directive, with this example:

    not ok 3 - infinite loop # TODO halting problem unsolved

A test reported as "ok # TODO" indicates that something that is
expected to fail has unexpectedly succeeded, similar to Automake's
XPASS.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 13:20:59 +01:00
Philip Withnall
21d1797a4f tests: Fix a -Wbad-function-cast warning in the atomic tests
Assigning the gpointer return value from g_atomic_pointer_get() to a
gsize variable was not making -Wbad-function-cast happy. Assign to an
intermediate gpointer variable and then cast that instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1475
2018-08-03 11:08:26 +01:00
Philip Withnall
516101c702 Merge branch 'test-ip_mreq_source-android-only' into 'master'
build: only test for broken ip_mreq_source on Android. Fixes #1472

Closes #1472

See merge request GNOME/glib!222
2018-08-03 09:33:35 +00:00
Christoph Reiter
99caee2819 build: only test for broken ip_mreq_source on Android. Fixes #1472
7efd76dd67 added these configure time tests to work around a bug
with older Android. Since the test didn't take Windows into account it
wrongfully applied the workaround on Windows too, breaking the build.
With meson this wasn't an issue since the check is skipped on Windows there
and our CI didn't catch this issue.

Change the test to run on Android only for meson and autotools.
This also makes it clear that the test+code can be dropped again if we stop
supporting older Android versions at some point.
2018-08-03 10:24:00 +02:00
Philip Withnall
a0289a56b7 Merge branch 'date-test-skip' into 'master'
date test: Use g_test_skip(), not g_test_incomplete()

See merge request GNOME/glib!220
2018-08-02 19:38:38 +00:00
Simon McVittie
cc9cfc75fc date test: Use g_test_skip(), not g_test_incomplete()
g_test_skip() is appropriate for tests that can't run due to missing
functionality on the host system, whereas g_test_incomplete() is
for expected-to-fail tests for unimplemented functionality in the
code under test.

See also https://bugzilla.gnome.org/show_bug.cgi?id=793635 and
commit 5459b345.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-02 17:57:46 +01:00
Philip Withnall
7f5296d055 Merge branch 'wip/oholy/update-mounts' into 'master'
Be sure that g_volume_get_mount succeed after g_volume_mount

See merge request GNOME/glib!217
2018-08-02 15:40:50 +00:00
Philip Withnall
71b0123845 Merge branch 'issue-1467' into 'master'
Drop a questionable test from the refstring suite

Closes #1467

See merge request GNOME/glib!218
2018-08-02 11:44:17 +00:00
Emmanuele Bassi
12adfcb602 Merge branch 'bookmark-file-leak' into 'master'
gbookmarkfile: Fix some minor leaks when metadata elements are repeated

See merge request GNOME/glib!216
2018-08-02 11:31:13 +00:00
Emmanuele Bassi
5e64ee3af7 Drop a questionable test from the refstring suite
Testing that an interned string is released once its last reference is
dropped is not possible without a hook into the interning machinery;
just checking that the returned pointer for the same string is going to
be different after the last release() is not guaranteed to work, as the
systema allocator is perfectly within its rights to recycle pointers, as
long as they are unique while valid.

Closes #1467
2018-08-02 12:21:38 +01:00
Philip Withnall
6c041ff283 gbookmarkfile: Fix some minor leaks when metadata elements are repeated
oss-fuzz#9674

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-02 11:20:15 +01:00
Ondrej Holy
88b8ebb5dd gio-tool: Hold GVolumeMonitor reference during operations
Releasing GVolumeMonitor before g_volume_mount finish cause that
g_volume_get_mount returns NULL, because the mount is not correctly
propagated to the volume.

https://gitlab.gnome.org/GNOME/glib/issues/1458
2018-08-02 11:35:48 +02:00
Philip Withnall
433770b681 Merge branch 'build-fix-mingw-libelf' into 'master'
gresource-tool: fix build in case libelf is available on Windows. Fixes #1466

Closes #1466

See merge request GNOME/glib!215
2018-08-01 23:18:53 +00:00
Christoph Reiter
70ad484508 gresource-tool: fix build in case libelf is available on Windows. Fixes #1466
The gresource code uses libelf if available but that also depends on mmap but isn't
guarded with HAVE_MMAP. This can make the build fail under MSYS2 where a mingw version
of libelf exists but there is no mmap.

Instead of guarting the libelf code with HAVE_LIBELF add a new macro named USE_LIBELF
which is only defined if libelf and mmap support are available.

Also install the mingw libelf version for CI so we catch similar errors in the future.
2018-08-01 19:08:39 +02:00
Philip Withnall
b2249bf33c tests: Don’t use a potentially-existent timezone in a test for failure
When checking that the timezone code falls back to UTC if a zone is
unknown, don’t use ‘PST’, because that can actually exist on some
systems.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1433
2018-07-31 19:54:56 +01:00
Philip Withnall
17df5c0b26 gtestutils: Mention G_DISABLE_ASSERT in documentation for g_test_init()
g_test_init() bails if G_DISABLE_ASSERT is defined. Mention that. This
is a follow-up to
https://gitlab.gnome.org/GNOME/glib/merge_requests/174.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1446
2018-07-31 19:49:37 +01:00
Philip Withnall
83a4cab12c 2.57.2 (actual release)
The previous 2.57.2 release failed. The tarball for this one will be
generated using `ninja dist`, but should still be good to be built using
autotools. `make distcheck` on it has been tested.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1436
2018-07-31 19:36:19 +01:00
Matthias Clasen
9460aeeed8 Merge branch '1436-please-for-the-love-of-things-just-build' into 'master'
Fix the stupid .Plo file errors

See merge request GNOME/glib!211
2018-07-31 18:13:43 +00:00
Philip Withnall
ca0110c34d build: Conditionally add spawn and IO channel without using EXTRA_ prefix
See previous commit; same reasoning behind the commit, except that these
sources weren’t (yet) causing `make distcheck` to fail.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-31 18:52:37 +01:00
Philip Withnall
862fe11f90 build: Conditionally add gwin32.c to sources without using EXTRA_ prefix
Instead of messing around with EXTRA_*_SOURCES and manually handling .lo
files, why not just add gwin32.c to the GLib sources conditionally?

This will hopefully fix `make distcheck` failing due to gwin32.Plo not
being generated in the sub-builddir≠srcdir stage, due to depcomp
inexplicably not generating it. (Note that it is correctly generated in
non-distcheck builds.)

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-31 18:52:37 +01:00
Daniel Mustieles
bcafcc5b54 Updated Spanish translation 2018-07-31 12:42:21 +02:00
Emmanuele Bassi
158f07c223 Merge branch 'gio-enum-install' into 'master'
Install gioenumtypes.h

See merge request GNOME/glib!210
2018-07-31 09:03:22 +00:00
Emmanuele Bassi
26c3f2f1b1 Install gioenumtypes.h
We're re-defining nodist_gioinclude_HEADERS and Automake will use the
last definition of the target.
2018-07-31 09:40:22 +01:00
Philip Withnall
83c69fa77d Merge branch '1035-bookmarks-state-machine' into 'master'
gbookmarkfile: Fix error reporting with unexpected nesting of elements

Closes #1035

See merge request GNOME/glib!207
2018-07-30 22:50:52 +00:00
Matthias Clasen
dbf9959d15 Merge branch '1436-docs-muckery' into 'master'
Fix various documentation issues and man page issues with autotools

See merge request GNOME/glib!209
2018-07-30 22:24:26 +00:00
Philip Withnall
376234f9b2 gbookmarkfile: Fix error reporting with unexpected nesting of elements
The parser state machine for bookmark files did not handle unexpected
nesting of elements, such as a <bookmark> element inside a <title>
element — it would print a critical warning rather than returning a
GError.

Fix that, and add various unit tests for it. The set of tests includes
various other general markup tests as provided by Jussi Judin.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1035
2018-07-30 21:59:26 +01:00
Philip Withnall
2500dfe3b3 docs: Fix a documentation link
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:15:57 +01:00
Philip Withnall
b4734d3b5b docs: Add some more backtick quotation
That should format these character classes correctly in the
documentation, and prevent them being interpreted by gtk-doc as (broken)
Markdown hyperlinks.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:15:22 +01:00
Philip Withnall
fba8d7a48a docs: Fix case of a type used in a gtk-doc comment
This fixes the automatic linking of that type.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:15:03 +01:00
Philip Withnall
4cd7f769ae gconvert: Adjust an argument name in the header to match the source
This fixes a gtk-doc complaint about the argument name not matching
what’s used in the gtk-doc comment.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:14:16 +01:00
Philip Withnall
c0f8792d6b docs: Add missing API indexes for old versions
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:13:48 +01:00
Philip Withnall
0e0b18e0cd docs: Fix a minor syntax error in a documentation comment
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:13:28 +01:00
Philip Withnall
40fc18521b docs: Fix glib-sections.txt includes for g_atomic_rc_* API
These were not changed when g_arc_*() was renamed to g_atomic_rc_*().

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:12:43 +01:00
Philip Withnall
f9705f7a0c docs: Don’t distribute generated man pages
They should either be generated at build time, or ignored completely,
depending on the presence of --[enable|disable]-man.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 20:04:13 +01:00
Philip Withnall
2a69cdb1cd build: Stop distributing generated files in autotools tarballs
It is a bug if we distribute files which are generated at build time —
they should be built on the machine which is compiling GLib, not be
shipped in the tarball.

This brings the autotools-generated tarball in line with the
ninja-generated one, with the exception of man pages and gtk-doc HTML
output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 19:58:24 +01:00
Philip Withnall
47dcbd318f build: Remove a pointless intermediate variable in glib/Makefile.am
This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 19:47:15 +01:00
Matthias Clasen
4127c84c3a Merge branch '1461-bookmarks-nullptr' into 'master'
gmarkup: Fix crash in error handling path for closing elements

Closes #1461

See merge request GNOME/glib!205
2018-07-30 18:44:48 +00:00
Matthias Clasen
f424a0c2d3 Merge branch '1462-bookmark-overflow' into 'master'
gmarkup: Fix unvalidated UTF-8 read in markup parsing error paths

Closes #1462

See merge request GNOME/glib!204
2018-07-30 17:56:21 +00:00
Philip Withnall
fccef3cc82 gmarkup: Fix crash in error handling path for closing elements
If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.

Includes a test case, courtesy of pdknsk.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1461
2018-07-30 18:33:39 +01:00
Philip Withnall
cec7170540 gmarkup: Fix unvalidated UTF-8 read in markup parsing error paths
When formatting the error messages for markup parsing errors, the parser
was unconditionally reading a UTF-8 character from the input buffer —
but the buffer might end with a partial code sequence, resulting in
reading off the end of the buffer by up to three bytes.

Fix this and add a test case, courtesy of pdknsk.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1462
2018-07-30 18:10:25 +01:00
Philip Withnall
b5b0485bfe Merge branch '1459-async-queue-precondition' into 'master'
Resolve "Missing g_return_val_if_fail in g_async_queue_timeout_pop"

Closes #1459

See merge request GNOME/glib!201
2018-07-30 17:03:54 +00:00
Philip Withnall
ef1d24974d gasyncqueue: Add missing precondition to g_async_queue_timeout_pop()
And g_async_queue_timeout_pop_unlocked().

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

https://gitlab.gnome.org/GNOME/glib/issues/1459
2018-07-30 17:18:03 +01:00