Tim-Philipp Müller [Wed, 3 Jun 2015 12:06:24 +0000 (13:06 +0100)]
gsocket: avoid unnecessary select in _send_messages() and _receive_message()
For performance reasons we should always try to send or
receive our messages first and only wait for more space
or data to become available if we get an EAGAIN (and
are in blocking mode).
https://bugzilla.gnome.org/show_bug.cgi?id=751122
Paolo Borelli [Thu, 18 Jun 2015 07:36:12 +0000 (09:36 +0200)]
socketclient: annotate the connection param of "event" as nullable
When emitting the RESOLVING/RESOLVED events the connection param is
set to NULL.
Alexander Larsson [Wed, 17 Jun 2015 15:31:19 +0000 (17:31 +0200)]
configure: test have_docbook_style != yes, not have_docbook_dtd
Philip Withnall [Wed, 17 Jun 2015 08:25:49 +0000 (09:25 +0100)]
gfile: Clarify that g_file_replace_contents() uses atomic renames
It uses g_file_replace() internally, so is inherently safe.
Though it might vomit .goutputstream-XXXXXX files all over the place
occasionally.
Matthias Clasen [Tue, 16 Jun 2015 22:38:27 +0000 (18:38 -0400)]
key file: Clarify documentation around comments
The documentation was not very clear about the handling
of the '#' comment markers. State clearly how these are
handled by the getter and the setter.
https://bugzilla.gnome.org/show_bug.cgi?id=479730
Matthias Clasen [Tue, 16 Jun 2015 18:46:04 +0000 (14:46 -0400)]
Updates
Michael Catanzaro [Sun, 14 Jun 2015 03:52:33 +0000 (22:52 -0500)]
genmarshal: silence register storage class warnings
Using the register keyword triggers warnings on noteworthy compilers
(clang), since it's deprecated in C++ and at danger of being removed
from the language. There is no reason to use it since it isn't 1980
anymore.
https://bugzilla.gnome.org/show_bug.cgi?id=750918
Cosimo Cecchi [Thu, 11 Jun 2015 22:56:25 +0000 (15:56 -0700)]
gresource: fix a couple of typos in documentation
Rico Tzschichholz [Thu, 11 Jun 2015 05:52:40 +0000 (07:52 +0200)]
g_log_set_handler_full: Bump "Since" version accordingly
Matthias Clasen [Sat, 29 Nov 2014 04:31:00 +0000 (23:31 -0500)]
Add g_log_set_handler_full
This is a bindable version of g_log_set_handler that takes
a destroy notify for the user_data.
https://bugzilla.gnome.org/show_bug.cgi?id=740516
Matthias Clasen [Sun, 29 Mar 2015 18:00:36 +0000 (14:00 -0400)]
Allow property actions to invert booleans
This can be handy when you want to change the sense of a toggle
in the UI without rewriting the underlying logic. Currently, this
is just exposed as a construct-only property. We may add a
convenience wrapper or a special !property syntax for this later.
https://bugzilla.gnome.org/show_bug.cgi?id=728489
Matthias Clasen [Tue, 9 Jun 2015 23:17:58 +0000 (19:17 -0400)]
Fix deprecation notice
GSimpleAsyncResult has not been deprecated all that long.
Simon McVittie [Mon, 27 Apr 2015 15:26:33 +0000 (16:26 +0100)]
Regression test for falling back to autolaunch: and XDG_RUNTIME_DIR/bus
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=747941
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Simon McVittie [Wed, 15 Apr 2015 16:57:29 +0000 (17:57 +0100)]
GDBus: try XDG_RUNTIME_DIR/bus before resorting to dbus-launch
This is the right thing to do for the "a session is a user-session"
model implemented in dbus 1.9.14, which is described in
<http://lists.freedesktop.org/archives/dbus/2015-January/016522.html>.
It also resembles sd-bus' behaviour, although sd-bus will only try
kdbus and XDG_RUNTIME_DIR/bus, and never runs dbus-launch.
On systems following the more traditional "a session is a login-session"
model, X_R_D/bus won't exist, so it is harmless to check for it before
falling back to X11 autolaunching. Again, this matches the behaviour
of current libdbus and sd-bus versions.
Now that we do this, g_test_dbus_unset() needs to clear XDG_RUNTIME_DIR
as well as everything else.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=747941
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Simon McVittie [Wed, 15 Apr 2015 18:59:50 +0000 (19:59 +0100)]
g_dbus_address_connect: specifically use dbus-launch for autolaunch:
This only alters what happens if we specifically connect to
"autolaunch:", for instance via "DBUS_SESSION_BUS_ADDRESS=autolaunch:".
We will still potentially try other platform-specific things if
DBUS_SESSION_BUS_ADDRESS is unset. There are currently no other
platform-specific things, so there is no practical difference yet,
but I'm about to add a more-preferred fallback path before autolaunch.
This matches libdbus' behaviour and the D-Bus Specification, in which
the autolaunch: transport specifically means X11 autolaunch
(as implemented by "dbus-launch --autolaunch") on Unix, or a
shared-memory-based protocol on Windows. Other platform-specific
transports or default/fallback modes, including launchd on Mac OS X
and XDG_RUNTIME_DIR/bus on Unix, are not part of "autolaunch:".
It's rather unfortunate that the same name means two different
platform-specific mechanisms, specific to different platforms -
if they were added today I'd call them x11: and windows-shm: or
something - but it's been like this since 2007 so it's too late now.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=747941
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Simon McVittie [Mon, 27 Apr 2015 13:38:41 +0000 (14:38 +0100)]
regex: if PCRE is 8.34 or later, disable auto-possessification for DFA
Normally, recent PCRE behaves as if certain patterns were replaced
by a more "possessive" pattern that gives the same answer for normal
regex matching, but is more efficient. However, the modified pattern
produces fewer results under DFA. If we want the full set of results
we have to apply PCRE_NO_AUTO_POSSESS, and that's a compile-time flag.
This currently only affects a system PCRE, but would also work fine for
an internal PCRE 8.34 or later if the embedded copy is updated.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=733325
Reviewed-by: Christian Persch <chpe@gnome.org>
Christophe Fergeau [Wed, 3 Jun 2015 09:30:43 +0000 (11:30 +0200)]
gapplication: Make sure --help output is translated
Currently, applications using g_application_add_main_option_entries()
won't get translated entries in --help output. We need to call
g_option_group_set_translation_domain() with a NULL domain to ensure that the
default application gettext domain (ie the one passed to the
textdomain() call) will be used for the main entries passed by the
application.
If we want to allow more flexibility on which gettext domain should be
used for these entries, new API will be needed.
https://bugzilla.gnome.org/show_bug.cgi?id=750322
Philip Withnall [Fri, 19 Dec 2014 20:43:06 +0000 (20:43 +0000)]
gsettings: Document GSettings build system integration
Add a new section to the main GSettings documentation which documents
the best practices for integrating GSettings into an autoconf/automake
build system using the GLIB_GSETTINGS macro.
Some of this material was adapted from the migrating-gconf.xml guide.
https://bugzilla.gnome.org/show_bug.cgi?id=741788
Philip Withnall [Fri, 19 Dec 2014 20:42:21 +0000 (20:42 +0000)]
gsettings: Expand documentation default value l10n
Mention context, translation category, and the need for syntactic
validity of the translated values.
https://bugzilla.gnome.org/show_bug.cgi?id=741788
Xavier Claessens [Mon, 8 Jun 2015 15:09:39 +0000 (11:09 -0400)]
doc: Add missing GTlsDatabaseClass
https://bugzilla.gnome.org/show_bug.cgi?id=750573
Matthias Clasen [Fri, 5 Jun 2015 23:13:19 +0000 (19:13 -0400)]
Add registry helpers to the docs
Руслан Ижбулатов [Tue, 5 May 2015 02:12:25 +0000 (02:12 +0000)]
Bump W32 Registry API 'Since:' version
https://bugzilla.gnome.org/show_bug.cgi?id=734888
Руслан Ижбулатов [Tue, 5 May 2015 02:09:10 +0000 (02:09 +0000)]
Make W32 registry API compatible with MSVC
* Only check __OBJECT_ATTRIBUTES_DEFINED and __UNICODE_STRING_DEFINED
on MinGW (MSVC doesn't have these)
* MSVC: disable:4005 when including windows.h and ntstatus.h
* Move NTAPI cconv into the parens with the NtQueryKeyFunc
* Fix return values in some functions
https://bugzilla.gnome.org/show_bug.cgi?id=734888
Руслан Ижбулатов [Mon, 25 Aug 2014 03:38:35 +0000 (03:38 +0000)]
Add W32 Registry reading API to gio
https://bugzilla.gnome.org/show_bug.cgi?id=734888
Руслан Ижбулатов [Sun, 17 May 2015 11:42:55 +0000 (11:42 +0000)]
Make GWin32AppInfo MSVC-compatible - use G_VA_COPY
https://bugzilla.gnome.org/show_bug.cgi?id=666831
Руслан Ижбулатов [Fri, 29 Aug 2014 08:53:35 +0000 (08:53 +0000)]
GWin32AppInfo rewrite
- On first call scan the registry, collect information about URI protocols,
file extensions, applications and handlers, store that as a set of
interconnected structures in several hash tables
- Watch the registry keys, re-scan the registry when any one of them changes.
https://bugzilla.gnome.org/show_bug.cgi?id=666831
Mikhail Zabaluev [Mon, 13 Oct 2014 22:25:56 +0000 (01:25 +0300)]
Added g_utf8_validate() to UTF-8 performance testing
https://bugzilla.gnome.org/show_bug.cgi?id=738504
Matthias Clasen [Fri, 5 Jun 2015 19:27:59 +0000 (15:27 -0400)]
Add index for new api
Matthias Clasen [Fri, 5 Jun 2015 19:27:25 +0000 (15:27 -0400)]
Add new API to docs
Ryan Lortie [Wed, 19 Nov 2014 17:45:38 +0000 (12:45 -0500)]
GSettings: deprecate g_settings_list_keys()
This is now possible with g_settings_schema_list_keys().
https://bugzilla.gnome.org/show_bug.cgi?id=740308
Ryan Lortie [Wed, 19 Nov 2014 17:45:06 +0000 (12:45 -0500)]
gsettings tests: use g_settings_schema_list_keys()
Stop using g_settings_list_keys() because soon it will be deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=740308
Ryan Lortie [Wed, 19 Nov 2014 17:42:10 +0000 (12:42 -0500)]
gsettings tool: use schema for listing keys
Use the newly added g_settings_schema_list_keys() API instead of
g_settings_list_keys() in order to list keys.
Doing this allows the 'list-keys' command to work without creating a
GSettings object, which is more efficient. It also means that we don't
have to provide a (meaningless and ignored) path when listing keys on
relocatable schemas.
While we're at it, update the 'range' command not to require creation of
a GSettings object, in a similar way.
https://bugzilla.gnome.org/show_bug.cgi?id=740308
Ryan Lortie [Wed, 19 Nov 2014 17:40:22 +0000 (12:40 -0500)]
GSettingsSchema: add g_settings_schema_list_keys()
The list of keys in a GSettings object depends entirely on the schema,
so it makes sense to expose this API there.
Move the implementation out of gsettings.c and into gsettingsschema.c,
replacing the earlier with a simple call to the new location.
We don't do the same for children because the children can change.
https://bugzilla.gnome.org/show_bug.cgi?id=740308
Patrick Griffis [Wed, 25 Mar 2015 19:51:29 +0000 (15:51 -0400)]
Implement GNotification on OSX
https://bugzilla.gnome.org/show_bug.cgi?id=747146
Patrick Griffis [Mon, 13 Apr 2015 17:39:28 +0000 (13:39 -0400)]
configure: Require OSX >= 10.9
https://bugzilla.gnome.org/show_bug.cgi?id=747146
Ryan Lortie [Thu, 26 Mar 2015 20:35:06 +0000 (16:35 -0400)]
kqueue: add a bit of extra paranoia on cancel
Cancellation of GPollFileMonitor is now handled correctly (in the sense
that no further signals will follow) but let's be extra paranoid and
disconnect our handler anyway, for good measure.
https://bugzilla.gnome.org/show_bug.cgi?id=739424
Ryan Lortie [Thu, 26 Mar 2015 20:31:48 +0000 (16:31 -0400)]
gpollfilemonitor: send 'changes done' for creates
The new rules of GFileMonitor says that users should expect to see a
CHANGES_DONE_HINT following a CREATED as well as CHANGED.
https://bugzilla.gnome.org/show_bug.cgi?id=739424
Ryan Lortie [Thu, 26 Mar 2015 20:29:19 +0000 (16:29 -0400)]
gpollfilemonitor: don't emit after cancellation
GPollFileMonitor emits CHANGES_DONE_HINT after CHANGED signals, but it
doesn't check to ensure that the file monitor wasn't cancelled before it
does that.
If the original signal caused the monitor to be unreffed, cancelled and
destroyed, we would still end up emitting an extra signal on it.
Avoid that by checking first for cancellation.
https://bugzilla.gnome.org/show_bug.cgi?id=739424
Mikhail Zabaluev [Sun, 5 Oct 2014 23:01:38 +0000 (02:01 +0300)]
glib/genviron.c, GSubprocessLauncher: ain't no "filename encoding"
Removed all mentions of GLib file name encoding referring to
the environment strings. The env var content has no defined relation
to GLib's notion of filename encoding, or any encoding whatsoever.
It would be wrong to pass all UTF-8 strings through
g_filename_from_utf8() in order to put them into the environment,
for one thing.
https://bugzilla.gnome.org/show_bug.cgi?id=738185
Jan Safranek [Tue, 4 Nov 2014 11:54:00 +0000 (11:54 +0000)]
GDBus: Add new call flag to allow interactive authorization
DBus has recently introduced new message flag
DBUS_HEADER_FLAG_ALLOW_INTERACTIVE_AUTHORIZATION, which tells that
caller is willing to wait for unspecified amount of time for the call
to return, as the service may perform interactive authorization (e.g.
using polkit).
https://bugzilla.gnome.org/show_bug.cgi?id=739616
Ryan Lortie [Thu, 21 May 2015 17:32:20 +0000 (12:32 -0500)]
GActionGroupExporter: flush queue on requests
In order to maintain a logical stream of events, we need to make sure we
flush and queued change notifications before responding to any requests
for information from clients.
If we don't do this, it's possible that we emit an 'add' event that was
queued at the time of a 'DescribeAll' call _after_ the reply to that
call (which already contained the description of the new action).
In practice, this is not only logically incorrect, but it can also cause
problems. If a change to action 'state' or 'enabled' occurs after the
DescribeAll but before the signal has been dispatched, it will be
ignored because an 'add' signal is already pending. When that add
signal is sent, it will contain the correct data, but the receiver will
ignore it because it already saw the action in the DescribeAll reply.
https://bugzilla.gnome.org/show_bug.cgi?id=749693
Ryan Lortie [Sun, 25 May 2014 09:21:06 +0000 (11:21 +0200)]
GActionGroup: fix an annotation
.get_action_state_type() does not return a copy.
We remove the annotation entirely because it is evident from the 'const'
on the return type.
https://bugzilla.gnome.org/show_bug.cgi?id=730168
Matthias Clasen [Fri, 5 Jun 2015 16:30:15 +0000 (12:30 -0400)]
win32: Make g_content_type_get_mime_type work for directories
Now that we are using inode/directory for directories, handle
this case in g_content_type_get_mime_type() as well.
Руслан Ижбулатов [Thu, 30 Apr 2015 23:09:30 +0000 (23:09 +0000)]
W32: Special treatment for inode/directory mime/type
This is a hack for GLocalFileInfo to correctly get icons for directories.
Without this change content type for any W32 directory is NULL
(because there's no registry entry for "inode/directory" by default,
and in any way there's no file extension that means "directory" to put there),
and GLocalFileInfo uses content type to grab icons.
https://bugzilla.gnome.org/show_bug.cgi?id=748727
Matthias Clasen [Fri, 5 Jun 2015 16:26:41 +0000 (12:26 -0400)]
win32: Return proper icon names
The code here was returning gtk-directory and similar names as
fallback, with a comment claiming that these are 'builtin gtk'.
But they aren't, anymore, so just return the standard names.
Matthias Clasen [Fri, 5 Jun 2015 15:30:17 +0000 (11:30 -0400)]
Fix a markup confusion
"0." at the beginning of a line is interpreted as a numeric list
by the gtk-doc markdown parser, so be careful to avoid that.
https://bugzilla.gnome.org/show_bug.cgi?id=750399
Matthias Clasen [Fri, 5 Jun 2015 15:21:57 +0000 (11:21 -0400)]
Trivial: fix a typo
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=750399
Philip Withnall [Fri, 19 Dec 2014 21:03:46 +0000 (21:03 +0000)]
gsettings: Add a documentation section on relocatable schemas
https://bugzilla.gnome.org/show_bug.cgi?id=741788
Stefan Ekenberg [Wed, 3 Jun 2015 13:59:57 +0000 (15:59 +0200)]
Prevent race condition in g_io_condition_get_type
Prevents race condition in function g_io_condition_get_type by ensuring
that the initialization section for 'etype' is executed only once
during a program's life time, and that concurrent threads are blocked
until initialization completes. This changes solves the problem that
concurrent threads could execute the check 'etype == 0' before any of
them had initialized it, which in turn meant that multiple threads
would then attempt to register the "GIOCondition" type.
https://bugzilla.gnome.org/show_bug.cgi?id=750386
Matthias Clasen [Thu, 4 Jun 2015 23:25:20 +0000 (19:25 -0400)]
Trivial: fix a comment typo
Balázs Úr [Thu, 4 Jun 2015 21:03:10 +0000 (21:03 +0000)]
Updated Hungarian translation
Garrett Regier [Thu, 4 Jun 2015 00:16:21 +0000 (17:16 -0700)]
binding: Simplify the default transform func
https://bugzilla.gnome.org/show_bug.cgi?id=750369
Garrett Regier [Thu, 4 Jun 2015 00:15:17 +0000 (17:15 -0700)]
binding: Remove conditional from the default transform function
Avoiding checking for INVERT_BOOLEAN each and
instead choose the correct function in constructed().
https://bugzilla.gnome.org/show_bug.cgi?id=750369
Garrett Regier [Thu, 4 Jun 2015 00:13:53 +0000 (17:13 -0700)]
binding: Remove GObject data usage
It isn't actually doing anything, instead it is
being managed without actually being used.
This has the result that GBinding is now more
thread-safe.
https://bugzilla.gnome.org/show_bug.cgi?id=745013
Piotr Drąg [Wed, 3 Jun 2015 17:02:12 +0000 (19:02 +0200)]
Updated POTFILES.in
Xavier Claessens [Wed, 3 Jun 2015 14:18:36 +0000 (10:18 -0400)]
doc: add GTlsInteractionClass
https://bugzilla.gnome.org/show_bug.cgi?id=750344
Alexander Larsson [Mon, 1 Jun 2015 08:02:47 +0000 (10:02 +0200)]
GNetworkMonitorNetlink: Fix check for non-kernel messages
This code used to look at the SCM_CREDENTIALS and ignore every message
not from uid 0. However, when user namespaces are in use this does not
work, as if uid 0 is not mapped you get overflowuid instead. Right now
this means we ignore all messages in such user namespaces and glib
apps hang on startup.
We can't look at pids either, as pid 0 is returned for processes
outside your pid namespace.
Instead the correct approach is to look at the sending sockaddr and
if the port id (nl_pid) is zero, then its from the kernel.
Source:
http://lists.linuxfoundation.org/pipermail/containers/2015-May/036032.html
https://bugzilla.gnome.org/show_bug.cgi?id=750203
Alexander Larsson [Mon, 1 Jun 2015 08:01:26 +0000 (10:01 +0200)]
Add GNativeSocketAddress for handling "other" addresses
Instead of just dropping address types that we're not specifically
handling we return a GNativeSocketAddress which is just a dummy
container for the stuct sockaddr.
https://bugzilla.gnome.org/show_bug.cgi?id=750203
Mattias Ellert [Fri, 24 Oct 2014 12:29:00 +0000 (12:29 +0000)]
thread: Check sysconf value before using it
sysconf() is documented as returning -1 if it can't determine
a minimum thread stack size. Check for this case before using
the return value.
https://bugzilla.gnome.org/show_bug.cgi?id=739122
Matthias Clasen [Sat, 20 Sep 2014 05:08:32 +0000 (01:08 -0400)]
Add a global signal handler table
Add a global lookup table for signal handlers. We already give
them a unique ID, so there is no good reason to pay for
non-constant lookups when disconnecting handlers.
https://bugzilla.gnome.org/show_bug.cgi?id=737009
Matthias Clasen [Sat, 20 Sep 2014 04:34:24 +0000 (00:34 -0400)]
Add a performance test for signal connection
This test checks the performance of connecting, disconnecting and
blocking many handlers. Various cases are checked: disconnect in
the same order, in the inverse order, at random. Connect to one
signal on a single object, to two signals on the same object, or
to the same signal on two different objects.
https://bugzilla.gnome.org/show_bug.cgi?id=737009
Daniel Mustieles [Tue, 26 May 2015 17:25:56 +0000 (19:25 +0200)]
Updated Spanish translation
Matthias Clasen [Tue, 26 May 2015 03:29:41 +0000 (23:29 -0400)]
2.45.2
Matthias Clasen [Mon, 25 May 2015 17:26:48 +0000 (13:26 -0400)]
GOptionContext: Improve help in simple cases
Only add [OPTION...] to the usage line if the context
has options. And shorten "Application Options" to just
"Options" if we don't have to differentiate from other
kinds of options.
Emmanuele Bassi [Mon, 25 May 2015 13:04:06 +0000 (14:04 +0100)]
Do not use a string literal when a format string is expected
Otherwise we'll get compiler errors.
Based on a patch by: Vincent Le Garrec <legarrec.vincent@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=696749
Emmanuele Bassi [Mon, 20 Apr 2015 13:11:12 +0000 (14:11 +0100)]
docs: Add an example of G_DEFINE_BOXED_TYPE
Mention that the GType of the boxed type is stored inside the
g_define_type_id variable.
See bug: https://bugzilla.gnome.org/show_bug.cgi?id=723394
Akom Chotiphantawanon [Sun, 24 May 2015 10:42:33 +0000 (17:42 +0700)]
Updated Thai translation
Dušan Kazik [Sat, 23 May 2015 20:36:38 +0000 (20:36 +0000)]
Updated Slovak translation
David Shea [Wed, 8 Apr 2015 17:14:22 +0000 (13:14 -0400)]
Add introspection annotations to GListStore
GListStore requires that item-type be derived from GObject, so specify
that the type of the item parameters is GObject so the functions can be
used via gobject-introspection.
Add a scope parameter for the callback used during insert_sorted.
Matthias Clasen [Sat, 16 May 2015 02:53:41 +0000 (22:53 -0400)]
glib-compile-schemas: Improve an error message
Mention the expected type when failing to parse a GVariant.
Matthias Clasen [Sat, 16 May 2015 02:41:29 +0000 (22:41 -0400)]
glib-compile-schemas: Show error positions
GMarkup provides this information, pass it on.
Jordi Mas [Fri, 15 May 2015 20:14:44 +0000 (22:14 +0200)]
Fixes to Catalan translation
Alexandre Franke [Fri, 15 May 2015 08:46:51 +0000 (08:46 +0000)]
Updated French translation
Simon McVittie [Tue, 28 Apr 2015 09:10:58 +0000 (10:10 +0100)]
regex test: do not assert that system PCRE still has an 8.31 bug
This was fixed in 8.32, so if we have that version, assert that it is
fixed; if we don't (e.g. the current internal pcre), still don't
assert that it *isn't* fixed.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=733325
Reviewed-by: Christian Persch <chpe@gnome.org>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Iain Lane [Mon, 31 Mar 2014 10:06:05 +0000 (11:06 +0100)]
gdbus tests: wait up to 60s for gdbus-testserver to take its bus name
Previously, we waited up to 0.5s, but that can fail on slow
architectures like ARM; now we wait up to 60s in 0.1s increments.
Patch originally by Simon McVittie <simon.mcvittie@collabora.co.uk>,
modified by Iain Lane to be called earlier, to catch all testcases in a
particular test.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=724113
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Acked-by: Matthias Clasen <mclasen@redhat.com>
Simon McVittie [Tue, 11 Feb 2014 14:23:15 +0000 (14:23 +0000)]
gdbus-connection: wait up to 10s to actually send a message
We previously waited 0.25s, which should be enough even on slow machines,
but you never know; but we also now wait in 0.1s increments, so this test
should actually be faster now.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=724113
Acked-by: Matthias Clasen <mclasen@redhat.com>
Garrett Regier [Thu, 14 May 2015 06:12:49 +0000 (23:12 -0700)]
Connect to the detailed notify signal in GBinding
This avoids the notify handler being called for each
and every emitted notify.
https://bugzilla.gnome.org/show_bug.cgi?id=749353
Garrett Regier [Thu, 14 May 2015 05:15:27 +0000 (22:15 -0700)]
Fix g_binding_unbind() when the source and target are the same
It tried to remove a weak ref, but it is only taken if the
source and target object are different.
https://bugzilla.gnome.org/show_bug.cgi?id=749352
Philip Withnall [Thu, 14 May 2015 07:31:22 +0000 (08:31 +0100)]
gresource: Document generated C file function naming
Mention the relationship to the --c-name argument, plus the need to call
some_prefix_get_resource() to get the GResource object.
Philip Withnall [Thu, 14 May 2015 07:15:46 +0000 (08:15 +0100)]
gresource: Minor capitalisation fixes in documentation
Philip Withnall [Wed, 13 May 2015 14:22:57 +0000 (15:22 +0100)]
gmessages: Tweak docs for G_LOG_DOMAIN to use AM_CPPFLAGS
Instead of INCLUDES, which is deprecated in automake. Using AM_CPPFLAGS
also gives the hint that the -D argument should be a CPPFLAGS variable,
rather than CFLAGS.
Garrett Regier [Wed, 15 Apr 2015 03:44:38 +0000 (20:44 -0700)]
gtype: Bump allowed number of children
Restricting the number of children to be less than 4095 can
be an issue when generating types. This is also an issue for
the Lua bindings as each Lua state will create a new GType each
time the Lua code is executed.
https://bugzilla.gnome.org/show_bug.cgi?id=747882
Simon McVittie [Mon, 11 May 2015 16:03:00 +0000 (17:03 +0100)]
tests: replace most g_print() with g_printerr()
I searched all files that mention g_test_run, and replaced most
g_print() calls. This avoids interfering with TAP. Exceptions:
* gio/tests/network-monitor: a manual mode that is run by
"./network-monitor --watch" is unaffected
* glib/gtester.c: not a test
* glib/gtestutils.c: not a test
* glib/tests/logging.c: specifically exercising g_print()
* glib/tests/markup-parse.c: a manual mode that is run by
"./markup-parse --cdata-as-text" is unaffected
* glib/tests/testing.c: specifically exercising capture of stdout
in subprocesses
* glib/tests/utils.c: captures a subprocess's stdout
* glib/tests/testglib.c: exercises an assertion failure in g_print()
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=725981
Reviewed-by: Colin Walters <walters@verbum.org>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 11 May 2015 15:50:00 +0000 (16:50 +0100)]
GFileMonitor test: use g_test_skip() instead of g_print()
This stops it from interfering with structured stdout such as TAP.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=725981
Reviewed-by: Colin Walters <walters@verbum.org>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 11 May 2015 15:38:57 +0000 (16:38 +0100)]
testglib: my_hash_callback_remove_test: actually fail the test
The test is to remove all the odd values with my_hash_callback_remove(),
then iterate over all values and verify that they are even. However,
failing this check would just print "bad!" instead of failing the test.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=725981
Reviewed-by: Colin Walters <walters@verbum.org>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 11 May 2015 15:34:35 +0000 (16:34 +0100)]
GTestDBus: use g_printerr() for status message
This avoids any possibility of interfering with test syntax (such as
TAP) on stdout. TAP specifically does not parse stderr.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=725981
Reviewed-by: Colin Walters <walters@verbum.org>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Fri, 8 May 2015 15:38:33 +0000 (16:38 +0100)]
gdatetime test: don't assume that time stands still
If we call time(NULL), then do something (however trivial), then call
g_date_time_new_now_utc(), they do not necessarily share a seconds
value. Let's say the gmtime call takes 2ms. time(NULL) could
return xx:xx:23 when the time is actually xx:xx:23.999999, resulting
in the g_date_time_new_now_utc() happening at xx:xx:24.000001. This is
unlikely, but did happen to me in a parallel build:
GLib:ERROR:.../glib/tests/gdatetime.c:674:test_GDateTime_now_utc: assertion failed (tm.tm_sec == g_date_time_get_second (dt)): (23 == 24)
A similar argument applies to the rollover from xx:23:59.999999 to
xx:24:00, so comparing seconds with a 1s "fuzz" or a >= comparison
is not sufficient; and so on into higher-order fields.
I haven't seen the other tests that use _now() fail in the same way,
but they could.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=749080
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Evan Nemerson [Sun, 10 May 2015 06:45:03 +0000 (23:45 -0700)]
gnetworkaddress: add return type annotation to parse methods
https://bugzilla.gnome.org/show_bug.cgi?id=749180
Simon McVittie [Thu, 7 May 2015 16:36:01 +0000 (17:36 +0100)]
GDBus tests: change progress noise from "if not quiet" to "if verbose"
It seems that even after Bug #711796, these can still interfere
with TAP testing:
PASS: gdbus-proxy-threads 1 /gdbus/proxy/vs-threads
tap-driver.sh: internal error getting exit status
tap-driver.sh: fatal: I/O or internal error
Let's shut them up unless --verbose is used (which would be appropriate
when running them interactively).
Similar symptoms have been seen in Debian:
https://buildd.debian.org/status/fetch.php?pkg=glib2.0&arch=mipsel&ver=2.39.91-1&stamp=
1394394568
and in Guix:
https://lists.gnu.org/archive/html/bug-guix/2014-12/msg00002.html
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=725981
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Thu, 7 May 2015 15:45:48 +0000 (16:45 +0100)]
gdbus-peer test: let GDBusServer start before notifying main thread
When running the nonce-tcp and tcp-anonymous tests in one run
of gdbus-peer, or running one of them twice via command-line options
"-p /gdbus/tcp-anonymous -p /gdbus/tcp-anonymous", the one run second
would sometimes fail to connect with ECONNRESET.
Adding more debug messages revealed that in the successful case,
g_main_loop_run() was executed in the server thread first:
# tcp-anonymous: server thread: listening on tcp:host=localhost,port=53517
# tcp-anonymous: server thread: starting server...
# tcp-anonymous: server thread: creating main loop...
# tcp-anonymous: server thread: running main loop...
# tcp-anonymous: main thread: trying tcp:host=localhost,port=53517...
# tcp-anonymous: main thread: waiting for server thread...
but in the failing case, the main thread attempted to connect
before the call to g_main_loop_run() in the server thread:
# tcp-anonymous: server thread: listening on tcp:host=localhost,port=40659
# tcp-anonymous: server thread: starting server...
# tcp-anonymous: server thread: creating main loop...
# tcp-anonymous: main thread: trying tcp:host=localhost,port=40659...
# tcp-anonymous: server thread: running main loop...
(The log message "creating main loop" was immediately before
create_service_loop(), and "running main loop" was immediately
before g_main_loop_run().)
To ensure that the GDBusServer has a chance to start accepting
connections before the main thread tries to connect to it, do not
tell the main thread about the service_loop immediately, but instead
defer it to an idle.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=749079
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Piotr Drąg [Sun, 10 May 2015 18:09:48 +0000 (20:09 +0200)]
Fix a minor typo in a comment
Simon McVittie [Wed, 29 Apr 2015 11:28:27 +0000 (12:28 +0100)]
gtestutils: better diagnostics if a captured subprocess fails
It's unhelpful to get an error saying that stderr didn't match a
desired pattern, or matched an undesired pattern, without also
telling you what *was* on stderr. Similarly, if a test subprocess
exits 1, there's probably something useful on its stderr that
could have told you why.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=748534
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Simon McVittie [Tue, 21 Apr 2015 19:46:47 +0000 (20:46 +0100)]
gdbus-serialization: use check_serialization() instead of dbus-daemon
This test originally did not connect to the bus, which meant it was
omitted from commits like
415a8d81 that made sure none of GLib tests
rely on the presence of an existing session bus. (In particular,
Debian autobuilders don't have a session bus.)
When test_double_array() was added, environments like the Debian
autobuilders didn't catch the fact that this test relied on having a
session bus, because it is often skipped in minimal environments
due to its libdbus-1 dependency.
We don't actually need to connect to a dbus-daemon here: it's enough
to convert the message from GVariant to D-Bus serialization, and
back into an in-memory representation through libdbus. That's what
check_serialization() does, and I've verified that when I re-introduce
bug #732754 by reverting commits 627b49b and 2268628 locally, this
test still fails.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=744895
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
Philip Withnall [Sun, 3 May 2015 11:17:10 +0000 (12:17 +0100)]
glocalfilemonitor: Emit notification on rate limit change
The changed variable was previously uninitialised in the path where the
rate limit was actually changed. This could result in the
GObject::notify signal not getting emitted.
Spotted by Coverity.
CID: #1296516
https://bugzilla.gnome.org/show_bug.cgi?id=748834
Ting-Wei Lan [Wed, 29 Apr 2015 07:17:00 +0000 (15:17 +0800)]
gsocketlistener: Don't double unref address
https://bugzilla.gnome.org/show_bug.cgi?id=748614
Ting-Wei Lan [Wed, 29 Apr 2015 06:55:00 +0000 (14:55 +0800)]
tests: Use de_DE.UTF-8 instead of de_DE
de_DE.UTF-8 is supported by more operating systems, including FreeBSD,
NetBSD and OpenBSD.
https://bugzilla.gnome.org/show_bug.cgi?id=748612
Matthias Clasen [Thu, 30 Apr 2015 17:40:42 +0000 (13:40 -0400)]
2.45.1
Matthias Clasen [Thu, 30 Apr 2015 16:46:20 +0000 (12:46 -0400)]
Updates
Yosef Or Boczko [Wed, 29 Apr 2015 11:23:50 +0000 (14:23 +0300)]
Updated Hebrew translation
Hans Petter Jansson [Tue, 28 Apr 2015 14:50:42 +0000 (16:50 +0200)]
gmarkup: Make append_escaped_text() slightly more robust.
https://bugzilla.gnome.org/show_bug.cgi?id=631597