Commit Briefs

Sergey Bronnikov

readme: add references and similar projects (errinj_errno)

Closes #47


Sergey Bronnikov

Add error injection with operation slowdown

Closes #29


Sergey Bronnikov

Add error injection that returns random errno

Add a new fault injection that returns random errno supported by performed FUSE operation. The source of errnos for a POSIX function is a POSIX standard. Source of errnos for other functions are Linux, macOS, FreeBSD and OpenBSD manual pages. Closes #6


Sergey Bronnikov

Use code instead of name for FUSE operation

In upcoming patch with implementation of fault injection that returns random errno we need to resolve FUSE operation and to make it easier error_inject() switched from using FUSE operation name to using operation code. Part of: #6


Sergey Bronnikov

Add error injection that kills caller

Closes #28


Sergey Bronnikov

Fix problem with GPG key


Sergey Bronnikov

Check probability first


Sergey Bronnikov

Skip error injections for config file



Sergey Bronnikov

Fix return code on regex matching


Branches

















Tags

0.2.0

0.1.0

Tree

.cirrus.ymlcommits | blame
.gitignorecommits | blame
CMakeLists.txtcommits | blame
LICENSEcommits | blame
README.mdcommits | blame
cmake/
conf.ccommits | blame
conf.hcommits | blame
tests/
unreliablefs.1commits | blame
unreliablefs.ccommits | blame
unreliablefs.conf.5commits | blame
unreliablefs.hcommits | blame
unreliablefs_errinj.ccommits | blame
unreliablefs_errinj.hcommits | blame
unreliablefs_errno_freebsd.hcommits | blame
unreliablefs_errno_linux.hcommits | blame
unreliablefs_errno_macosx.hcommits | blame
unreliablefs_errno_openbsd.hcommits | blame
unreliablefs_ops.ccommits | blame
unreliablefs_ops.hcommits | blame

README.md

## UnreliableFS

[![Build Status](https://api.cirrus-ci.com/github/ligurio/unreliablefs.svg)](https://cirrus-ci.com/github/ligurio/unreliablefs)

is a FUSE-based fault injection filesystem that allows to change
fault-injections in runtime using simple configuration file.

Supported fault injections are:

- `errinj_errno` - return error value and set random errno.
- `errinj_kill_caller` - send SIGKILL to a process that invoked file operation.
- `errinj_noop` - replace file operation with no operation
  (similar to [libeatmydata](https://github.com/stewartsmith/libeatmydata),
  but applicable to any file operation).
- `errinj_slowdown` - slowdown invoked file operation.

### Building

Prerequisites:

- CentOS: `dnf install -y gcc -y cmake fuse fuse-devel`
- Ubuntu: `apt-get install -y gcc cmake fuse libfuse-dev`
- FreeBSD: `pkg install gcc cmake fusefs-libs pkgconf`
- OpenBSD: `pkg_add cmake`
- macOS: `brew install --cask osxfuse`

```sh
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
$ cmake --build build --parallel
```

### Packages

[![Packaging status](https://repology.org/badge/vertical-allrepos/fusefs:unreliablefs.svg)](https://repology.org/project/fusefs:unreliablefs/versions)

### Using

```sh
$ mkdir /tmp/fs
$ unreliablefs /tmp/fs -basedir=/tmp -seed=1618680646
$ cat << EOF > /tmp/fs/unreliablefs.conf
[errinj_noop]
op_regexp = .*
path_regexp = .*
probability = 30
EOF
$ ls -la
$ umount /tmp/fs
```

### Documentation

See documentation in [unreliablefs.1](https://ligurio.github.io/unreliablefs/unreliablefs.1.html) and
[unreliablefs.conf.5](https://ligurio.github.io/unreliablefs/unreliablefs.conf.5.html).

### License

MIT License, Copyright (c) 2020-2023, Sergey Bronnikov
BSD-3-Clause, Copyright (C) 2009-2020, Ben Hoyt