Package rekall :: Module testlib
[frames] | no frames]

Module testlib

source code

Base classes for all tests.

Rekall Memory Forensics tests have these goals:

- Detect regression bugs with previous versions of Rekall Memory Forensics.

- Once differences are detected, make it easier to understand why the
  differences arise.

- Sometime the differences are acceptable, in that case, there need to be a way
  to declare the allowed differences in the tests.

- What makes this more complicated is that the same test needs to be applied to
  multiple images in a consistent way without necessarily making any code
  changes to the test itself.


Solution Outline
----------------

A baseline of running each test is written by the test suite itself. The user
can write a baseline for all the modules by issuing the make_suite binary. The
baseline for each module will generate a number of files in a given directory.

When test is run, the baseline files are loaded and copared with present output
in a specific way.

Classes
  Tail
Tail a file and write to stdout.
  RekallBaseUnitTestCase
Base class for all rekall unit tests.
  SimpleTestCase
A simple test which just compares with the baseline output.
  InlineTest
  SortedComparison
All test cases are sorted now.
  UnSortedComparison
  DisabledTest
Disable a test.
  HashChecker
A test comparing the hashes of all the files dumped in the tempdir.
  disable_if
Disable a test if the condition is true.
Variables
  __package__ = 'rekall'