Wraps a 512-byte-sector block device and injects hardware-like faults into it. More...
| Header: | #include <FaultInjectingDevice> |
| Inherits: | BlockDeviceTemplate |
The filesystem fuzzer puts a FaultInjectingDevice between the exFAT code and the real block device, to test how the filesystem survives bad hardware. FuzzerEngine creates one over its device and keeps it in a std::unique_ptr. The wrapper does not own the underlying device, which must stay valid for its lifetime.
Two kinds of fault are available:
faultedOperationCount() counts every fault that took effect, and clearAllFaults() disarms the pending ones.
See also SemanticCorruptifier.