syslog-ng source
test_runid.c File Reference
#include <criterion/criterion.h>
#include "libtest/persist_lib.h"
#include "lib/run-id.h"
#include "lib/apphook.h"
#include <unistd.h>
Include dependency graph for test_runid.c:

Macros

#define RUN_ID_FIRST   1
 

Functions

PersistState * create_persist_state (gchar *persist_file_name)
 
 TestSuite (test_run_id,.init=app_startup,.fini=app_shutdown)
 
PersistState * restart_persist_state_with_cancel (PersistState *state, gchar *persist_file_name)
 
void destroy_persist_state (PersistState *state)
 
 Test (test_run_id, first_run__run_id_is_one)
 
 Test (test_run_id, second_run__run_id_is_two)
 
 Test (test_run_id, second_run_but_with_non_commit__run_id_is_one)
 
 Test (test_run_id, is_same_run__differs_when_not_same_run)
 
 Test (test_run_id, macro_has_the_same_value_as_run_id)
 
 Test (test_run_id, macro_is_empty_if_run_id_is_not_inited)
 

Macro Definition Documentation

◆ RUN_ID_FIRST

#define RUN_ID_FIRST   1

Function Documentation

◆ create_persist_state()

PersistState * create_persist_state ( gchar *  persist_file_name)

◆ destroy_persist_state()

void destroy_persist_state ( PersistState *  state)

◆ restart_persist_state_with_cancel()

PersistState* restart_persist_state_with_cancel ( PersistState *  state,
gchar *  persist_file_name 
)

◆ Test() [1/6]

Test ( test_run_id  ,
first_run__run_id_is_one   
)

◆ Test() [2/6]

Test ( test_run_id  ,
is_same_run__differs_when_not_same_run   
)

◆ Test() [3/6]

Test ( test_run_id  ,
macro_has_the_same_value_as_run_id   
)

◆ Test() [4/6]

Test ( test_run_id  ,
macro_is_empty_if_run_id_is_not_inited   
)

◆ Test() [5/6]

Test ( test_run_id  ,
second_run__run_id_is_two   
)

◆ Test() [6/6]

Test ( test_run_id  ,
second_run_but_with_non_commit__run_id_is_one   
)

◆ TestSuite()

TestSuite ( test_run_id  ,
init = app_startup,
fini = app_shutdown 
)