linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 2/2] btrfs: misc-tests: remove the subvol-delete-qgroup test case
Date: Fri, 26 Apr 2024 07:35:53 +0930	[thread overview]
Message-ID: <afcd81cd552fec9c8357342b7895c87b2c02eb24.1714082499.git.wqu@suse.com> (raw)
In-Reply-To: <cover.1714082499.git.wqu@suse.com>

The test case relies on `--delete-qgroup` option, but the feature is not
properly designed from the very beginning, and would not work for most
cases.

The test case does not take the complexity of subvolume dropping into
consideration and only tested the simplest cases.

Since the `--delete-qgroup` option patch is reverted, we also need to
revert this one too.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 .../061-subvol-delete-qgroup/test.sh          | 47 -------------------
 1 file changed, 47 deletions(-)
 delete mode 100755 tests/misc-tests/061-subvol-delete-qgroup/test.sh

diff --git a/tests/misc-tests/061-subvol-delete-qgroup/test.sh b/tests/misc-tests/061-subvol-delete-qgroup/test.sh
deleted file mode 100755
index c2637ac33cdc..000000000000
--- a/tests/misc-tests/061-subvol-delete-qgroup/test.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-# Create subvolumes with enabled qutoas and check that subvolume deleteion will
-# also delete the 0-level qgruop.
-
-source "$TEST_TOP/common" || exit
-
-setup_root_helper
-prepare_test_dev
-
-run_check_mkfs_test_dev
-run_check_mount_test_dev
-run_check $SUDO_HELPER dd if=/dev/zero of="$TEST_MNT"/file bs=1M count=1
-
-# Without quotas
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume create "$TEST_MNT/subv1"
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume create "$TEST_MNT/subv2"
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume delete --delete-qgroup "$TEST_MNT/subv1"
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume delete --no-delete-qgroup "$TEST_MNT/subv2"
-run_check $SUDO_HELPER "$TOP/btrfs" filesystem sync "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume sync "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" subvol list "$TEST_MNT"
-
-# With quotas enabled
-run_check $SUDO_HELPER "$TOP/btrfs" quota enable "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume create "$TEST_MNT/subv1"
-rootid1=$(run_check_stdout "$TOP/btrfs" inspect-internal rootid "$TEST_MNT/subv1")
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume create "$TEST_MNT/subv2"
-rootid2=$(run_check_stdout "$TOP/btrfs" inspect-internal rootid "$TEST_MNT/subv2")
-run_check $SUDO_HELPER "$TOP/btrfs" qgroup create 1/1 "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" qgroup assign "0/$rootid1" 1/1 "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" qgroup assign "0/$rootid2" 1/1 "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" quota rescan --wait "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" subvol list "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" qgroup show "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume delete --delete-qgroup "$TEST_MNT/subv1"
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume delete --no-delete-qgroup "$TEST_MNT/subv2"
-run_check $SUDO_HELPER "$TOP/btrfs" filesystem sync "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" subvolume sync "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" subvol list "$TEST_MNT"
-run_check $SUDO_HELPER "$TOP/btrfs" qgroup show "$TEST_MNT"
-if run_check_stdout $SUDO_HELPER "$TOP/btrfs" qgroup show "$TEST_MNT" | grep -q "0/$rootid1"; then
-	_fail "qgroup 0/$rootid1 not deleted"
-fi
-if ! run_check_stdout $SUDO_HELPER "$TOP/btrfs" qgroup show "$TEST_MNT" | grep -q "0/$rootid2"; then
-	_fail "qgroup 0/$rootid2 deleted"
-fi
-run_check_umount_test_dev
-- 
2.44.0


  parent reply	other threads:[~2024-04-25 22:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25 22:05 [PATCH 0/2] btrfs-progs: revert `btrfs subvolume delete --delete-qgroup` option Qu Wenruo
2024-04-25 22:05 ` [PATCH 1/2] Revert "btrfs-progs: subvol delete: add options to delete the qgroup" Qu Wenruo
2024-04-25 22:05 ` Qu Wenruo [this message]
2024-04-29 17:48   ` [PATCH 2/2] btrfs: misc-tests: remove the subvol-delete-qgroup test case David Sterba
2024-04-29 17:29 ` [PATCH 0/2] btrfs-progs: revert `btrfs subvolume delete --delete-qgroup` option David Sterba

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=afcd81cd552fec9c8357342b7895c87b2c02eb24.1714082499.git.wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@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 NNTP newsgroup(s).