The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
Loading...
Searching...
No Matches
Macros | Functions
acutest_common_init.h File Reference

Common initialisation for acutest binaries. More...

#include "acutest.h"
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/strerror.h>
#include <freeradius-devel/util/talloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <talloc.h>
+ Include dependency graph for acutest_common_init.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TEST_INIT   acutest_common_init()
 

Functions

static void acutest_common_init (void)
 

Detailed Description

Common initialisation for acutest binaries.

The test wrapper's timeout arrives as SIGALRM, and stdout is block buffered when redirected to a log file, so a test binary without signal handlers dies with no backtrace and loses every progress line since the last buffer flush. The TEST_INIT hook below installs the fatal signal handlers and switches stdout to line buffering before each test runs.

To use: include this header first, in place of acutest.h.

TEST_INIT must be defined before acutest.h is included, but the function body reads acutest_argv0_, which acutest.h defines, so the declaration sits above the include and the definition below.

Definition in file acutest_common_init.h.

Macro Definition Documentation

◆ TEST_INIT

#define TEST_INIT   acutest_common_init()

Definition at line 38 of file acutest_common_init.h.

Function Documentation

◆ acutest_common_init()

static void acutest_common_init ( void  )
static

Definition at line 50 of file acutest_common_init.h.

+ Here is the call graph for this function: