ztestutility stress tests the DMU, ZAP, SPA components of ZFS from user space.
ztest provides a simple routine to test
the functionality of a component task. These simple routines can then be
used to stress test through parallel execution. Tests are run as child
processes of the main process.
The checksum and compression functions are changed each time a dataset is opened to introduce varying combinations of checksum and compression from block to block among objects.
While tests are running, faults are injected into the pool to verify self-healing ability.
To verify that the on-disk consistency is never lost after a crash, child processes are killed at random with a SIGKILL signal, after which the parent process invokes a new child to run the test again on the same storage pool.
Many of the tests record the transaction group number as part of
their data. When reading old data, tests verify that the transaction group
number is less than the current, open state, transaction group to ensure the
consistency of tests and detect unaccounted changes. It is advised that any
new tests added to
ztest should also perform the
same check with transaction group numbers, if applicable.
ztest process uses an
mmap(2) temporary file to pass
information to child processes which allows shared memory to survive
exec(3) syscall. A copy of the
ztest_shared_hdr_t struct containing information on
the size and number of shared structures in the file is always stored at
offset 0 of the file.
For backwards compatibility testing
can invoke an alternative version of
ztest after a
SIGKILL signal using the
The following options are available:
ztestthe information stored in the mmap(2) temporary file passed from parent process to child must remain compatible with older versions of
|December 10, 2018||OmniOS|