X-Git-Url: http://git.silc.fi/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Ftests%2Ftest_silcschedule.c;h=216f14e60a03125713a62276438b24515308b95b;hb=a788ad407a51e84cfd41fedc6c053e62283ea2d7;hp=28d2563245557ca800dc30ee7a764cd3a3553245;hpb=72c2de619079457f7a68100eb13385275a424a23;p=runtime.git diff --git a/lib/silcutil/tests/test_silcschedule.c b/lib/silcutil/tests/test_silcschedule.c index 28d25632..216f14e6 100644 --- a/lib/silcutil/tests/test_silcschedule.c +++ b/lib/silcutil/tests/test_silcschedule.c @@ -1,6 +1,6 @@ /* SilcSchedule tests */ -#include "silc.h" +#include "silcruntime.h" typedef void (*Callback)(void *context); @@ -41,7 +41,7 @@ SILC_TASK_CALLBACK(timeout) SILC_TASK_CALLBACK(cont2) { #ifdef SILC_DEBUG - silc_schedule_stats(schedule); +// silc_schedule_stats(schedule); #endif /* SILC_DEBUG */ SILC_LOG_DEBUG(("Adding %d fd tasks", NUM_FTASK - 10)); @@ -50,6 +50,8 @@ SILC_TASK_CALLBACK(cont2) for (i = 0; i < NUM_FTASK - 10; i++) silc_schedule_task_add_fd(schedule, i + 5, foo, (void *)(i + 5)); #endif + + silc_schedule_event_signal(schedule, "interrupted", NULL, schedule); } SILC_TASK_CALLBACK(cont) @@ -57,7 +59,7 @@ SILC_TASK_CALLBACK(cont) int i; #ifdef SILC_DEBUG - silc_schedule_stats(schedule); +// silc_schedule_stats(schedule); #endif /* SILC_DEBUG */ SILC_LOG_DEBUG(("Adding %d timeout tasks", NUM_TTASK / 3)); @@ -185,5 +187,5 @@ int main(int argc, char **argv) SILC_LOG_DEBUG(("Testing was %s", success ? "SUCCESS" : "FAILURE")); fprintf(stderr, "Testing was %s\n", success ? "SUCCESS" : "FAILURE"); - return success; + return !success; }