https://github.com/ligurio/unreliablefs
A FUSE-based fault injection filesystem.
https://github.com/ligurio/unreliablefs
chaos-engineering chaos-testing fault-injection fault-injection-filesystem filesystem fuse fuse-filesystem quality-assurance software-testing software-testing-tools
Last synced: 7 months ago
JSON representation
A FUSE-based fault injection filesystem.
- Host: GitHub
- URL: https://github.com/ligurio/unreliablefs
- Owner: ligurio
- License: mit
- Created: 2020-11-03T13:09:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-02T12:19:12.000Z (over 1 year ago)
- Last Synced: 2024-12-07T08:02:16.349Z (7 months ago)
- Topics: chaos-engineering, chaos-testing, fault-injection, fault-injection-filesystem, filesystem, fuse, fuse-filesystem, quality-assurance, software-testing, software-testing-tools
- Language: C
- Homepage: https://ligurio.github.io/unreliablefs/unreliablefs.1.html
- Size: 101 KB
- Stars: 177
- Watchers: 7
- Forks: 9
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-repos - ligurio/unreliablefs - A FUSE-based fault injection filesystem. (C)
README
## UnreliableFS
[](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
[](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