diff options
-rwxr-xr-x | tests/fs/bcachefs/single_device.ktest | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/fs/bcachefs/single_device.ktest b/tests/fs/bcachefs/single_device.ktest index 6f4fb4a..975d621 100755 --- a/tests/fs/bcachefs/single_device.ktest +++ b/tests/fs/bcachefs/single_device.ktest @@ -1914,4 +1914,20 @@ test_recover_super() check_counters ${ktest_scratch_dev[0]} } +# Check that we can mount multiple single device filesystems with the same UUID +test_single_device() +{ + run_quiet "" bcachefs format --single_device -f --no_initialize ${ktest_scratch_dev[0]} + + dd if=${ktest_scratch_dev[0]} of=${ktest_scratch_dev[1]} bs=1M count=8 oflag=direct + + mkdir -p /mnt2 + + mount ${ktest_scratch_dev[0]} /mnt + mount ${ktest_scratch_dev[1]} /mnt2 + + umount /mnt2 + umount /mnt +} + main "$@" |