The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
Loading...
Searching...
No Matches
Macros | Functions | Variables
track_tests.c File Reference

Tests for the RADIUS/1.1 Token tracking in the rlm_radius tracking table. More...

#include <freeradius-devel/util/test/acutest.h>
#include <freeradius-devel/util/test/acutest_helpers.h>
#include "track.c"
+ Include dependency graph for track_tests.c:

Go to the source code of this file.

Macros

#define REQUEST   ((request_t *) &dummy_request)
 
#define RESERVE_OR_RETURN(_tt, _te)
 

Functions

static void test_binding (void)
 
static void test_id_mode (void)
 
static void test_token_epoch (void)
 
static void test_token_find (void)
 
static void test_token_many (void)
 
static void test_token_release (void)
 
static void test_token_reuse (void)
 
static void test_update (void)
 
static radius_track_entry_t * token_find (radius_track_t *tt, uint32_t token)
 
static radius_track_t * token_table (uint32_t epoch, uint32_t current)
 
static radius_track_entry_t * track_reserve (radius_track_t *tt, radius_track_entry_t **te_p)
 

Variables

static char dummy_request
 
 TEST_LIST
 

Detailed Description

Tests for the RADIUS/1.1 Token tracking in the rlm_radius tracking table.

Definition in file track_tests.c.

Macro Definition Documentation

◆ REQUEST

#define REQUEST   ((request_t *) &dummy_request)

Definition at line 33 of file track_tests.c.

◆ RESERVE_OR_RETURN

#define RESERVE_OR_RETURN (   _tt,
  _te 
)
Value:
do { \
if (!track_reserve(_tt, &(_te))) { \
TEST_CHECK(!"track_reserve() failed"); \
return; \
} \
} while (0)
static radius_track_entry_t * track_reserve(radius_track_t *tt, radius_track_entry_t **te_p)
Definition track_tests.c:62

Definition at line 75 of file track_tests.c.

Function Documentation

◆ test_binding()

static void test_binding ( void  )
static

Definition at line 246 of file track_tests.c.

+ Here is the call graph for this function:

◆ test_id_mode()

static void test_id_mode ( void  )
static

Definition at line 300 of file track_tests.c.

+ Here is the call graph for this function:

◆ test_token_epoch()

static void test_token_epoch ( void  )
static

Definition at line 171 of file track_tests.c.

+ Here is the call graph for this function:

◆ test_token_find()

static void test_token_find ( void  )
static

Definition at line 83 of file track_tests.c.

+ Here is the call graph for this function:

◆ test_token_many()

static void test_token_many ( void  )
static

Definition at line 217 of file track_tests.c.

+ Here is the call graph for this function:

◆ test_token_release()

static void test_token_release ( void  )
static

Definition at line 114 of file track_tests.c.

+ Here is the call graph for this function:

◆ test_token_reuse()

static void test_token_reuse ( void  )
static

Definition at line 143 of file track_tests.c.

+ Here is the call graph for this function:

◆ test_update()

static void test_update ( void  )
static

Definition at line 266 of file track_tests.c.

+ Here is the call graph for this function:

◆ token_find()

static radius_track_entry_t * token_find ( radius_track_t *  tt,
uint32_t  token 
)
static

Definition at line 53 of file track_tests.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ token_table()

static radius_track_t * token_table ( uint32_t  epoch,
uint32_t  current 
)
static

Definition at line 38 of file track_tests.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ track_reserve()

static radius_track_entry_t * track_reserve ( radius_track_t *  tt,
radius_track_entry_t **  te_p 
)
static

Definition at line 62 of file track_tests.c.

Variable Documentation

◆ dummy_request

char dummy_request
static

Definition at line 32 of file track_tests.c.

◆ TEST_LIST

TEST_LIST
Initial value:
= {
{ "token_find", test_token_find },
{ "token_release", test_token_release },
{ "token_reuse", test_token_reuse },
{ "token_epoch", test_token_epoch },
{ "token_many", test_token_many },
{ "binding", test_binding },
{ "update", test_update },
{ "id_mode", test_id_mode },
}
#define TEST_TERMINATOR
Definition acutest.h:77
static void test_update(void)
static void test_id_mode(void)
static void test_token_many(void)
static void test_token_find(void)
Definition track_tests.c:83
static void test_token_release(void)
static void test_binding(void)
static void test_token_epoch(void)
static void test_token_reuse(void)

Definition at line 325 of file track_tests.c.