The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Functions | Variables
talloc_tests.c File Reference

Tests for talloc and FreeRADIUS talloc utility functions. More...

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

Go to the source code of this file.

Functions

static int _track_free_order (int *ptr)
 
static int native_destructor (int *ptr)
 
static int test_fr_destructor_func (UNUSED void *fire_ctx, void *uctx)
 
static void test_talloc_aligned_array (void)
 
static void test_talloc_array (void)
 
static void test_talloc_array_null_terminate (void)
 
static void test_talloc_asprintf (void)
 
static void test_talloc_basic (void)
 
static void test_talloc_bstr_append (void)
 
static void test_talloc_bstr_realloc (void)
 
static void test_talloc_bstrndup (void)
 
static void test_talloc_buffer_append_buffer (void)
 
static void test_talloc_child_ctx (void)
 
static void test_talloc_decrease_ref_count (void)
 
static void test_talloc_deep_hierarchy (void)
 
static void test_talloc_destructor_add (void)
 
static void test_talloc_find_parent_byname (void)
 
static void test_talloc_free (void)
 
static void test_talloc_free_children (void)
 
static void test_talloc_get_size (void)
 
static void test_talloc_hdr_size (void)
 
static void test_talloc_increase_ref_count (void)
 
static void test_talloc_is_parent (void)
 
static void test_talloc_link_ctx (void)
 
static void test_talloc_memcmp_array (void)
 
static void test_talloc_memcmp_bstr (void)
 
static void test_talloc_memdup (void)
 
static void test_talloc_move (void)
 
static void test_talloc_naming (void)
 
static void test_talloc_parent (void)
 
static void test_talloc_pool (void)
 
static void test_talloc_realloc_zero (void)
 
static void test_talloc_reference (void)
 
static void test_talloc_reparent (void)
 
static void test_talloc_set_destructor (void)
 
static void test_talloc_steal (void)
 
static void test_talloc_strdup (void)
 
static void test_talloc_strndup_append (void)
 
static void test_talloc_total_size (void)
 
static void test_talloc_typed_asprintf (void)
 
static void test_talloc_typed_memdup (void)
 
static void test_talloc_typed_strdup (void)
 
static void test_talloc_typed_strndup (void)
 
static void test_talloc_zero (void)
 

Variables

static int child_free_idx
 
static int child_free_order [4]
 
static int fr_destructor_called
 
static void const * fr_destructor_uctx
 
static int native_destructor_count
 
 TEST_LIST
 

Detailed Description

Tests for talloc and FreeRADIUS talloc utility functions.

Definition in file talloc_tests.c.

Function Documentation

◆ _track_free_order()

static int _track_free_order ( int *  ptr)
static

Definition at line 1101 of file talloc_tests.c.

+ Here is the caller graph for this function:

◆ native_destructor()

static int native_destructor ( int *  ptr)
static

Definition at line 301 of file talloc_tests.c.

+ Here is the caller graph for this function:

◆ test_fr_destructor_func()

static int test_fr_destructor_func ( UNUSED void *  fire_ctx,
void *  uctx 
)
static

Definition at line 1023 of file talloc_tests.c.

+ Here is the caller graph for this function:

◆ test_talloc_aligned_array()

static void test_talloc_aligned_array ( void  )
static

Definition at line 1217 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_array()

static void test_talloc_array ( void  )
static

Definition at line 89 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_array_null_terminate()

static void test_talloc_array_null_terminate ( void  )
static

Definition at line 985 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_asprintf()

static void test_talloc_asprintf ( void  )
static

Definition at line 370 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_basic()

static void test_talloc_basic ( void  )
static

Definition at line 34 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_bstr_append()

static void test_talloc_bstr_append ( void  )
static

Definition at line 821 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_bstr_realloc()

static void test_talloc_bstr_realloc ( void  )
static

Definition at line 845 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_bstrndup()

static void test_talloc_bstrndup ( void  )
static

