Commit Graph

14535 Commits

Author SHA1 Message Date
Chun-wei Fan
b27a2d436b gio/tests/gsubprocess.c: Fix on Windows
We need to check for the correct line endings on Windows (\r\n) for the
echo tests and currently need to skip the test_echo_eof test there, as
it depends on the cat utility that is not normally found on Windows, and
using an external installation of cat via MSYS or Cygwin would render the
test program to hang as cat waits for user input.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
2013-11-11 22:38:05 +08:00
Chun-wei Fan
fd41363e02 tests/: Include unistd.h on *NIX only
https://bugzilla.gnome.org/show_bug.cgi?id=711047
2013-11-11 22:37:39 +08:00
Chun-wei Fan
5fd3c63ae8 glib/gspawn-win32-helper.c: Clean up a bit
Remove the parts about storing up the fd's in a data structure, but call
close() on the fd's.  However, retain the _get_osfhandle() check on the
fd's when we iterate through the fd's as on fd values in the iteration may
well be invalid fd's.  As a result, the invalid parameter handler is still
needed for newer Microsoft CRTs (8.0/2005+) for _get_osfhandle() to
make sure that the program does not abort when we check the validity of
fd's to be closed in the loop[1].

[1]: http://msdn.microsoft.com/en-us/library/ks2530z6%28v=vs.80%29.aspx
2013-11-11 22:37:10 +08:00
Chun-wei Fan
ccba409d34 tests/: Avoid closing invalid fd's
...and only include unistd.h when we are on *NIX.

Newer Visual C++ runtimes (8.0/2005 and later) will cause the program to
crash with an internal abort() call when they detect instances of close()
being called on an invalid fd, such as when the fd is -1, and these should
be purged anyways.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
2013-11-11 22:36:32 +08:00
Chun-wei Fan
172aaa3a01 glib/gmessages.h: Unify log messages
...Under various compilers when !G_DISABLE_CHECKS.  Previously, the
messages that are logged differ depending whether GLib was built with GCC
or not.  To simplify test cases, make all builds use a single output format
for g_return_if_fail(), g_return_val_if_fail(), g_return_if_reached(), and
g_return_val_if_reached(), by using the GCC-style format and replaceing
__PRETTY_FUNCTION__ with G_STRFUNC, so that it will work across various
compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
2013-11-11 22:35:40 +08:00
Dan Winship
fff14a5b7c gcancellable: don't use g_cancellable_connect() in GCancellableSource
g_cancellable_connect() is documented as calling its callback only
once, but GCancellableSource should trigger every time the cancellable
is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=710691
https://bugzilla.gnome.org/show_bug.cgi?id=711286
2013-11-11 09:28:07 -05:00
Shantha kumar
b4aee2a759 Updated Tamil Translations 2013-11-11 14:21:12 +05:30
Stef Walter
670379b26f gdbus-connection-loss: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 08:46:45 +01:00
Stef Walter
14b27eaab8 gdbus-introspection: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 08:46:33 +01:00
Stef Walter
e34d74bdb3 private: Use threading primitives correctly in private test
We shouldn't be clearing statically allocated mutexes, and also
don't use deprecated heap-allocated GPrivate.

https://bugzilla.gnome.org/show_bug.cgi?id=711755
2013-11-11 08:20:13 +01:00
Stef Walter
177fe9f98e timeloop: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-11 08:14:45 +01:00
Stef Walter
9e0ade0691 file-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-11 08:10:51 +01:00
Stef Walter
dce83add18 gthreadpool: Don't pass bad data to GThreadPool sorter
This causes sorters to crash.

