Commit Briefs

Sergey Bronnikov

Update README (update-readme)

Closes #47


Sergey Bronnikov

Add configuration support

Patch adds command line options and configuration file support to unreliablefs. unreliablefs can be managed in runtime using simple .INI configuration file. unreliablefs config uses configuration language which provides a structure similar to what's found in Microsoft Windows INI files or used by configparser Python module [2]. To make it possible third-party C library [1] has been imported. There is only one supported error injection - "errinj_noop" that replaces file operation with no operation. More error injections are coming. 1. https://github.com/benhoyt/inih 2. https://docs.python.org/3/library/configparser.html Closes #3 Closes #18 Closes #1 Closes #7 Closes #12 Closes #60


Sergey Bronnikov

cmake: add ASAN and UBSAN sanitizers

Disabled by default


Sergey Bronnikov

Remove unused headers


Sergey Bronnikov

cmake: set CFLAGS using target_compile_options()

Using target_compile_options() is one of the best practice for CMake so replaced CMAKE_C_FLAGS and CMAKE_CXX_FLAGS by target_compile_options(). Also patch adds options -Wall and -Wextra.


Sergey Bronnikov

gitignore: ignore .swp files


Sergey Bronnikov

ci: remove macOS 10.15

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


Sergey Bronnikov

FUSE_USE_VERSION

- FreeBSD https://cirrus-ci.com/task/6438581582430208?command=build - MacOS https://cirrus-ci.com/task/5031206698876928?command=build


Sergey Bronnikov

style: alignment


Sergey Bronnikov

readme: add cirrus ci status badge


Sergey Bronnikov

Add license


Sergey Bronnikov

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").


Sergey Bronnikov

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


Sergey Bronnikov

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


Sergey Bronnikov

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.


Sergey Bronnikov

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.


Sergey Bronnikov

tests: fix path to mnt_name in test for removexattr()

Follows up #50


Sergey Bronnikov

Add FUSE wrapper for utimensat()

Fixes #52 Closes #16


Sergey Bronnikov

Fix return code in FUSE wrapper for ioctl()

"Usually, on success zero is returned. A few ioctl() requests use the return value as an output parameter and return a nonnegative value on success. On error, -1 is returned, and errno is set appropriately."


Sergey Bronnikov

Fix return code in FUSE wrapper for listxattr()

"On success, a nonnegative number is returned indicating the size of the extended attribute name list. On failure, -1 is returned and errno is set appropriately."




Sergey Bronnikov

tests: add regression tests for xattr operations

There is a bug with setxattr, see #50. It is marked as expected fail in tests.


Sergey Bronnikov

tests: add test_readdir_big()


Sergey Bronnikov

Fix bug with FUSE wrapper for readdir(2)

Fixes: #43 Fixes: #45