14 Commits

Author SHA1 Message Date
deferdeter
3a180ad9c9 chore: fix function name in comment
Signed-off-by: deferdeter <deferdeter@outlook.com>
2024-04-16 14:25:07 +08:00
Thomas Jungblut
c27eedcf80 Add basic XFS powerfailure tests
This also introduces mkfs options, in case we need to accomodate for
non-default parameters here in the future.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2024-03-13 10:18:52 +01:00
Wei Fu
49eb212fa8 tests/robustness: switch to kill if no panic after 10sec
If file doesn't grow in 10 sec, bbolt won't trigger the following
errors:

* lackOfDiskSpace
* mapError
* resizeFileError
* unmapError

We should switch to kill instead of waiting for panic. In order to
trigger these errors, we should increase value size to 512.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-04 16:17:29 +08:00
Wei Fu
4c3a80b2c0 tests: Update TestRestartFromPowerFailure
Update case with a combination of EXT4 filesystem's commit setting and
unexpected exit event. That EXT4 filesystem's commit is to sync all its data
and metadata every seconds. The kernel can help us sync even if that
process has been killed. With different commit setting, we can simulate
that case that kernel syncs half part of dirty pages before power
failure. And for unexpected exit event, we can kill that process
randomly or panic at failpoint instead of fixed code path.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-02 21:29:46 +08:00
Wei Fu
1b08078707 tests/robustness: add issue72 reproducer
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-13 20:57:40 +08:00
Wei Fu
300e72ab8a tests/robustness: init with powerfailure case
Add `Robustness Test` pipeline for robustness test cases.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-08 09:48:57 +08:00
Wei Fu
b05bec2fe3 tests/*: introduce go-dmflakey
This commit is to add go-binding for go-dmflakey. It's used to simulate
powerfailure with common filesystems.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-07 08:55:33 +08:00
Marcondes Viana
5ddbd0c94e tests: add failpoint to simulate lack of disk space
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-07-31 08:23:01 -03:00
Ishan Tyagi
c0b6749ca4 Fix tests to open a bbolt database with file mode:0600 instead of 0666.
Signed-off-by: Ishan Tyagi <ishantyagi25@gmail.com>
2023-07-29 18:06:26 +05:30
Benjamin Wang
465077b9e2 add failpoint 'resizeFileError' to simulate file.Truncate error
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-05-05 15:47:48 +08:00
Benjamin Wang
b2f3dd5dba Perform unmap when failing to mlock or both meta pages corrupted
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-22 12:02:01 +08:00
Benjamin Wang
d8ac759d4f test: add test cases to similate mlock failure
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-21 16:24:27 +08:00
caojiamingalan
505fc0f7af complete all cleanup operations in db.close() even if there is an error in the middle
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-02-11 07:21:13 +08:00
Benjamin Wang
f10bad3c8f support injecting failpoints and add failpoint github workflow
Implemented first demo "TestFailpoint_MapFail"

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-16 20:32:16 +08:00