* [Tests] xfs test[298]: Btrfs Quota testing
@ 2013-02-22 5:54 ` Hemanth Kumar
0 siblings, 0 replies; 4+ messages in thread
From: Hemanth Kumar @ 2013-02-22 5:54 UTC (permalink / raw)
To: linux-btrfs, xfs
Cc: skjmca51, ganeshkumar14, kirantpatil, praneethu.u, chethan.casey,
sensille, bo.li.liu, hugo, sandeen, Hemanth Kumar
Signed-off-by: Hemanth Kumar <hemanthkumar51@gmail.com>
---
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@gmail.com
+
+
+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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Tests] xfs test[298]: Btrfs Quota testing
@ 2013-02-22 5:54 ` Hemanth Kumar
0 siblings, 0 replies; 4+ messages in thread
From: Hemanth Kumar @ 2013-02-22 5:54 UTC (permalink / raw)
To: linux-btrfs, xfs
Cc: chethan.casey, sandeen, sensille, ganeshkumar14, praneethu.u,
hugo, bo.li.liu, skjmca51, Hemanth Kumar, kirantpatil
Signed-off-by: Hemanth Kumar <hemanthkumar51@gmail.com>
---
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@gmail.com
+
+
+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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Tests] xfs test[298]: Btrfs Quota testing
2013-02-22 5:54 ` Hemanth Kumar
@ 2013-02-23 1:08 ` Dave Chinner
-1 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2013-02-23 1:08 UTC (permalink / raw)
To: Hemanth Kumar
Cc: linux-btrfs, xfs, chethan.casey, sandeen, sensille,
ganeshkumar14, praneethu.u, hugo, bo.li.liu, skjmca51,
kirantpatil
On Fri, Feb 22, 2013 at 11:24:04AM +0530, Hemanth Kumar wrote:
>
> Signed-off-by: Hemanth Kumar <hemanthkumar51@gmail.com>
Description?
> ---
> 298 | 37 +++++++++++++++++++++++++++++++++++++
> 298.out | 12 ++++++++++++
> 2 files changed, 49 insertions(+)
> create mode 100644 298
> create mode 100644 298.out
You didn't actaully run this in the xfstests, harness, did you? i.e.
$ ./check 298
because it won't run as there is no entry in the group file for this
test....
>
> 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
Newline at top of patch.
> +#
> +# Test btrfs's quotas
> +#
> +#------------------------------------------------------------------
> +#
> +# creator
> +#owner=hemanthkumar51@gmail.com
Copyright statement?
> +
> +
> +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
Where are all the usual _require....() statements?
> +btrfs quota enable $TEST_DIR
> +echo "quota enabled on $TEST_DEV"
That won't work - you're not allowed to output actual device names
into the golden output. We always filter then the to
TEST_DEV/TEST_DIR or SCRATCH_DEV/SCRATCH_MNT
> +btrfs subvolume create $TEST_DIR/vol1
> +echo "vol1 created"
> +btrfs qgroup show $TEST_DIR
That output will change for different filesystem configurations.
needs filtering, or dropping.
> +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
You need to filter the output of dd to remove all variable data.
However, it is preferable to use xfs_io for doing IO. i.e:
$XFS_IO_PROG -f -c "pwrite 0 3m" $TEST_DIR/vol1/file1 | filter_io
> +echo "tried to write 3m worth data"
> +exit
You never set status=0, so the test will always fail.
Also, you don't undo any of the modifications you made to the
TEST_DEV, which means that it will affect all subsequent tests. If
you are doing specific configuration tests, your should be using the
SCRATCH_DEV/SCRATCH_MNT....
> 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
You've got environment specific characters in your output.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Tests] xfs test[298]: Btrfs Quota testing
@ 2013-02-23 1:08 ` Dave Chinner
0 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2013-02-23 1:08 UTC (permalink / raw)
To: Hemanth Kumar
Cc: chethan.casey, sandeen, sensille, ganeshkumar14, praneethu.u,
xfs, hugo, bo.li.liu, skjmca51, kirantpatil, linux-btrfs
On Fri, Feb 22, 2013 at 11:24:04AM +0530, Hemanth Kumar wrote:
>
> Signed-off-by: Hemanth Kumar <hemanthkumar51@gmail.com>
Description?
> ---
> 298 | 37 +++++++++++++++++++++++++++++++++++++
> 298.out | 12 ++++++++++++
> 2 files changed, 49 insertions(+)
> create mode 100644 298
> create mode 100644 298.out
You didn't actaully run this in the xfstests, harness, did you? i.e.
$ ./check 298
because it won't run as there is no entry in the group file for this
test....
>
> 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
Newline at top of patch.
> +#
> +# Test btrfs's quotas
> +#
> +#------------------------------------------------------------------
> +#
> +# creator
> +#owner=hemanthkumar51@gmail.com
Copyright statement?
> +
> +
> +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
Where are all the usual _require....() statements?
> +btrfs quota enable $TEST_DIR
> +echo "quota enabled on $TEST_DEV"
That won't work - you're not allowed to output actual device names
into the golden output. We always filter then the to
TEST_DEV/TEST_DIR or SCRATCH_DEV/SCRATCH_MNT
> +btrfs subvolume create $TEST_DIR/vol1
> +echo "vol1 created"
> +btrfs qgroup show $TEST_DIR
That output will change for different filesystem configurations.
needs filtering, or dropping.
> +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
You need to filter the output of dd to remove all variable data.
However, it is preferable to use xfs_io for doing IO. i.e:
$XFS_IO_PROG -f -c "pwrite 0 3m" $TEST_DIR/vol1/file1 | filter_io
> +echo "tried to write 3m worth data"
> +exit
You never set status=0, so the test will always fail.
Also, you don't undo any of the modifications you made to the
TEST_DEV, which means that it will affect all subsequent tests. If
you are doing specific configuration tests, your should be using the
SCRATCH_DEV/SCRATCH_MNT....
> 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
You've got environment specific characters in your output.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-23 1:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-22 5:54 [Tests] xfs test[298]: Btrfs Quota testing Hemanth Kumar
2013-02-22 5:54 ` Hemanth Kumar
2013-02-23 1:08 ` Dave Chinner
2013-02-23 1:08 ` Dave Chinner
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.