- Description:
- A FUSE-based fault injection filesystem.
- Last Change:
- Clone URL:
Commit Briefs
ci: remove macOS 10.15 (fix_macos)
brew install --cask osxfuse ==> Tapping homebrew/cask Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'... Error: Invalid cask: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/emacs.rb Cask ''/Applications/Emacs.app/Contents/Resources/man/man1/ebrowse.1.gz' is not a valid man page name' definition is invalid. Error: Cannot tap homebrew/cask: invalid syntax in tap! 1. https://cirrus-ci.com/task/6024547758505984
FUSE_USE_VERSION
- FreeBSD https://cirrus-ci.com/task/6438581582430208?command=build - MacOS https://cirrus-ci.com/task/5031206698876928?command=build
Disable FUSE wrapper for ioctl() on OpenBSD
OpenBSD has it's own FUSE implementation that doesn't support ioctl() operation. In file included from /home/sergeyb/source/unreliablefs/unreliablefs.c:10: /home/sergeyb/source/unreliablefs/unreliablefs_ops.h:55:47: warning: declaration of 'struct fuse_bufvec' will not be visible outside of this function [-Wvisibility] int unreliable_write_buf(const char *, struct fuse_bufvec *buf, off_t off, ^ /home/sergeyb/source/unreliablefs/unreliablefs_ops.h:57:46: warning: declaration of 'struct fuse_bufvec' will not be visible outside of this function [-Wvisibility] int unreliable_read_buf(const char *, struct fuse_bufvec **bufp, ^ /home/sergeyb/source/unreliablefs/unreliablefs.c:51:6: error: field designator 'ioctl' does not refer to any field in type 'struct fuse_operations' .ioctl = unreliable_ioctl, ^ 2 warnings and 1 error generated. Disable ioctl() enabled in commit c96dbe41b2f53fb5a9ac1e0fc798775c9cd01596 ("Use check_function_exists() to detect functions support").
Add fio to regression testing
fio - is a Flexible I/O tester [1]. Fio was originally written to test a specific workload, either for performance reasons or to find/reproduce a bug. It allows to test many possible workloads, see examples [2] and recommended configurations to test latency and throughput, see [3] and [4]. This patch adds wrapper to pytest around fio and a signle simple configuration. Other configurations are coming. 1. https://fio.readthedocs.io/en/latest/fio_doc.html 2. https://github.com/axboe/fio/tree/master/examples 3. https://docs.oracle.com/en-us/iaas/Content/Block/References/samplefiocommandslinux.htm 4. https://arstechnica.com/gadgets/2020/02/how-fast-are-your-disks-find-out-the-open-source-way-with-fio/ Closes #51
Add fsx to regression testing
fsx is a 'file system exerciser'. From [1]: "Way back in 1991, Avadis Tevanian wrote a 'file system exerciser'. It stayed hidden away within NeXT for many years, until it resurfaced again in 1998, after being rewritten by Conrad Minshall from Apple. It still remained somewhat unknown, until 2001, a decade after its original inception, Jordan Hubbard announced on freebsd-hackers a new tool called 'fsx', which found major NFS bugs in FreeBSD." Patch adds wrapper to pytest around fsx to add it to the regression suite. 1. https://web.archive.org/web/20190115144026/http://codemonkey.org.uk/projects/fsx/ Closes #33
Use HAVE_XATTR in unreliablefs.c
In commit c96dbe41b2f53fb5a9ac1e0fc798775c9cd01596 ("Use check_function_exists() to detect functions support") macroses for operating systems has been replaced by macroses for features. One place was missed and patch fixes it.
Use check_function_exists() to detect functions support
Some operating systems missed fallocate(), utimens(), flock(), setxattr(), getxattr(), listxattr() and removexattr() support. Right now source code related to these functions enabled explicitly on OSes where it is supported. It's better to detect functions in runtime using CMake's check_function_exists() and enable appropriate define if function exists in a system. Seems ioctl() supported everywhere, so condition compilation has been removed.
Branches
Tags
Tree
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