summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-01-20 17:54:04 +0100
committerDavid Sterba <dsterba@suse.com>2017-01-25 09:48:00 +0100
commit0e95fff4fff4688c82c150833a021a9399da094c (patch)
tree7a9a77aca249def3c72542efc4b8701e80528b40
parent7610cbf729003952f76fddf67439fc0499139ff6 (diff)
btrfs-progs: tests: 005-qgroup-show
Signed-off-by: David Sterba <dsterba@suse.com>
-rwxr-xr-xtests/cli-tests/005-qgroup-show/test.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/cli-tests/005-qgroup-show/test.sh b/tests/cli-tests/005-qgroup-show/test.sh
new file mode 100755
index 00000000..28c22c61
--- /dev/null
+++ b/tests/cli-tests/005-qgroup-show/test.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# qgroup show behaviour when quotas are not enabled
+
+source $TOP/tests/common
+
+check_prereq mkfs.btrfs
+check_prereq btrfs
+
+setup_root_helper
+prepare_test_dev 2g
+
+run_check $TOP/mkfs.btrfs -f $IMAGE
+run_check_mount_test_dev
+run_mayfail $TOP/btrfs qgroup show "$TEST_MNT"
+run_mayfail $SUDO_HELPER $TOP/btrfs qgroup show "$TEST_MNT"
+run_check $SUDO_HELPER $TOP/btrfs quota enable "$TEST_MNT"
+run_mayfail $TOP/btrfs qgroup show "$TEST_MNT"
+run_check $SUDO_HELPER $TOP/btrfs qgroup show "$TEST_MNT"
+run_check $SUDO_HELPER $TOP/btrfs quota disable "$TEST_MNT"
+run_check_umount_test_dev