https://bugzilla.gnome.org/show_bug.cgi?id=711756
2013-11-11 07:57:52 +01:00
Stef Walter
81d0ebe29c gmain: Fix use of uninitialized memory in sigaction structure
https://bugzilla.gnome.org/show_bug.cgi?id=711754
2013-11-11 07:40:16 +01:00
Stef Walter
fd7b2faa64 defaultiface: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:27:22 +01:00
Stef Walter
bac4179476 timeloop-closure: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:27:15 +01:00
Stef Walter
d8722441d1 signals: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:27:01 +01:00
Stef Walter
1b9662046f paramspec-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:53 +01:00
Stef Walter
320f0b32de override: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:37 +01:00
Stef Walter
e6de9c6940 gvalue-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:28 +01:00
Stef Walter
83301d8c1f accumulator: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:20 +01:00
Stef Walter
5339950e25 threadtests: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:04 +01:00
Stef Walter
ac6d35b4df enums: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:25:53 +01:00
Stef Walter
dc72039c16 giomodule: Fix leaks in module loading
https://bugzilla.gnome.org/show_bug.cgi?id=711798
2013-11-11 07:22:48 +01:00
Stef Walter
b88f992c6e boxed: Fix double free in boxed unit tests
https://bugzilla.gnome.org/show_bug.cgi?id=711782
2013-11-11 07:20:09 +01:00
Stef Walter
91c8fb82fe gdbus-connection: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:12:53 +01:00
Stef Walter
f80e2695e1 gdbus-connection-slow: Fix leak in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:12:37 +01:00
Stef Walter
0d51ff79ed gdbus-connection: Fix use after free in test
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:12:26 +01:00
Stef Walter
95526b5db5 gsubprocess: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:12:18 +01:00
Stef Walter
fe3c878c53 gsubprocess: Fix error detection logic in tests
Various tests were depending on local_error being set by a callback
when it could never have been the case. Simplify async error detection
logic in those cases, and fix leak of GError.

https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:12:00 +01:00
Stef Walter
78ad171da9 g-icon: Fix memory leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:11:29 +01:00
Stef Walter
faafd4c051 contexts: Fix memory leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:11:22 +01:00
Stef Walter
438f7110f9 data-output-stream: Fix some access after free
The memory pointed to by a GMemoryOutputStream can be realloc'd

https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:11:14 +01:00
Stef Walter
72171240cc buffered-output-stream: Fix some access after free
The memory pointed to by a GMemoryOutputStream can be realloc'd

https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-11-11 07:10:59 +01:00
Stef Walter
419b47e166 gtestdbus: Fix leak of GMainLoop
https://bugzilla.gnome.org/show_bug.cgi?id=711808
2013-11-11 06:55:09 +01:00
Stef Walter
6294d73023 module-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711768
2013-11-10 22:53:42 +01:00
Stef Walter
fe8862dc1b utils: Don't free memory owned by glib in test
https://bugzilla.gnome.org/show_bug.cgi?id=711775
2013-11-10 22:52:47 +01:00
Stef Walter
0a02fd9c52 iochannel-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:45:04 +01:00
Stef Walter
44bd2ab07e unicode-encoding: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:44:39 +01:00
Stef Walter
e8cc0966d4 thread-test: Fix leaks in tests
This is a test of deprecated functionality and its age is
showing. Doesn't actually do what it says. But fix leaks anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:44:12 +01:00
Stef Walter
ae1764b4e0 mainloop-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:43:25 +01:00
Stef Walter
83a14d13ec datetime: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:42:57 +01:00
Stef Walter
5ae5d438a6 mapping-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:42:29 +01:00
Stef Walter
fc4630b7ac gio-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:41:44 +01:00
Stef Walter
ee743674a1 completion-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:41:29 +01:00
Stef Walter
ba56c7b720 child-test: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:41:16 +01:00
Stef Walter
9a67fb903f asyncqueue-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:40:58 +01:00
Stef Walter
e525586726 unix: Fix memory leak in unix test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:40:28 +01:00
Dan Winship
ab3c55435a gerror: Don't leak memory when overwrite warning
Even though we can't always make no-leak guarantees when g_warning()
in this case we're testing this behavior in tests, and it would be
good to be able to valgrind this.

https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:40:08 +01:00
Stef Walter
e74b4351a3 private: Fix memory leak in tests
Don't use g_private_new(), it's deprecated, and leaks by definition.

https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:39:25 +01:00