Linux-bcachefs Archive mirror
 help / color / mirror / Atom feed
From: Guoyu Ou <benogy@gmail.com>
To: kent.overstreet@linux.dev
Cc: linux-bcachefs@vger.kernel.org, Guoyu Ou <benogy@gmail.com>
Subject: [PATCH] ktest: add a test case for rmdir empty snapshot
Date: Tue, 13 Feb 2024 15:13:25 +0800	[thread overview]
Message-ID: <20240213071326.12699-1-benogy@gmail.com> (raw)

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


             reply	other threads:[~2024-02-13  7:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13  7:13 Guoyu Ou [this message]
2024-02-14  2:25 ` [PATCH] ktest: add a test case for rmdir empty snapshot Kent Overstreet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240213071326.12699-1-benogy@gmail.com \
    --to=benogy@gmail.com \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).