diff options
author | Martin Willi <martin@strongswan.org> | 2005-11-29 10:25:07 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2005-11-29 10:25:07 +0000 |
commit | 0e96f7d8c3aefaa1717f4c30e66fdc459d3f2ecc (patch) | |
tree | 9482ca76a46e005757ac485007ad18c8fa38d794 /Source/charon/testcases/scheduler_test.c | |
parent | 79b9c1d6c5ebf296d29e11f4a5f25c0bf60f896c (diff) | |
download | strongswan-0e96f7d8c3aefaa1717f4c30e66fdc459d3f2ecc.tar.bz2 strongswan-0e96f7d8c3aefaa1717f4c30e66fdc459d3f2ecc.tar.xz |
- globals packed in a daemon
Diffstat (limited to 'Source/charon/testcases/scheduler_test.c')
-rw-r--r-- | Source/charon/testcases/scheduler_test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/charon/testcases/scheduler_test.c b/Source/charon/testcases/scheduler_test.c index e8ba827f4..a34527c8a 100644 --- a/Source/charon/testcases/scheduler_test.c +++ b/Source/charon/testcases/scheduler_test.c @@ -25,7 +25,7 @@ #include "scheduler_test.h" -#include <globals.h> +#include <daemon.h> #include <threads/scheduler.h> #include <queues/event_queue.h> #include <queues/job_queue.h> @@ -50,7 +50,7 @@ void test_scheduler(tester_t *tester) { /* misusing for testing only */ jobs[current] = (job_t *) incoming_packet_job_create((packet_t*)(current+1)); - global_event_queue->add_relative(global_event_queue, jobs[current], (current+1) * 500); + charon->event_queue->add_relative(charon->event_queue, jobs[current], (current+1) * 500); } @@ -66,18 +66,18 @@ void test_scheduler(tester_t *tester) { usleep(400 * 1000); - tester->assert_true(tester, (global_job_queue->get_count(global_job_queue) == current ), "job-queue size before event"); - tester->assert_true(tester, (global_event_queue->get_count(global_event_queue) == job_count - current), "event-queue size before event"); + tester->assert_true(tester, (charon->job_queue->get_count(charon->job_queue) == current ), "job-queue size before event"); + tester->assert_true(tester, (charon->event_queue->get_count(charon->event_queue) == job_count - current), "event-queue size before event"); usleep(100 * 1000); - tester->assert_true(tester, (global_job_queue->get_count(global_job_queue) == current + 1), "job-queue size after event"); - tester->assert_true(tester, (global_event_queue->get_count(global_event_queue) == job_count - current - 1), "event-queue size after event"); + tester->assert_true(tester, (charon->job_queue->get_count(charon->job_queue) == current + 1), "job-queue size after event"); + tester->assert_true(tester, (charon->event_queue->get_count(charon->event_queue) == job_count - current - 1), "event-queue size after event"); } /* check job order */ for (current = 0; current < job_count; current++) { - jobs[current] = global_job_queue->get(global_job_queue); + jobs[current] = charon->job_queue->get(charon->job_queue); incoming_packet_job_t *current_job; current_job = (incoming_packet_job_t*) jobs[current]; packet_t *packet; |