Commit Briefs

Sergey Bronnikov

readme: fix a typo (master)


Sergey Bronnikov

test: fix pytest warning

Pytest generates a warning, see [1]. The patch fixes it. 1. https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers


Sergey Bronnikov

test: skip test_link on freebsd

The testcase `test_link` passed on FreeBSD 12.2 and becom broken on FreeBSD 14.0. The test failed with an error below: File "/tmp/cirrus-ci-build/unreliablefs/tests/test_unreliablefs.py", line 262, in test_link os.link(name1, name2) OSError: [Errno 5] Input/output error: '/tmp/pytest-of-root/pytest-0/test_link0/mnt/testfile_14' -> '/tmp/pytest-of-root/pytest-0/test_link0/mnt/testfile_15'


Sergey Bronnikov

ci: fix yaml-lint warnings


Sergey Bronnikov

ci: fix freebsd and macos


Sergey Bronnikov

readme: remove a section with similar projects


Sergey Bronnikov

changelog: add initial version


Sergey Bronnikov

readme: add a license


Sergey Bronnikov

unreliablefs: remove trailing spaces


Sergey Bronnikov

unreliablefs: allow arbitrary large duration values

`nanosleep()` fails if `.tv_nsec` is larger than 999999999, so duration must be distributed between `.tv_sec` and `.tv_nsec`. Duration also needs to be stored in `unsigned long long` to be able to store values of more than ~4 seconds.


Branches

















Tags

0.2.0

0.1.0

Tree

.cirrus.ymlcommits | blame
.github/
.gitignorecommits | blame
CHANGELOG.mdcommits | blame
CMakeLists.txtcommits | blame
CMakePresets.jsoncommits | blame
LICENSEcommits | blame
README.mdcommits | blame
cmake/
unreliablefs/
unreliablefs-scm-1.rockspeccommits | 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