Definition at line 795 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_buffer_append_buffer()

static void test_talloc_buffer_append_buffer ( void  )
static

Definition at line 949 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_child_ctx()

static void test_talloc_child_ctx ( void  )
static

Definition at line 1108 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_decrease_ref_count()

static void test_talloc_decrease_ref_count ( void  )
static

Definition at line 1186 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_deep_hierarchy()

static void test_talloc_deep_hierarchy ( void  )
static

Definition at line 625 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_destructor_add()

static void test_talloc_destructor_add ( void  )
static

Definition at line 1030 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_find_parent_byname()

static void test_talloc_find_parent_byname ( void  )
static

Definition at line 521 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_free()

static void test_talloc_free ( void  )
static

Definition at line 130 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_free_children()

static void test_talloc_free_children ( void  )
static

Definition at line 431 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_get_size()

static void test_talloc_get_size ( void  )
static

Definition at line 497 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_hdr_size()

static void test_talloc_hdr_size ( void  )
static

Definition at line 1081 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_increase_ref_count()

static void test_talloc_increase_ref_count ( void  )
static

Definition at line 675 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_is_parent()

static void test_talloc_is_parent ( void  )
static

Definition at line 548 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_link_ctx()

static void test_talloc_link_ctx ( void  )
static

Definition at line 1065 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_memcmp_array()

static void test_talloc_memcmp_array ( void  )
static

Definition at line 871 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_memcmp_bstr()

static void test_talloc_memcmp_bstr ( void  )
static

Definition at line 905 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_memdup()

static void test_talloc_memdup ( void  )
static

Definition at line 604 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_move()

static void test_talloc_move ( void  )
static

Definition at line 244 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_naming()

static void test_talloc_naming ( void  )
static

Definition at line 151 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_parent()

static void test_talloc_parent ( void  )
static

Definition at line 180 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_pool()

static void test_talloc_pool ( void  )
static

Definition at line 400 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_realloc_zero()

static void test_talloc_realloc_zero ( void  )
static

Definition at line 1153 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_reference()

static void test_talloc_reference ( void  )
static

Definition at line 268 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_reparent()

static void test_talloc_reparent ( void  )
static

Definition at line 576 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_set_destructor()

static void test_talloc_set_destructor ( void  )
static

Definition at line 309 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_steal()

static void test_talloc_steal ( void  )
static

Definition at line 210 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_strdup()

static void test_talloc_strdup ( void  )
static

Definition at line 342 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_strndup_append()

static void test_talloc_strndup_append ( void  )
static

Definition at line 650 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_total_size()

static void test_talloc_total_size ( void  )
static

Definition at line 464 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_typed_asprintf()

static void test_talloc_typed_asprintf ( void  )
static

Definition at line 772 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_typed_memdup()

static void test_talloc_typed_memdup ( void  )
static

Definition at line 928 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_typed_strdup()

static void test_talloc_typed_strdup ( void  )
static

Definition at line 718 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_typed_strndup()

static void test_talloc_typed_strndup ( void  )
static

Definition at line 748 of file talloc_tests.c.

+ Here is the call graph for this function:

◆ test_talloc_zero()

static void test_talloc_zero ( void  )
static

Definition at line 62 of file talloc_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ child_free_idx

int child_free_idx
static

Definition at line 1099 of file talloc_tests.c.

◆ child_free_order

int child_free_order[4]
static

Definition at line 1098 of file talloc_tests.c.

◆ fr_destructor_called

int fr_destructor_called
static

Definition at line 1020 of file talloc_tests.c.

◆ fr_destructor_uctx

void const* fr_destructor_uctx
static

Definition at line 1021 of file talloc_tests.c.

◆ native_destructor_count

int native_destructor_count
static

Definition at line 299 of file talloc_tests.c.

◆ TEST_LIST

TEST_LIST

Definition at line 1236 of file talloc_tests.c.