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.
This commit is contained in:
Ryan Lortie
2011-07-25 17:43:28 +02:00
parent 7f15910e79
commit 0584f0c504
3 changed files with 45 additions and 2 deletions

View File

@@ -46,3 +46,10 @@ spawn_singlethread_LDADD = $(progs_ldadd) $(top_builddir)/gthread/libgthread-
TEST_PROGS += gwakeup
gwakeup_LDADD = $(progs_ldadd) $(top_builddir)/gthread/libgthread-2.0.la
if HAVE_EVENTFD
TEST_PROGS += gwakeup-fallback
gwakeup_fallback_SOURCES = gwakeup.c
gwakeup_fallback_CFLAGS = $(AM_CFLAGS) -DTEST_EVENTFD_FALLBACK
gwakeup_fallback_LDADD = $(progs_ldadd) $(top_builddir)/gthread/libgthread-2.0.la
endif