The test harness operates at the level of data accesses. A data access has the following characteristics:
Type of hardware being accessed (driver name)
Instance of the hardware being accessed (driver instance)
Register set being tested
Subset of the register set that is targeted
Direction of the transfer (read or write)
Type of access (PIO or DMA)
The test harness intercepts data accesses and injects appropriate faults into the driver. An errdef, specified by the th_define(1M) command, encodes the following information:
The driver instance and register set being tested (-n name, -i instance, and -r reg_number).
The subset of the register set eligible for corruption. This subset is indicated by providing an offset into the register set and a length from that offset (-l offset [len]).
The kind of access to be intercepted: log, pio, dma, pio_r, pio_w, dma_r, dma_w, intr (-a acc_types).
How many accesses should be faulted (-c count [failcount]).
The kind of corruption that should be applied to a qualifying access (-o operator [operand]).
Replace datum with a fixed value (EQUAL)
Perform a bitwise operation on the datum (AND, OR, XOR)
Ignore the transfer (for host to I/O accesses NO_TRANSFER)
Lose, delay, or inject spurious interrupts (LOSE, DELAY, EXTRA)
Use the -a acc_chk option to simulate framework faults in an errdef.