diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-11-06 15:39:57 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-11-06 15:39:57 -0500 |
commit | acd4903822c704e6729426a2c23dd4eba47ded32 (patch) | |
tree | cb7cf21255728bb5c70cc1f28eae4275eaeba77e | |
parent | 6ffd29a257b8a4f54ea2868f296a6f69239a2423 (diff) |
bcachefs: online fsck testdev
-rwxr-xr-x | tests/fs/bcachefs/single_device.ktest | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/fs/bcachefs/single_device.ktest b/tests/fs/bcachefs/single_device.ktest index c804d35..83f3b92 100755 --- a/tests/fs/bcachefs/single_device.ktest +++ b/tests/fs/bcachefs/single_device.ktest @@ -1809,6 +1809,29 @@ test_kernel_fsck() check_counters ${ktest_scratch_dev[0]} } +test_online_fsck() +{ + set_watchdog 10 + bcachefs format -f ${ktest_scratch_dev[0]} + + mount -t bcachefs ${ktest_scratch_dev[0]} /mnt + + ( + echo foo + rm /mnt/foo + sleep 10 + echo bar + ) > /mnt/foo & + + bcachefs fsck -yk ${ktest_scratch_dev[0]} + wait + umount /mnt + + bcachefs fsck -nyvk ${ktest_scratch_dev[0]} + + check_counters ${ktest_scratch_dev[0]} +} + d_test_nocow_fragmented() { set_watchdog 60 |