Tests for the observable state machine.
More...
#include "acutest_common_init.h"
#include "acutest_helpers.h"
#include <freeradius-devel/util/machine.h>
Go to the source code of this file.
|
| static int | conn_enter_connected (UNUSED fr_machine_t *m, UNUSED void *uctx) |
| |
| static int | conn_enter_connecting (UNUSED fr_machine_t *m, UNUSED void *uctx) |
| |
| static void | conn_exit_connecting (UNUSED fr_machine_t *m, UNUSED void *uctx) |
| |
| | FR_MACHINE_VALID (conn, CONN_MAX, CONN_ROW(CONN_INIT, CONN_CONNECTING, CONN_CLOSED), CONN_ROW(CONN_CONNECTING, CONN_CONNECTED, CONN_FAILED, CONN_CLOSED), CONN_ROW(CONN_CONNECTED, CONN_FAILED, CONN_CLOSED),) |
| |
| static void | log_add (char const *event) |
| |
| static bool | log_matches (char const *const expected[], size_t expected_num) |
| |
| static void | log_reset (void) |
| |
| static void | test_enter_failed (void) |
| |
| static void | test_init (void) |
| |
| static void | test_pause_resume (void) |
| |
| static void | test_queue_revalidated (void) |
| |
| static void | test_table (void) |
| |
| static void | test_transition_from_watcher (void) |
| |
| static void | test_transition_invalid (void) |
| |
| static void | test_transition_order (void) |
| |
| static void | test_watch_ctx_free (void) |
| |
| static void | test_watch_edges (void) |
| |
| static void | test_watch_free_during_walk (void) |
| |
| static void | test_watch_oneshot_and_disable (void) |
| |
| static void | watch_free_entry (UNUSED conn_machine_t *m, UNUSED conn_state_t prev, UNUSED conn_state_t state, void *uctx) |
| |
| static void | watch_log (UNUSED conn_machine_t *m, UNUSED conn_state_t prev, UNUSED conn_state_t state, void *uctx) |
| |
| static void | watch_transition (conn_machine_t *m, UNUSED conn_state_t prev, UNUSED conn_state_t state, void *uctx) |
| |
Tests for the observable state machine.
- Copyright
- 2026 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file machine_tests.c.
◆ CONN_ROW
◆ LOG_MATCHES
◆ LOG_MAX
◆ conn_state_t
| Enumerator |
|---|
| CONN_INIT | |
| CONN_CONNECTING | |
| CONN_CONNECTED | |
| CONN_FAILED | |
| CONN_CLOSED | |
| CONN_MAX | |
Definition at line 31 of file machine_tests.c.
◆ conn_enter_connected()
◆ conn_enter_connecting()
◆ conn_exit_connecting()
◆ FR_MACHINE_VALID()
| FR_MACHINE_VALID |
( |
conn |
, |
|
|
CONN_MAX |
, |
|
|
CONN_ROW(CONN_INIT, CONN_CONNECTING, CONN_CLOSED) |
, |
|
|
CONN_ROW(CONN_CONNECTING, CONN_CONNECTED, CONN_FAILED, CONN_CLOSED) |
, |
|
|
CONN_ROW(CONN_CONNECTED, CONN_FAILED, CONN_CLOSED) |
|
|
) |
| |
◆ log_add()
| static void log_add |
( |
char const * |
event | ) |
|
|
static |
◆ log_matches()
| static bool log_matches |
( |
char const *const |
expected[], |
|
|
size_t |
expected_num |
|
) |
| |
|
static |
◆ log_reset()
| static void log_reset |
( |
void |
| ) |
|
|
static |
◆ test_enter_failed()
| static void test_enter_failed |
( |
void |
| ) |
|
|
static |
◆ test_init()
| static void test_init |
( |
void |
| ) |
|
|
static |
◆ test_pause_resume()
| static void test_pause_resume |
( |
void |
| ) |
|
|
static |
◆ test_queue_revalidated()
| static void test_queue_revalidated |
( |
void |
| ) |
|
|
static |
◆ test_table()
| static void test_table |
( |
void |
| ) |
|
|
static |
◆ test_transition_from_watcher()
| static void test_transition_from_watcher |
( |
void |
| ) |
|
|
static |
◆ test_transition_invalid()
| static void test_transition_invalid |
( |
void |
| ) |
|
|
static |
◆ test_transition_order()
| static void test_transition_order |
( |
void |
| ) |
|
|
static |
◆ test_watch_ctx_free()
| static void test_watch_ctx_free |
( |
void |
| ) |
|
|
static |
◆ test_watch_edges()
| static void test_watch_edges |
( |
void |
| ) |
|
|
static |
◆ test_watch_free_during_walk()
| static void test_watch_free_during_walk |
( |
void |
| ) |
|
|
static |
◆ test_watch_oneshot_and_disable()
| static void test_watch_oneshot_and_disable |
( |
void |
| ) |
|
|
static |
◆ watch_free_entry()
◆ watch_log()
◆ watch_transition()
◆ conn_def
Initial value:= {
.name = "conn",
.valid = &conn_valid,
}
static fr_machine_state_t const conn_states[CONN_MAX]
static fr_table_num_indexed_t const conn_state_names[]
Definition at line 104 of file machine_tests.c.
◆ conn_state_names
Initial value:= {
}
#define FR_TABLE_INDEXED_ENTRY(_v)
Build a single fr_table_num_indexed_t entry from an enum identifier.
Definition at line 40 of file machine_tests.c.
◆ conn_states
Initial value:= {
}
static int conn_enter_connected(UNUSED fr_machine_t *m, UNUSED void *uctx)
static void conn_exit_connecting(UNUSED fr_machine_t *m, UNUSED void *uctx)
static int conn_enter_connecting(UNUSED fr_machine_t *m, UNUSED void *uctx)
Definition at line 99 of file machine_tests.c.
◆ enter_ret
◆ event_log
◆ event_num
◆ TEST_LIST
Initial value:= {
}
static void test_table(void)
static void test_enter_failed(void)
static void test_transition_from_watcher(void)
static void test_pause_resume(void)
static void test_watch_oneshot_and_disable(void)
static void test_watch_free_during_walk(void)
static void test_transition_invalid(void)
static void test_init(void)
static void test_watch_ctx_free(void)
static void test_queue_revalidated(void)
static void test_watch_edges(void)
static void test_transition_order(void)
Definition at line 488 of file machine_tests.c.