OpenVPN
|
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include "errlevel.h"
#include "error.h"
Go to the source code of this file.
Functions | |
void | mock_set_debug_level (int level) |
Mock debug level defaults to 0, which gives clean(-ish) test reports. More... | |
int | get_debug_level (void) |
void | x_msg_va (const unsigned int flags, const char *format, va_list arglist) |
void | x_msg (const unsigned int flags, const char *format,...) |
void | assert_failed (const char *filename, int line, const char *condition) |
void | out_of_memory (void) |
bool | dont_mute (unsigned int flags) |
Check muting filter. More... | |
Variables | |
unsigned int | x_debug_level = 0 |
bool | fatal_error_triggered = false |
void assert_failed | ( | const char * | filename, |
int | line, | ||
const char * | condition | ||
) |
Definition at line 81 of file mock_msg.c.
bool dont_mute | ( | unsigned int | flags | ) |
Check muting filter.
Definition at line 109 of file mock_msg.c.
References DECODE_MUTE_LEVEL, M_INFO, M_NOMUTE, msg, mute_category, mute_count, and mute_cutoff.
Referenced by msg_test().
int get_debug_level | ( | void | ) |
Definition at line 51 of file mock_msg.c.
References x_debug_level.
void mock_set_debug_level | ( | int | level | ) |
Mock debug level defaults to 0, which gives clean(-ish) test reports.
Call this function from your test driver to increase debug output when you need debug output.
Definition at line 45 of file mock_msg.c.
References x_debug_level.
void out_of_memory | ( | void | ) |
Definition at line 102 of file mock_msg.c.
References PACKAGE_NAME.
void x_msg | ( | const unsigned int | flags, |
const char * | format, | ||
... | |||
) |
Definition at line 70 of file mock_msg.c.
References x_msg_va().
void x_msg_va | ( | const unsigned int | flags, |
const char * | format, | ||
va_list | arglist | ||
) |
Definition at line 57 of file mock_msg.c.
References check_debug_level(), DEBUG_LEVEL_USEC_TIME, dont_mute(), ERR_BUF_SIZE, fatal_error_triggered, forked, gc_free(), gc_init(), gc_malloc(), M_ERRNO, M_FATAL, M_INFO, M_MSG_VIRT_OUT, M_NOIPREFIX, M_NOLF, M_NONFATAL, M_NOPREFIX, M_OPTERR, M_USAGE_SMALL, M_WARN, machine_readable_output, msg, msg_fp(), msg_get_prefix(), msg_get_virtual_output(), msg_test(), openvpn_errno_maybe_crt(), openvpn_exit(), OPENVPN_EXIT_STATUS_ERROR, openvpn_strerror(), std_redir, suppress_timestamps, SWAP, time_string(), usage_small(), use_syslog, virtual_output_print(), and x_msg_line_num.
Referenced by x_msg().
bool fatal_error_triggered = false |
Definition at line 42 of file mock_msg.c.
Referenced by x_msg_va().
unsigned int x_debug_level = 0 |
Definition at line 41 of file mock_msg.c.
Referenced by check_debug_level(), get_debug_level(), and mock_set_debug_level().