This repository contains a test that shows how zbox is (currently) unable to handle an unexpected machine failure while writing to disk.
In order to run this test you need the following packages installed on your system:
coreutils
(tested with v8.30)curl
(tested with 7.63.0)expect
(tested with 5.45.4)qemu
(tested with 3.1.0)- make sure you have the following binaries installed by the qemu package:
qemu-img
qemu-system-x86_64
- make sure you have the following binaries installed by the qemu package:
When all dependencies are satisfied run the VM prepare step:
$ ./scripts/setup-vm.exp
This will setup an alpine linux vm inside the ./qemu
folder.
$ ./scripts/run-test.exp
This will run a statically linked binary of the rust project that is included in this repository. The run
action of the rust program will be interrupted after the 7th chunk is written, which will lead to an interrupted write action in the zbox repository.
$ ./scripts/run-check.exp
This will try to validate the repository contents against the expected data. Currently, this always fails.
This will not fail, a full machine failure is needed to reproduce this error
- Create a reference file for the test:
$ dd if=/dev/urandom of=data bs=1M count=16
- Run the test
$ cargo run -- --file data run
- Check the repository
$ cargo run -- --file data check