Commit Briefs

Sergey Bronnikov

Add fault injection with wrong storage capacity (ligurio/gh-62)

Closes #62


Sergey Bronnikov

Add fault injection with 1-byte reads (ligurio/gh-86)

Closes #86


Sergey Bronnikov

Move error injection structures to compilation unit

Required for #86


Sergey Bronnikov

Remove definition on ERRNO_NOOP


GitHub

README: Add HookFS


Sergey Bronnikov

Fix disabled tests on FreeBSD

Commit "Use generic os name in tests" (1f70f876d670704bd0422fe1e27d12177b189527) accidentally disabled testing on FreeBSD by adding double negation to condition that enables code for operating systems with fusermount(1). However fusermount(1) is not available on FreeBSD and therefore all regression tests were skipped. Fixes #93


Sergey Bronnikov

Fix manual pages paths

Closes #90


Sergey Bronnikov

Fix building on FreeBSD (tags/0.2.0)

Cirrus CI on FreeBSD failed because "No packages available to install matching 'py37-pip' have been found in the repositories"i [1]. Package 'py37-pip' has been replaced with 'py38-pip', see [2]. 1. https://cirrus-ci.com/task/6375178809638912 2. https://www.freshports.org/devel/py-pip/


Sergey Bronnikov

Introduce Lua rockspec

Closes #88


Sergey Bronnikov

cmake: add install target

Part of #88


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-scm-1.rockspeccommits | blame
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