diff options
author | koverstreet <kent.overstreet@gmail.com> | 2025-06-07 10:09:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-07 10:09:55 -0500 |
commit | 7b46766c15244c88dba2d670164eea0b09019d41 (patch) | |
tree | bd9bbef3ef77065ba896352d2eb105e6bc3a7ccf | |
parent | 47d1f2a04d79bc4cbc843f81e71eb7d821fb8384 (diff) | |
parent | 34b48f39c5b5b391829d9051a85459f9ae5ae651 (diff) |
Merge pull request #40 from christoph-heinrich/add_unmount_mount_test
bcachefs: test_device_add_remount
-rwxr-xr-x | tests/fs/bcachefs/replication.ktest | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/fs/bcachefs/replication.ktest b/tests/fs/bcachefs/replication.ktest index 7088b83..14c74f7 100755 --- a/tests/fs/bcachefs/replication.ktest +++ b/tests/fs/bcachefs/replication.ktest @@ -319,6 +319,29 @@ test_device_add_label_compound() bcachefs_test_end_checks ${ktest_scratch_dev[0]} } +test_device_add_remount() +{ + # Test adding a device, unmounting and mounting again + # Caught bugs: + # - wrong fs uuid for second device and it's not found by mount, despite correct superlock. + + run_quiet "" bcachefs format -f --discard ${ktest_scratch_dev[0]} + + mount -t bcachefs ${ktest_scratch_dev[0]} /mnt + bcachefs device add -f /mnt ${ktest_scratch_dev[1]} + umount /mnt + + bcachefs show-super ${ktest_scratch_dev[0]} + bcachefs show-super ${ktest_scratch_dev[1]} + lsblk -f + + mount -t bcachefs ${ktest_scratch_dev[0]} /mnt + umount /mnt + + bcachefs fsck -ny ${ktest_scratch_dev[0]} ${ktest_scratch_dev[1]} + bcachefs_test_end_checks ${ktest_scratch_dev[0]} +} + test_device_set_state() { set_watchdog 120 |