FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Unit test for interface operations. More...
#include <testRun.h>
#include <event.h>
#include <host.h>
#include <interface.h>
#include <scheduler.h>
#include <gio/gio.h>
#include <glib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | mint_t int32_t |
#define | CREATE_INTERFACE(name) |
#define | SEND_RECEIVE(string, len, res) |
Functions | |
int | socket_connect (char *host, char *port) |
Create a socket connection. More... | |
void * | interface_listen_thread (void *unused) |
void | test_interface_init () |
Test for interface_init() More... | |
void | test_interface_destroy () |
Test for interface_destroy() More... | |
void | test_interface_listen_thread () |
Test for interface_listen_thread() More... | |
void | test_interface_pool () |
Test for interface_init() thread pool. More... | |
void | test_sending_close () |
Test for close message on interface. More... | |
void | test_sending_load () |
Test for load message on interface. More... | |
void | test_sending_kill () |
Test for kill message on interface. More... | |
void | test_sending_pause () |
Test for pause message on interface. More... | |
void | test_sending_reload () |
Test for reload message on interface. More... | |
void | test_sending_agents () |
Test for agent message on interface. More... | |
Variables | |
CU_TestInfo | tests_interface [] |
CU_TestInfo | tests_interface_thread [] |
Unit test for interface operations.
Definition in file testInterface.c.
#define CREATE_INTERFACE | ( | name | ) |
Definition at line 248 of file testInterface.c.
#define mint_t int32_t |
Check the processor architecture (32/64 bit)
Definition at line 39 of file testInterface.c.
#define SEND_RECEIVE | ( | string, | |
len, | |||
res | |||
) |
Definition at line 256 of file testInterface.c.
int socket_connect | ( | char * | host, |
char * | port | ||
) |
Create a socket connection.
Creates a new socket that connects to the given host and port.
host | Cstring name of the host to connect to |
port | Cstring representation of the port to connec to |
Definition at line 51 of file testInterface.c.
void test_interface_destroy | ( | ) |
Test for interface_destroy()
i_created
as FALSEi_terminate
as FALSE Definition at line 150 of file testInterface.c.
void test_interface_init | ( | ) |
Test for interface_init()
i_created
as TRUEi_terminate
as FALSEserver
as not NULLworkers
as not NULLcancel
as not NULLDefinition at line 112 of file testInterface.c.
void test_interface_listen_thread | ( | ) |
Test for interface_listen_thread()
i_terminate
and i_created
to TRUE and call interface_listen_thread()i_terminate
and i_created
to FALSE and call interface_listen_thread()Definition at line 185 of file testInterface.c.
void test_interface_pool | ( | ) |
Test for interface_init() thread pool.
Definition at line 214 of file testInterface.c.
void test_sending_agents | ( | ) |
Test for agent message on interface.
pause <job id>
)received
and a new event list_agents_event
should be triggered Definition at line 523 of file testInterface.c.
void test_sending_close | ( | ) |
Test for close message on interface.
close
message on the interfacerecieved\nCLOSE
Definition at line 275 of file testInterface.c.
void test_sending_kill | ( | ) |
Test for kill message on interface.
received\nInvalid kill command: <kill message>
received
and queue length should decrease Definition at line 353 of file testInterface.c.
void test_sending_load | ( | ) |
Test for load message on interface.
load
message on the interfacereceived\nhost:<host> address:<address> max:<max> running:0\nend
Definition at line 317 of file testInterface.c.
void test_sending_pause | ( | ) |
Test for pause message on interface.
received\nInvalid pause command: <pause message>
pause <job id>
)received
and queue length should decrease Definition at line 426 of file testInterface.c.
void test_sending_reload | ( | ) |
Test for reload message on interface.
pause <job id>
)received
and a new event scheduler_config_event
should be triggered Definition at line 485 of file testInterface.c.
CU_TestInfo tests_interface[] |
Definition at line 556 of file testInterface.c.
CU_TestInfo tests_interface_thread[] |
Definition at line 565 of file testInterface.c.