ligurio/unreliablefs

A FUSE-based fault injection filesystem.

C

185

112 commits

updated Apr 2, 2024

See the code

README

UnreliableFS

Build Status

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, 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
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
$ cmake --build build --parallel

Packages

Packaging status

Using

$ 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 and unreliablefs.conf.5.

License

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

chaos-engineering
chaos-testing
fault-injection
fault-injection-filesystem
filesystem
fuse
fuse-filesystem
quality-assurance
software-testing
software-testing-tools

Contributors

ligurio

111 commits

xaizek

1 commits

ligurio/unreliablefs

A FUSE-based fault injection filesystem.

C

185

112 commits

updated Apr 2, 2024

See the code

README

UnreliableFS

Build Status

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, 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
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
$ cmake --build build --parallel

Packages

Packaging status

Using

$ 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 and unreliablefs.conf.5.

License

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

chaos-engineering
chaos-testing
fault-injection
fault-injection-filesystem
filesystem
fuse
fuse-filesystem
quality-assurance
software-testing
software-testing-tools

Contributors

ligurio

111 commits

xaizek

1 commits

Languages

C

70.2%

Python

18.1%

CMake

6.7%

Roff

4.4%