libsir 2.2.5
Standard Incident Reporter
Loading...
Searching...
No Matches
Tests
Collaboration diagram for Tests:

Namespaces

namespace  sir
 libsir C++ wrapper implementation.
 
namespace  sir::tests
 libsir C++ wrapper tests.
 

Functions

bool sirtest_threadrace (void)
 Properly handle multiple threads competing for locked sections.
 
bool sirtest_exceedmaxsize (void)
 Properly handle messages that exceed internal buffer sizes.
 
bool sirtest_logwritesanity (void)
 Ensure the correct (and complete) message is written to a log file.
 
bool sirtest_failnooutputdest (void)
 Properly handle the lack of any output destinations.
 
bool sirtest_failnulls (void)
 Properly handle null/empty input.
 
bool sirtest_failemptymessage (void)
 Ensure an empty message is properly handled.
 
bool sirtest_filecachesanity (void)
 Properly handle adding and removing log files.
 
bool sirtest_failinvalidfilename (void)
 Properly handle invalid log file name.
 
bool sirtest_failfilebadpermission (void)
 Properly handle log file without appropriate permissions.
 
bool sirtest_faildupefile (void)
 Properly refuse to add a duplicate file.
 
bool sirtest_failremovebadfile (void)
 Properly refuse to remove a file that isn't added.
 
bool sirtest_rollandarchivefile (void)
 Properly roll/archive a file when it hits max size.
 
bool sirtest_failwithoutinit (void)
 Properly handle calls without initialization.
 
bool sirtest_isinitialized (void)
 
bool sirtest_failinittwice (void)
 Properly handle two initialization calls without corresponding cleanup.
 
bool sirtest_failinvalidinitdata (void)
 Properly handle initialization with junk memory.
 
bool sirtest_initcleanupinit (void)
 Properly handle initialization, cleanup, re-initialization.
 
bool sirtest_initmakeinit (void)
 Properly initialize using sir_makeinit.
 
bool sirtest_failaftercleanup (void)
 Properly handle calls after cleanup.
 
bool sirtest_errorsanity (void)
 Properly return valid codes and messages for all possible errors.
 
bool sirtest_textstylesanity (void)
 Properly style stdio output for each level, and handle style overrides.
 
bool sirtest_optionssanity (void)
 Properly reject invalid option bitmasks.
 
bool sirtest_levelssanity (void)
 Properly reject invalid level bitmasks.
 
bool sirtest_mutexsanity (void)
 Ensure that the mutex implementation is functioning properly.
 
bool sirtest_perf (void)
 Performance evaluation.
 
bool sirtest_updatesanity (void)
 Properly update levels/options at runtime.
 
bool sirtest_threadidsanity (void)
 Properly format thread ID/names in output.
 
bool sirtest_syslog (void)
 Properly open, configure, and send messages to syslog().
 
bool sirtest_os_log (void)
 Properly open, configure, and send messages to os_log().
 
bool sirtest_win_eventlog (void)
 Properly open, configure, and send messages to the Windows event log.
 
bool sirtest_filesystem (void)
 Ensure the proper functionality of portable filesystem implementation.
 
bool sirtest_squelchspam (void)
 Ensure that spam messages are squelched, normal messages are not, and proper return values result from calls into libsir.
 
bool sirtest_pluginloader (void)
 Ensure that well-formed, valid plugins are successfully loaded, and that ill-formed/incorrectly behaving plugins are rejected.
 
bool sirtest_stringutils (void)
 Ensure the string utility routines are functioning properly.
 
bool sirtest_getcpucount (void)
 Ensure the processor counting routines are functioning properly.
 
bool sirtest_getversioninfo (void)
 Ensure that version retrieval exports are functioning properly.
 
bool sirtest_threadpool (void)
 Ensure the proper functioning of the thread pool and job queue mech- anisms.
 

Detailed Description

libsir integrity tests

Function Documentation

◆ sirtest_errorsanity()

bool sirtest_errorsanity ( void )

Properly return valid codes and messages for all possible errors.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_exceedmaxsize()

bool sirtest_exceedmaxsize ( void )

Properly handle messages that exceed internal buffer sizes.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failaftercleanup()

bool sirtest_failaftercleanup ( void )

