Samhain comes with a suite of verification/regression tests located in the test/ subdirectory of the source tree.
The driver script is test/test.sh. Calling it without arguments will provide some usage information. The script should be called as:
test.sh [options] <test_number>
The driver script is test/test.sh. Calling it without arguments will provide some usage information. The script should be called as:
bash$ test/test.sh [options] <test_number>
The possible tests are:
1 -- Compile with many different options 2 -- Hash function 3 -- Standalone init/check 4 -- Microstealth init/check 5 -- External program call 6 -- Controlling the daemon (signal handling) 7 -- GnuPG signed files / prelude log 8 -- Suidcheck 10 -- Test client/server init/check 11 -- Test full client/server init/check 12 -- Test full client/server w/gpg 13 -- Test full client/server w/mysql (only with --really-all) 14 -- Test full client/server w/postgres (only with --really-all) all -- All tests (non-applicable tests will be skipped)
The recognized options are as follows:
-q|--quiet No output; success/failure is reported vi exit status only.
-v|--verbose Report additional information.
-s|--stoponerr Stop when a test fails.
--no-cleanup Don't clean up generated test data (useful to investigate the reason for a failure).
--srcdir=... Tell the script the location of the source tree (not necessary if run from the top source directory).
--color=always|never|auto Whether to use colour for output. Default is 'auto' (no colour if stdout is not a terminal).
--really-all This option enable additional test that are not run usually (see below).
![]() | The --really-all option |
---|---|
This option enables the following additional tests:
|
![]() | CAVEAT |
---|---|
The database tests (13/14) with --really-all will modify (i.e. log to) the database. These are the only tests that are not confined to the directory where the test is run. |