All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ktest: add a test case for rmdir empty snapshot
@ 2024-02-13  7:13 Guoyu Ou
  2024-02-14  2:25 ` Kent Overstreet
  0 siblings, 1 reply; 2+ messages in thread
From: Guoyu Ou @ 2024-02-13  7:13 UTC (permalink / raw
  To: kent.overstreet; +Cc: linux-bcachefs, Guoyu Ou

Signed-off-by: Guoyu Ou <benogy@gmail.com>
---
 tests/bcachefs/subvol.ktest | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

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 "$@"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ktest: add a test case for rmdir empty snapshot
  2024-02-13  7:13 [PATCH] ktest: add a test case for rmdir empty snapshot Guoyu Ou
@ 2024-02-14  2:25 ` Kent Overstreet
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Overstreet @ 2024-02-14  2:25 UTC (permalink / raw
  To: Guoyu Ou; +Cc: linux-bcachefs

On Tue, Feb 13, 2024 at 03:13:25PM +0800, Guoyu Ou wrote:
> Signed-off-by: Guoyu Ou <benogy@gmail.com>

Thanks! Applied.

> ---
>  tests/bcachefs/subvol.ktest | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> 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 "$@"
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-14  2:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13  7:13 [PATCH] ktest: add a test case for rmdir empty snapshot Guoyu Ou
2024-02-14  2:25 ` Kent Overstreet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.