Properly handle calls after cleanup.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_faildupefile()

bool sirtest_faildupefile ( void )

Properly refuse to add a duplicate file.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failemptymessage()

bool sirtest_failemptymessage ( void )

Ensure an empty message is properly handled.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failfilebadpermission()

bool sirtest_failfilebadpermission ( void )

Properly handle log file without appropriate permissions.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failinittwice()

bool sirtest_failinittwice ( void )

Properly handle two initialization calls without corresponding cleanup.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failinvalidfilename()

bool sirtest_failinvalidfilename ( void )

Properly handle invalid log file name.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failinvalidinitdata()

bool sirtest_failinvalidinitdata ( void )

Properly handle initialization with junk memory.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failnooutputdest()

bool sirtest_failnooutputdest ( void )

Properly handle the lack of any output destinations.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failnulls()

bool sirtest_failnulls ( void )

Properly handle null/empty input.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failremovebadfile()

bool sirtest_failremovebadfile ( void )

Properly refuse to remove a file that isn't added.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_failwithoutinit()

bool sirtest_failwithoutinit ( void )

Properly handle calls without initialization.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_filecachesanity()

bool sirtest_filecachesanity ( void )

Properly handle adding and removing log files.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_filesystem()

bool sirtest_filesystem ( void )

Ensure the proper functionality of portable filesystem implementation.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_getcpucount()

bool sirtest_getcpucount ( void )

Ensure the processor counting routines are functioning properly.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_getversioninfo()

bool sirtest_getversioninfo ( void )

Ensure that version retrieval exports are functioning properly.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_initcleanupinit()

bool sirtest_initcleanupinit ( void )

Properly handle initialization, cleanup, re-initialization.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_initmakeinit()

bool sirtest_initmakeinit ( void )

Properly initialize using sir_makeinit.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_isinitialized()

bool sirtest_isinitialized ( void )
Returns
bool true if the test passed, false otherwise.

◆ sirtest_levelssanity()

bool sirtest_levelssanity ( void )

Properly reject invalid level bitmasks.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_logwritesanity()

bool sirtest_logwritesanity ( void )

Ensure the correct (and complete) message is written to a log file.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_mutexsanity()

bool sirtest_mutexsanity ( void )

Ensure that the mutex implementation is functioning properly.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_optionssanity()

bool sirtest_optionssanity ( void )

Properly reject invalid option bitmasks.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_os_log()

bool sirtest_os_log ( void )

Properly open, configure, and send messages to os_log().

Note
Only enabled when compiled on macOS with Clang.
Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_perf()

bool sirtest_perf ( void )

Performance evaluation.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_pluginloader()

bool sirtest_pluginloader ( void )

Ensure that well-formed, valid plugins are successfully loaded, and that ill-formed/incorrectly behaving plugins are rejected.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_rollandarchivefile()

bool sirtest_rollandarchivefile ( void )

Properly roll/archive a file when it hits max size.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_squelchspam()

bool sirtest_squelchspam ( void )

Ensure that spam messages are squelched, normal messages are not, and proper return values result from calls into libsir.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_stringutils()

bool sirtest_stringutils ( void )

Ensure the string utility routines are functioning properly.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_syslog()

bool sirtest_syslog ( void )

Properly open, configure, and send messages to syslog().

Note
Disabled on Windows (and macOS if not compiled with Clang.).
Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_textstylesanity()

bool sirtest_textstylesanity ( void )

Properly style stdio output for each level, and handle style overrides.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_threadidsanity()

bool sirtest_threadidsanity ( void )

Properly format thread ID/names in output.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_threadpool()

bool sirtest_threadpool ( void )

Ensure the proper functioning of the thread pool and job queue mech- anisms.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_threadrace()

bool sirtest_threadrace ( void )

Properly handle multiple threads competing for locked sections.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_updatesanity()

bool sirtest_updatesanity ( void )

Properly update levels/options at runtime.

Returns
bool true if the test succeeded, false otherwise.

◆ sirtest_win_eventlog()

bool sirtest_win_eventlog ( void )

Properly open, configure, and send messages to the Windows event log.

Note
Only enabled on Windows.
Returns
bool true if the test succeeded, false otherwise.