Eio_fs_chaos.FaultSourceThe faults a wrapper injects.
The type for error codes. `Enoent raises Eio.Fs.error.Not_found on an open, a stat or a change, `Eacces and `Eperm raise Eio.Fs.error.Permission_denied there, and the others an Eio.Io error that names them.
type t = | Fail of codeThe operation fails with that error. ENOSPC applies to a write, and to an open or a change that makes a file or an entry only.
| Evict of codeA sync fails with that error, and the page cache drops the pages it could not write: under Power.wrap, a later read of them sees the bytes the disk holds. Elsewhere it is Fail.
| Short of intA read or a write moves at most max 1 n bytes.
| Torn of intA write stores its first n bytes, then fails with ENOSPC.
| Swap_symlink of stringAn open or a stat runs, then its path becomes a symbolic link to the target: the window a time-of-check to time-of-use attack uses. Code that must not follow a link an attacker plants tests it this way:
let swapped base =
let swap (op : Op.t) =
if op.kind = `Stat && op.path = "/out" then
Some (Fault.Swap_symlink "secret/key")
else None
in
Eio_fs_chaos.wrap swap base*)The type for faults. One that does not apply to an operation does nothing.