Commit Graph

13207 Commits

Author SHA1 Message Date
Matthias Clasen
0178402c6d Revert "tests: port from g_test_trap_subprocess() to g_test_trap_fork()"
This reverts commit ea06ec8063.
2012-12-19 15:20:37 -05:00
Matthias Clasen
6f15db8c3d Revert "gtestutils: fix "-p" logic"
This reverts commit 723a8f5588.
2012-12-19 15:20:31 -05:00
Matthias Clasen
50850fe08c Revert "tests/option-context: fix under --verbose"
This reverts commit 80253cd710.
2012-12-19 15:20:20 -05:00
Matthias Clasen
f64d6640d4 Revert "tests/protocol: redo a bit"
This reverts commit 8d9969fe15.
2012-12-19 15:20:13 -05:00
Matthias Clasen
53a436221f Revert "tests/spawn-*.c: fix on Windows"
This reverts commit 602714a8da.
2012-12-19 15:20:05 -05:00
Simon McVittie
2fe36a2238 Check that credentials pass through D-Bus on supported platforms
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687920
2012-12-19 15:14:35 -05:00
Simon McVittie
32bfd46c7b GCredentials: add a regression test
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687920
2012-12-19 15:14:27 -05:00
Simon McVittie
8f65536504 GCredentials: add getter/setter for the Unix process ID
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687920
2012-12-19 15:08:09 -05:00
Dan Winship
602714a8da tests/spawn-*.c: fix on Windows
Need to append ".exe" to the spawned binary name on Windows

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:13 -05:00
Dan Winship
8d9969fe15 tests/protocol: redo a bit
Rather than overloading --verbose, just skip the tests that aren't
supposed to be run in the parent process (so that if you do run the
toplevel test with --verbose, it doesn't immediately error out).

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:12 -05:00
Dan Winship
80253cd710 tests/option-context: fix under --verbose
We need to always pass G_TEST_TRAP_SILENCE_STDERR/STDOUT, or else
we can't check that they contained the right text later.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:12 -05:00
Dan Winship
723a8f5588 gtestutils: fix "-p" logic
If you had two tests "/foo/bar" and "/foo/bar/baz", and ran the test
program with "-p /foo/bar/baz", it would run "/foo/bar" too. Fix that.
And add a test to tests/testing for it.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:11 -05:00
Dan Winship
ea06ec8063 tests: port from g_test_trap_subprocess() to g_test_trap_fork()
(or, in a few cases, to g_test_expect_message())

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:10 -05:00
Dan Winship
e3a29184d5 gtestutils: add g_test_trap_subprocess(), deprecate g_test_trap_fork()
g_test_trap_fork() doesn't work on Windows and is potentially flaky on
unix anyway given the fork-but-don't-exec. Replace it with
g_test_trap_subprocess(), which re-spawns the same program with
arguments telling it to run a specific (otherwise-ignored) test case.

Make the existing g_test_trap_fork() unit tests be unix-only (they
never passed on Windows anyway), and add a parallel set of
g_test_trap_subprocess() tests.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:08 -05:00
Daniel Macks
79fab3e647 Add missing autoconf test for sysctlbyname()
uses specific mib[] tokens iff it is available, but configure wasn't
testing for it to be available.

https://bugzilla.gnome.org/show_bug.cgi?id=689324
2012-12-19 14:32:24 -05:00
Daniel Macks
1fec9ac47d Fix constant type to match assigned variable type
Some compilers assume a literal value is a certain byte-length without
checking the type to which it is being assigned, giving a compile-time
warning: a default of 'long' is a mismatch when assigning to a guint64
when the latter is a 'long long'. Use one of glib's standard macros to
specify the type of the constant to match the variable type.

https://bugzilla.gnome.org/show_bug.cgi?id=688829
2012-12-19 14:29:08 -05:00
Dan Winship
69ad5010e3 inotify: fix compile 2012-12-19 09:10:12 -05:00
Emmanuele Bassi
5f1f9cb7d8 timezone: Fix byte arithmetic
Use guint8* instead of gpointer, to avoid warnings and side effects.

https://bugzilla.gnome.org/show_bug.cgi?id=686128
2012-12-19 13:48:31 +00:00
Dan Winship
1d7985aa0a tests: multiple fixes to run-assert-msg-test.sh
1) use "../libtool" rather than "libtool" to avoid problems
with wacky OS X not-actually-libtool

2) Use libtool on the libtool script, not the binary, so that it
actually does anything

3) Don't use "gdb --ex" since it's apparently new-ish/non-portable.

https://bugzilla.gnome.org/show_bug.cgi?id=684723
2012-12-19 08:32:42 -05:00
Dan Winship
3a7244bd0c Add "Since 2.36" to G_FILE_MONITOR_WATCH_HARD_LINKS doc 2012-12-19 08:22:23 -05:00
Ryan Lortie
707bc4a40f gio + inotify support for hard links
Add a new GFileMonitorFlag: G_FILE_MONITOR_WATCH_HARD_LINKS.  When set,
changes made to the file via another hard link will be detected.

Implement the new flag for the inotify backend.

