Commit Graph

9 Commits

Author SHA1 Message Date
Руслан Ижбулатов
4f73487300 Fix tests to compile again - add missing headers to W32, call correct process-id-getting function
https://bugzilla.gnome.org/show_bug.cgi?id=725513
2014-08-02 12:41:14 +00:00
Chun-wei Fan
f493114280 gio/tests: Clean up inclusion of unistd.h
Include unistd.h only on *NIX and define items as necessary on Windows,
also replace instances of ssize_t with the GLib-equivilant gssize so to fix
the build on platforms that do not have ssize_t, such as Visual C++.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
2013-11-04 22:55:30 +08:00
Ryan Lortie
1dc774a653 Remove g_type_init() calls
Very many testcases, some GLib tools (resource compiler, etc) and
GApplication were calling g_type_init().

Remove those uses, as they are no longer required.

https://bugzilla.gnome.org/show_bug.cgi?id=686161
2012-10-16 09:39:24 -04:00
Marc-André Lureau
d9f6314f57 win32: add pipe-io-cancel-test
Test that win32 streams can be cancelled.
It can even be tested with wine on Linux!

https://bugzilla.gnome.org/show_bug.cgi?id=679288
2012-08-20 17:10:31 +02:00
Marc-André Lureau
b9b2cf6a66 win32: add pipe-io-concurrent
Implement test case suggested by Ryan Lortie on bug:
https://bugzilla.gnome.org/show_bug.cgi?id=679288

"There is a potential race here that's really unlikely to happen, but
here we go: We are trying to read from the same socket in two threads.
Some data comes. That causes the poll() in both threads (above) to
finish running. Then the cancellable is checked above. We now find
ourselves here. Only one thread will read the data. The other will
block on this function. Then the user may cancel the cancellable while
we are blocked here, but we will stay blocked...."
2012-08-20 17:10:31 +02:00
Marc-André Lureau
1c1ba8b512 win32: add pipe-io-overlap-test 2012-08-20 17:10:31 +02:00
Alexander Larsson
52389bd010 Fix up testcase broken due to g_thread_new API change 2011-10-17 23:00:29 +02:00
Matthias Clasen
93e49aea1b Don't use deprecated GThread API in gio tests 2011-10-10 09:49:50 -04:00
Tor Lillqvist
9af8b83211 Add GWin32InputStream and GWin32OutputStream classes
Correspond to GUnixInputStream and GUnixOutputStream. No true async
support though. But that is how the Win32 API is, for files not
explicitly opened for so-called overlapped IO.

The API to create these streams takes Win32 HANDLEs. Not file
descriptors, because file descriptors are specific to the C library
used. The user code and GLib might be using different C libraries.

Also add a test program for the new classes, and a gio-windows-2.0.pc
file.
2010-04-19 11:54:56 +03:00