ktest: add a test case for rmdir empty snapshot
PATCH 1/1 ktest: add a test case for rmdir empty snapshot
Signed-off-by Guoyu Ou <[email protected]>
--- tests/bcachefs/subvol.ktest | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
tests/bcachefs/subvol.ktest +18 -0
@@ -718,4 +718,22 @@ test_subvol_mv() bcachefs fsck ${ktest_scratch_dev[0]} } +test_subvol_rmdir_empty_snapshot() +{ + run_quiet "" bcachefs format -f ${ktest_scratch_dev[0]} + mount -t bcachefs ${ktest_scratch_dev[0]} /mnt + + cd /mnt + bcachefs subvolume create ./sub + cd sub + bcachefs subvolume create ./sub2 + bcachefs subvolume snapshot . ./snap + rmdir ./snap + + cd / + umount /mnt + + bcachefs fsck ${ktest_scratch_dev[0]} +} + main "$@"
Signature · 1 line
2.43.0
Kent Overstreet
AppliedQuoted 1 line · Guoyu Ou
Signed-off-by Guoyu Ou <[email protected]>
Thanks! Applied.
Quoted 34 lines
--- tests/bcachefs/subvol.ktest | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)tests/bcachefs/subvol.ktest +18
-0@@ -718,4 +718,22 @@ test_subvol_mv() bcachefs fsck ${ktest_scratch_dev[0]} } +test_subvol_rmdir_empty_snapshot() +{ + run_quiet "" bcachefs format -f ${ktest_scratch_dev[0]} + mount -t bcachefs ${ktest_scratch_dev[0]} /mnt + + cd /mnt + bcachefs subvolume create ./sub + cd sub + bcachefs subvolume create ./sub2 + bcachefs subvolume snapshot . ./snap + rmdir ./snap + + cd / + umount /mnt + + bcachefs fsck ${ktest_scratch_dev[0]} +} + main "$@"Signature · 1 line
2.43.0