For internal use only.
This test program is used to test the operation of event_init() and related functions.
Definition in file t_event_init.c.
#include "event-test.h"
#include "engines_int.h"
#include <stdio.h>
#include <string.h>
Include dependency graph for t_event_init.c:
Go to the source code of this file.
Data Structures | |
struct | teng |
Testing engines. More... | |
Defines | |
#define | TENG_CNT |
Number of test engines in tengs array. | |
Functions | |
static ev_err_t | ei_init (ev_ctx_t *ctx, ev_engine_t *engine, ev_flags_t *eng_flags) |
Test engine initialization callback. | |
static ev_err_t | ei_poll (ev_ctx_t *ctx, ev_engine_t *engine, struct timeval *timeout) |
Test engine poll callback. | |
static ev_err_t | ei_sock (ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock) |
Test socket add/remove engine callback. | |
static ev_err_t | ei_sockev (ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock, ev_flags_t evs) |
Test socket event set engine callback. | |
static ev_err_t | ei_sig (ev_ctx_t *ctx, ev_engine_t *engine, ev_sig_t *sig) |
Test signal add/remove engine callback. | |
static ev_err_t | ei_tim (ev_ctx_t *ctx, ev_engine_t *engine, ev_tim_t *tim) |
Test timer add/remove engine callback. | |
static int | gen_verify (ev_ctx_t *ctx, unsigned int gentype, ev_magic_t genmagic, size_t gensize) |
Helper routine for testing generator characteristics. | |
int | main (int argc, char **argv) |
Library initialization test program. | |
Variables | |
static struct teng | tengs [] |
Testing engines. |
|
For internal use only. This macro contains the count of the test engines in the tengs array. Definition at line 233 of file t_event_init.c. Referenced by main(). |
|
For internal use only.
This routine is used to simulate an engine initialization callback. All it does is save the
Definition at line 61 of file t_event_init.c. References eng_data_set. |
|
For internal use only. This dummy routine is needed only to make the engine structure legal. All it does is return 0.
Definition at line 83 of file t_event_init.c. |
|
For internal use only. This dummy routine is needed only to make the engine structure legal. All it does is return 0.
Definition at line 139 of file t_event_init.c. |
|
For internal use only. This dummy routine is needed only to make the engine structure legal. All it does is return 0.
Definition at line 101 of file t_event_init.c. |
|
For internal use only. This dummy routine is needed only to make the engine structure legal. All it does is return 0.
Definition at line 121 of file t_event_init.c. |
|
For internal use only. This dummy routine is needed only to make the engine structure legal. All it does is return 0.
Definition at line 158 of file t_event_init.c. |
|
For internal use only. This simple helper routine simply verifies the characteristics of some basic generators.
Definition at line 256 of file t_event_init.c. References _ev_ctx_s::ec_gens, _ev_gendesc_s::gd_active, _ev_gendesc_s::gd_free, _ev_gendesc_s::gd_magic, _ev_gendesc_s::gd_size, _ev_gendesc_s::gd_type, _ev_genlist_s::gl_count, _ev_genlist_s::gl_list, _ev_gens_s::gs_first, and _ev_gens_s::gs_gens. Referenced by main(). |
|
For internal use only. This program is used for testing the event library's initialization routines. Definition at line 273 of file t_event_init.c. References _ev_ctx_s::ec_gens, ec_verify, EGT_SIGNAL, EGT_SOCKET, EGT_TIMER, eng_data, eng_name, engine, ev_prog_name, EV_SIG_MAGIC, EV_SOCK_MAGIC, ev_test_init, EV_TIM_MAGIC, event_attr_confpath(), event_attr_confreg(), event_attr_confvar(), event_attr_destroy(), event_attr_engine(), event_attr_init(), event_attr_libpath(), event_attr_modlist(), event_destroy(), event_init(), gen_verify(), _ev_gens_s::gs_count, _ev_gens_s::gs_first, _ev_gens_s::gs_next, _ev_gens_s::gs_prev, prog, TENG_CNT, and tengs. Here is the call graph for this function: ![]() |
|
For internal use only. This variable is an array of engines to be tested, along with the expected results for the tests. Referenced by main(). |