xfs
[Top] [All Lists]

[Tests] xfs test[298]: Btrfs Quota testing

To: linux-btrfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Subject: [Tests] xfs test[298]: Btrfs Quota testing
From: Hemanth Kumar <hemanthkumar51@xxxxxxxxx>
Date: Fri, 22 Feb 2013 11:24:04 +0530
Cc: skjmca51@xxxxxxxxx, ganeshkumar14@xxxxxxxxx, kirantpatil@xxxxxxxxx, praneethu.u@xxxxxxxxx, chethan.casey@xxxxxxxxx, sensille@xxxxxxx, bo.li.liu@xxxxxxxxxx, hugo@xxxxxxxxxxxxx, sandeen@xxxxxxxxxx, Hemanth Kumar <hemanthkumar51@xxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=xwOe4FDgMGBOWt2LgKt2IKqfxGykiAItwQObpyq1Zcc=; b=KupWI6OlI0KUyVIKYGD9dBdI5g9b1mHFIEkfabhBrM+52kBYEehEqT9Rnrvq8cQE5V z+wM3siLRa8PaY35S63eGIgi3t8YMpIbTPPDvx2kb5xBvqZoGlwfJhwQDj8o+wVp4sRf KGfEOpvTQTjtasIqe0O62vIq5gKr6HR0UFsa48gZQrS6Qc9G4C4p0VHPf9Z39eAZ5vjS hkcpnVzqTHrGfvRwiEwAcq9Ywdkn/wnNUUUeJAE3h/X3x1WoC9lNVD2fq6WZuyL6zUxB iARianJBc1tbGc2qllhQ9NleRScdNug6ZzTjoaFTcDTXTQmnjOxF+l42EKmkC0MIRG4a 25fA==
Signed-off-by: Hemanth Kumar <hemanthkumar51@xxxxxxxxx>
---
 298     | 37 +++++++++++++++++++++++++++++++++++++
 298.out | 12 ++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 298
 create mode 100644 298.out

diff --git a/298 b/298
new file mode 100644
index 0000000..d699fb7
--- /dev/null
+++ b/298
@@ -0,0 +1,37 @@
+
+#! /bin/bash
+# FS QA Test No. 298
+#
+# Test btrfs's quotas
+#
+#------------------------------------------------------------------
+#
+# creator
+#owner=hemanthkumar51@xxxxxxxxx
+
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1        # failure is the default!
+
+_cleanup()
+{
+    rm -rf $tmp.*
+}
+
+trap "_cleanup ; exit \$status" 0 1 2 3 15
+
+#Enabeling btrfs qutas
+btrfs quota enable $TEST_DIR
+echo "quota enabled on $TEST_DEV"
+btrfs subvolume create $TEST_DIR/vol1
+echo "vol1 created"
+btrfs qgroup show $TEST_DIR
+btrfs qgroup limit 2m $TEST_DIR/vol1
+echo "qgroup limited to 2mb"
+dd if=$TEST_DEV of=$TEST_DIR/vol1/file1 bs=3M count=1
+echo "tried to write 3m worth data"
+exit
diff --git a/298.out b/298.out
new file mode 100644
index 0000000..344ab7f
--- /dev/null
+++ b/298.out
@@ -0,0 +1,12 @@
+QA output created by 298
+quota enabled on /dev/sdb5
+Create subvolume '/test/vol1'
+vol1 created
+0/257 4096 4096
+qgroup limited to 2mb
+dd: writing â/test/vol1/file1â: Disk quota exceeded
+1+0 records in
+0+0 records out
+2031616 bytes (2.0 MB) copied, 0.135429 s, 15.0 MB/s
+tried to write 3m worth data
+
-- 
1.8.1.2

<Prev in Thread] Current Thread [Next in Thread>