Commit Graph

35 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
58031feb17 meson: Use 'tap' test protocol by default
Meson supports tap protocol results parsing, allowing us to track better
the tests that are running (and the ones that are actually skipped) without
manually parsing the test output.

However this also implies that using the verbose mode for a test doesn't
show its output by default (unless there are failures).
2023-01-17 21:08:48 +01:00
Simon McVittie
2b4977635c gthread: Fully initialize GThreadFunctions structure in test
The macOS CI builds with -Werror=missing-field-initializers by default,
making incomplete initializers a compile-time error (even though their
meaning is well-defined: missing fields are initialized as if with
.field = 0).

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2812
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-14 09:43:29 +00:00
Philip Withnall
5585d15d9c tests: Add some trivial tests for g_thread_init()
It’s deprecated, but the big red 0/0/0 line for the `glib/gthread`
directory in the lcov output for GLib is driving me nuts.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-10 15:33:34 +00:00
Ryan Lortie
a9a1c97904 gthread: move test cases to glib/ 2011-10-16 19:08:59 -04:00
Ryan Lortie
fb4e120d88 tests: merge gthread/ and glib/ atomic tests 2011-10-16 19:04:19 -04:00
Ryan Lortie
430c5635f2 g_thread_new: never fail
Remove the GError argument from g_thread_new() and abort on failure.
Introduce g_thread_try() for those who want to handle failure.
2011-10-13 01:00:57 -04:00
Ryan Lortie
015f4b4513 thread: nuke the concept of 'joinable'
And remove the 'joinable' argument from g_thread_new() and
g_thread_new_full().

Change the wording in the docs.  Clarify expectations for
(deprecated) g_thread_create().
2011-10-13 00:43:33 -04:00
Matthias Clasen
daede1dc27 Disable deprecations where appropriate in tests 2011-10-12 00:48:18 -04:00
Ryan Lortie
c33cd00739 Stop using GStaticMutex in two testcases 2011-09-21 16:06:53 -04:00
Ryan Lortie
413186a962 emufutex: remove init from g_thread_init_glib
Use a GStaticMutex instead.
2011-09-09 13:23:48 -04:00
Ryan Lortie
d87eddbb13 .gitignore the gwakeup-fallback testcase 2011-07-25 18:52:36 +02:00
Ryan Lortie
c81eb121a1 GWakeup: make it private API
Colin requests that we keep this one private for now.

Include it at each point of use (libglib, libgio, tests).
2011-07-25 18:51:03 +02:00
Ryan Lortie
0584f0c504 GWakeup: test fallback case
We need to test the case of eventfd in the libc but no kernel support.

In order to do that, we add a separate compile of the GWakeup testcase
that interposes an 'eventfd' symbol that always returns -1 with errno
set.  That will trigger the fallback case.
2011-07-25 17:43:28 +02:00
Ryan Lortie
3c25f9f609 GWakeup .gitignore fixes 2011-07-25 15:30:36 +02:00
Ryan Lortie
4026b33174 add a couple of testcases for GWakeup 2011-07-25 15:30:35 +02:00
Ryan Lortie
804e3ba4dd gitignore tweaks 2011-07-22 15:47:24 +02:00
Matthias Clasen
6dfd21caef Run some tests with errorcheck mutexes too
All in the name of better test coverage.
2011-06-23 00:05:18 -04:00
Colin Walters
4344838781 gthread tests: Remove spurious return; 2011-06-20 14:09:50 -04:00
Colin Walters
c2364ce9a4 spawn-multithreaded: Clean up IO channel code
I modeled the new bits after how gunixmount.c handles GIOChannel;
it's apparently easier not to look at the condition.

https://bugzilla.gnome.org/show_bug.cgi?id=652072
2011-06-14 19:23:36 -04:00
Colin Walters
922f6aa496 spawn-singlethread.c: New test
https://bugzilla.gnome.org/show_bug.cgi?id=652072
2011-06-14 19:23:35 -04:00
Colin Walters
01ee9449e3 spawn-multithreaded: Also look for lt-test-echo
I hate libtool =(

https://bugzilla.gnome.org/show_bug.cgi?id=652072
2011-06-14 19:23:35 -04:00
Dan Winship
7412e073d1 update .gitignores 2011-06-12 16:17:30 -04:00
Ryan Lortie
df0b208831 Implement pointer sized bitlocks
Based on a patch from Alexander Larsson.

https://bugzilla.gnome.org/show_bug.cgi?id=651467
2011-06-03 20:50:18 -04:00
Colin Walters
d51198baad spawn-multithreaded: New test case
We didn't have any coverage of threads spawning processes, which we
should definitely support.

https://bugzilla.gnome.org/show_bug.cgi?id=651725
2011-06-03 11:43:26 -04:00
Simon McVittie
22cc6ce679 Add a regression test for GNOME#642026
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512
2011-05-28 10:00:42 -04:00
Marc-André Lureau
30672af7ff gthread: build unix tests only on unix
The build fails when compiling with mingw32. Correct the build of a
unix tests on unix only.

https://bugzilla.gnome.org/show_bug.cgi?id=649973
2011-05-26 11:19:20 +02:00
Matthias Clasen
9255350a70 Add some atomic ops tests 2011-05-22 01:29:22 -04:00
Dan Winship
181763438a Update .gitignores 2011-05-02 09:54:15 -04:00
Colin Walters
549d895fa4 glib-unix: New API to watch some Unix signals
This new API allows watching a few select Unix signals;
looking through the list on my system, I didn't see anything
else that I think it'd reasonable to watch.

We build on the previous patch to make the child watch helper thread
that existed on Unix handle these signals in the threaded case.
In the non-threaded case, they're just global variables.

https://bugzilla.gnome.org/show_bug.cgi?id=644941
2011-04-27 16:01:39 -04:00
Matthias Clasen
1bbf4cb87c Remove the dead --disable-visiblity configure option
At the same time, document --disable-Bsymbolic.
2010-12-15 11:41:05 -05:00
Ryan Lortie
b3b7ea8e22 Replace -I with $(glib_INCLUDES) and friends
Stop using ad hoc -I in all of our Makefile.am.  Use the new variables
instead.
2010-08-06 13:10:34 -04:00
Matthias Clasen
9174569736 Also use trylock in the bitlock tests 2010-07-31 02:40:16 -04:00
Christian Persch
7bb00fd0e8 Fix a preprocessor warning with --disable-visibility
Don't redefine DISABLE_VISIBILITY when already building with
--disable-visibility.
2010-06-19 19:07:36 +02:00
Matthias Clasen
7b43d2d299 Fix !srcdir build
Bug 616216
2010-04-22 19:31:39 -04:00
Ryan Lortie
40eae351b1 Bug 548967 - 1 bit mutex lock: add tests
Add a test case for the new API.

Always check the emulated futex(2) implementation, even on systems with
futex support.
2010-01-28 18:41:20 -05:00