diff options
author | Guoyu Ou <benogy@gmail.com> | 2024-02-13 15:13:25 +0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-16 22:17:13 -0500 |
commit | 91c9a633292e771822cb161aac0e5075bc8f1cee (patch) | |
tree | 019376c5fb26908094024f6b2d2de6221f223fd1 | |
parent | d717304cdfad607db695357529230b88d02dd245 (diff) |
ktest: add a test case for rmdir empty snapshot
Signed-off-by: Guoyu Ou <benogy@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rwxr-xr-x | tests/bcachefs/subvol.ktest | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/bcachefs/subvol.ktest b/tests/bcachefs/subvol.ktest index 1915d84..4a50da2 100755 --- a/tests/bcachefs/subvol.ktest +++ b/tests/bcachefs/subvol.ktest @@ -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 "$@" |