https://bugzilla.gnome.org/show_bug.cgi?id=532815
2012-12-19 08:19:18 -05:00
John Ralls
e6d45972fc Bug 633117: glib fails tests if /etc/localtime is not properly set 2012-12-19 00:40:08 +00:00
John Ralls
c9939b0fc7 GTimeZone interval_info: Fix interval 0 per IANA tzfile instructions
IANA tzfiles don't always put standard time in the 0th t_info. Follow
their instructions to use the first standard time t_info for interval 0.
2012-12-18 15:43:41 -08:00
John Ralls
0f0404af21 test_posix_parse: PST8PDT passes on Unix because it names an IANA zone. 2012-12-18 15:43:41 -08:00
John Ralls
bdab372379 MSWindows TimeZone Support: Refactor and rewrite TZ variable parsing 2012-12-18 15:43:41 -08:00
John Ralls
1af37768a5 Test the TZ-variable parsing functions 2012-12-18 15:43:40 -08:00
John Ralls
7d1ae24e19 Implement and test time zone name/abbrev setting for Windows. 2012-12-18 15:43:40 -08:00
John Ralls
d12bb7ef72 Win32 TimeZone Support: General refactoring
For code clarity and to pass tests
2012-12-18 15:43:40 -08:00
John Ralls
1ef6933cbe Add MSWindows timezone names to test new windows support. 2012-12-18 15:43:40 -08:00
Arnel A. Borja
1ccd4d60fc GTimeZone: Fix time zones in Windows
Get time zone information from registry. Use GetTimeZoneInformation()
instead to get the local time zone if Dynamic DST is not available.

https://bugzilla.gnome.org/show_bug.cgi?id=683998
2012-12-18 15:43:40 -08:00
Arnel A. Borja
206ba07bd9 GTimeZone: Parse Windows format for TZ
Parse the "tzn[+|-]hh[:mm[:ss]][dzn]" format used in Windows for
environment variable TZ.

https://bugzilla.gnome.org/show_bug.cgi?id=683998
2012-12-18 15:43:40 -08:00
Arnel A. Borja
87436e6b3d GTimeZone: Parse POSIX format for TZ
Parse the "std offset [dst [offset],start[/time],end[/time]]" (POSIX)
format used in Unix for environment variable TZ.

https://bugzilla.gnome.org/show_bug.cgi?id=686128
2012-12-18 15:43:40 -08:00
Arnel A. Borja
9a4a53c03d GTimeZone: Add initialization functions for rules
Add functions to initialize a GTimeZone from rules.
2012-12-18 15:43:40 -08:00
Arnel A. Borja
9fae921c3e GTimeZone: Parse more offset formats
Allow more formats for offset. Parse seconds in offsets too. Make offset
signs optional.

https://bugzilla.gnome.org/show_bug.cgi?id=686128
2012-12-18 15:43:40 -08:00
John Ralls
59f2da1749 Replace zoneinfo pointers with structs
The approach of sucking a zoneinfo file into a GBytes and working with
pointers into it might be fast, but it's obtuse and not compatible with
Microsoft Windows.
2012-12-18 15:43:40 -08:00
John Ralls
489e031f22 Extract function init_zone_from_iana_info 2012-12-18 15:43:40 -08:00
John Ralls
47de8646e2 Extract function zone_info_unix 2012-12-18 15:43:40 -08:00
Ryan Lortie
5df1edaf70 gtype: disallow adding interfaces after the fact
Add a check to prevent adding an interface to a class that has already
had its class_init done.

This is an incompatible change but it is suspected that there are not
many users of this functionality.  Two known exceptions are pygobject
(fixed in bug 686149) and our own testsuite (affected tests have been
temporarily disabled by this patch).

Once we confirm that nobody else is using this functionality we can
remove a rather large amount of code for dealing with this case.

https://bugzilla.gnome.org/show_bug.cgi?id=687659
2012-12-18 21:37:07 +01:00
Rico Tzschichholz
d04faab327 gio: Fix build with -Werror=format-security 2012-12-18 21:32:01 +01:00
Rico Tzschichholz
d1ab41c940 Revert "gtype: disallow adding interfaces after the fact"
This reverts commit d6a075b0d8.
2012-12-18 21:23:13 +01:00
PHO
f0f6c8d231 gsocket: Work around broken CMSG_FIRSTHDR()
As RFC 2292 points out, some platforms (e.g. Darwin 9.8.0) provide
CMSG_FIRSTHDR(msg) which just returns msg.msg_control without first
checking if msg.msg_controllen is non-zero. We need a workaround for
such platforms not to let g_socket_receive_message() segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=690388
2012-12-18 13:31:02 -05:00
Colin Walters
780871d273 GOutputStream: Fix a compiler warning 2012-12-18 13:21:24 -05:00
Dan Winship
07bb8097e5 gtask: don't deadlock when tasks block on other tasks
If tasks block waiting for other tasks to complete then the system can
end up starved for threads. Avoid this by bumping up max-threads in
that case.

This also reverts 7b1f8c58 and reverts max-threads for GTask's
GThreadPool back to 10.

https://bugzilla.gnome.org/show_bug.cgi?id=687223
2012-12-18 13:19:08 -05:00
Colin Walters
2149b29468 Add g_get_num_processors()
Based on a patch from John Cupitt <jcupitt@gmail.com>

Useful for thread pools which should scale to number of processors.

See https://bugzilla.gnome.org/show_bug.cgi?id=687223

https://bugzilla.gnome.org/show_bug.cgi?id=614930
2012-12-18 13:13:15 -05:00
Dan Winship
ed5accf16c gio: port file/vfs-related classes from GSimpleAsyncResult to GTask
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-12-18 09:07:24 -05:00
Dan Winship
669505e354 gio: port basic I/O classes from GSimpleAsyncResult to GTask
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-12-18 09:07:19 -05:00
Shantha kumar
586adb9790 Tamil translation updated 2012-12-18 16:48:21 +05:30
Shantha kumar
8a4567aaeb Tamil translation updated 2012-12-18 16:35:48 +05:30
Shantha kumar
5eb2e087ce Tamil translation updated 2012-12-18 16:29:08 +05:30
Shantha kumar
e3d6bb41c5 Tamil translation updated 2012-12-18 16:07:10 +05:30