libamxp
1.4.0
Patterns C Implementation
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <cmocka.h>
#include <amxc/amxc_variant.h>
#include <amxc/amxc_lqueue.h>
#include <amxp/amxp_signal.h>
#include <amxp/amxp_syssig.h>
#include <amxp/amxp_slot.h>
#include <amxp_signal_priv.h>
#include "test_signal_slots_sigmngr.h"
#include <amxc/amxc_macros.h>
Go to the source code of this file.
Functions | |
static void | test_slot_delete_sigmngr (UNUSED const char *const sig_name, UNUSED const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_delete_sigmngr_and_trigger_slot (UNUSED const char *const sig_name, UNUSED const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_slot_check_deleted_sigmngr (UNUSED const char *const sig_name, UNUSED const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_slot1 (const char *const sig_name, const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_slot2 (const char *const sig_name, const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_delete_signal_slot (const char *const sig_name, UNUSED const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_delete_signal_slot2 (const char *const sig_name, UNUSED const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_slot_disconnect_all (UNUSED const char *const sig_name, UNUSED const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_slot_remove_signal (const char *const sig_name, UNUSED const amxc_var_t *const data, UNUSED void *const priv) |
static void | test_deferred_func (UNUSED const amxc_var_t *const data, void *const priv) |
static void | test_deferred_func_remove_sigmngr (UNUSED const amxc_var_t *const data, void *const priv) |
static void | handle_events (void) |
void | test_sigmngr_new_delete (UNUSED void **state) |
void | test_sigmngr_delete_pending_sigs (UNUSED void **state) |
void | test_sigmngr_trigger (UNUSED void **state) |
void | test_sigmngr_emit (UNUSED void **state) |
void | test_sigmngr_suspend_resume (UNUSED void **state) |
void | test_sigmngr_connect_all (UNUSED void **state) |
void | test_sigmngr_connect_all2 (UNUSED void **state) |
void | test_sigmngr_disconnect_all_1 (UNUSED void **state) |
void | test_sigmngr_disconnect_all_2 (UNUSED void **state) |
void | test_sigmngr_add_remove_signal (UNUSED void **state) |
void | test_sigmngr_crash_connect_not_existing_signal (UNUSED void **state) |
void | test_sigmngr_find_signal (UNUSED void **state) |
void | test_signal_has_slots (UNUSED void **state) |
void | test_slot_disconnect_priv (UNUSED void **state) |
void | test_does_not_crash_with_rogue_signal (UNUSED void **state) |
void | test_sigmngr_disable (UNUSED void **state) |
void | test_sigmngr_trigger_unknown_signal_should_not_segfault (UNUSED void **state) |
void | test_removing_signal_in_slot (UNUSED void **state) |
void | test_delete_sigmngr_in_slot (UNUSED void **state) |
void | test_deferred_call (UNUSED void **state) |
void | test_deferred_call_delete_sigmngr (UNUSED void **state) |
void | test_can_disconnect_in_slot (UNUSED void **state) |
void | test_can_delete_signal_in_slot (UNUSED void **state) |
void | test_can_delete_signal_in_multiple_slots (UNUSED void **state) |
void | test_can_trigger_non_registered_signal (UNUSED void **state) |
void | test_delete_sigmngr_in_regexp_slot (UNUSED void **state) |
void | test_delete_sigmngr_in_slot_and_trigger_slot (UNUSED void **state) |
Variables | |
static const char * | expected_sig_name = NULL |
static int | count1 = 0 |
static int | count2 = 0 |
amxp_signal_mngr_t * | my_sigmngr = NULL |
|
static |
Definition at line 182 of file test_signal_slots_sigmngr.c.
void test_can_delete_signal_in_multiple_slots | ( | UNUSED void ** | state | ) |
Definition at line 964 of file test_signal_slots_sigmngr.c.
void test_can_delete_signal_in_slot | ( | UNUSED void ** | state | ) |
Definition at line 950 of file test_signal_slots_sigmngr.c.
void test_can_disconnect_in_slot | ( | UNUSED void ** | state | ) |
Definition at line 920 of file test_signal_slots_sigmngr.c.
void test_can_trigger_non_registered_signal | ( | UNUSED void ** | state | ) |
Definition at line 980 of file test_signal_slots_sigmngr.c.
void test_deferred_call | ( | UNUSED void ** | state | ) |
Definition at line 881 of file test_signal_slots_sigmngr.c.
void test_deferred_call_delete_sigmngr | ( | UNUSED void ** | state | ) |
Definition at line 905 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 171 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 176 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 89 of file test_signal_slots_sigmngr.c.
void test_delete_sigmngr_in_regexp_slot | ( | UNUSED void ** | state | ) |
Definition at line 994 of file test_signal_slots_sigmngr.c.
void test_delete_sigmngr_in_slot | ( | UNUSED void ** | state | ) |
Definition at line 858 of file test_signal_slots_sigmngr.c.
void test_delete_sigmngr_in_slot_and_trigger_slot | ( | UNUSED void ** | state | ) |
Definition at line 1003 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 139 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 146 of file test_signal_slots_sigmngr.c.
void test_does_not_crash_with_rogue_signal | ( | UNUSED void ** | state | ) |
Definition at line 802 of file test_signal_slots_sigmngr.c.
void test_removing_signal_in_slot | ( | UNUSED void ** | state | ) |
Definition at line 841 of file test_signal_slots_sigmngr.c.
void test_sigmngr_add_remove_signal | ( | UNUSED void ** | state | ) |
Definition at line 668 of file test_signal_slots_sigmngr.c.
void test_sigmngr_connect_all | ( | UNUSED void ** | state | ) |
Definition at line 439 of file test_signal_slots_sigmngr.c.
void test_sigmngr_connect_all2 | ( | UNUSED void ** | state | ) |
Definition at line 484 of file test_signal_slots_sigmngr.c.
void test_sigmngr_crash_connect_not_existing_signal | ( | UNUSED void ** | state | ) |
Definition at line 709 of file test_signal_slots_sigmngr.c.
void test_sigmngr_delete_pending_sigs | ( | UNUSED void ** | state | ) |
Definition at line 218 of file test_signal_slots_sigmngr.c.
void test_sigmngr_disable | ( | UNUSED void ** | state | ) |
Definition at line 811 of file test_signal_slots_sigmngr.c.
void test_sigmngr_disconnect_all_1 | ( | UNUSED void ** | state | ) |
Definition at line 528 of file test_signal_slots_sigmngr.c.
void test_sigmngr_disconnect_all_2 | ( | UNUSED void ** | state | ) |
Definition at line 597 of file test_signal_slots_sigmngr.c.
void test_sigmngr_emit | ( | UNUSED void ** | state | ) |
Definition at line 307 of file test_signal_slots_sigmngr.c.
void test_sigmngr_find_signal | ( | UNUSED void ** | state | ) |
Definition at line 719 of file test_signal_slots_sigmngr.c.
void test_sigmngr_new_delete | ( | UNUSED void ** | state | ) |
Definition at line 190 of file test_signal_slots_sigmngr.c.
void test_sigmngr_suspend_resume | ( | UNUSED void ** | state | ) |
Definition at line 400 of file test_signal_slots_sigmngr.c.
void test_sigmngr_trigger | ( | UNUSED void ** | state | ) |
Definition at line 245 of file test_signal_slots_sigmngr.c.
void test_sigmngr_trigger_unknown_signal_should_not_segfault | ( | UNUSED void ** | state | ) |
Definition at line 837 of file test_signal_slots_sigmngr.c.
void test_signal_has_slots | ( | UNUSED void ** | state | ) |
Definition at line 737 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 102 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 120 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 96 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 83 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 153 of file test_signal_slots_sigmngr.c.
void test_slot_disconnect_priv | ( | UNUSED void ** | state | ) |
Definition at line 755 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 161 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 78 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 79 of file test_signal_slots_sigmngr.c.
|
static |
Definition at line 77 of file test_signal_slots_sigmngr.c.
amxp_signal_mngr_t* my_sigmngr = NULL |
Definition at line 81 of file test_signal_slots_sigmngr.c.