From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQycr-0007HV-OQ for qemu-devel@nongnu.org; Sat, 13 Apr 2013 07:28:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQycq-00024F-Mv for qemu-devel@nongnu.org; Sat, 13 Apr 2013 07:28:09 -0400 Received: from mail-pb0-f47.google.com ([209.85.160.47]:51982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQycq-00024B-Fk for qemu-devel@nongnu.org; Sat, 13 Apr 2013 07:28:08 -0400 Received: by mail-pb0-f47.google.com with SMTP id rq13so1806833pbb.6 for ; Sat, 13 Apr 2013 04:28:07 -0700 (PDT) From: Liu Yuan Date: Sat, 13 Apr 2013 19:27:21 +0800 Message-Id: <1365852442-28941-4-git-send-email-namei.unix@gmail.com> In-Reply-To: <1365852442-28941-1-git-send-email-namei.unix@gmail.com> References: <1365852442-28941-1-git-send-email-namei.unix@gmail.com> Subject: [Qemu-devel] [PATCH 3/3] tests: add 058 to test discard/trim List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sheepdog@lists.wpkg.org, qemu-devel@nongnu.org From: Liu Yuan Signed-off-by: Liu Yuan --- tests/058 | 30 ++++++++++++++++++++++++++++++ tests/058.out | 44 ++++++++++++++++++++++++++++++++++++++++++++ tests/group | 1 + 3 files changed, 75 insertions(+) create mode 100755 tests/058 create mode 100644 tests/058.out diff --git a/tests/058 b/tests/058 new file mode 100755 index 0000000..0eddc81 --- /dev/null +++ b/tests/058 @@ -0,0 +1,30 @@ +#!/bin/bash + +# Test discard/trim +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +_cleanup + +for i in 0 1 2; do + _start_sheep $i "-s 1000" +done +_wait_for_sheep 3 +$COLLIE cluster format +sleep 1 +$COLLIE vdi create test 100M -P +$COLLIE node info +qemu-io -c "discard 0 100m" sheepdog:test | _filter_qemu_io +$COLLIE vdi check test +for i in `seq 0 24`; do + $COLLIE vdi object test -i $i; +done +$COLLIE node info diff --git a/tests/058.out b/tests/058.out new file mode 100644 index 0000000..140e5c0 --- /dev/null +++ b/tests/058.out @@ -0,0 +1,44 @@ +QA output created by 058 +using backend farm store +Id Size Used Use% + 0 1000 MB 104 MB 10% + 1 1000 MB 104 MB 10% + 2 1000 MB 104 MB 10% +Total 2.9 GB 312 MB 10% + +Total virtual image size 100 MB +discard 104857600/104857600 bytes at offset 0 +100 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +finish check&repair test +The inode object 0x7c2b25 idx 0 is not allocated +The inode object 0x7c2b25 idx 1 is not allocated +The inode object 0x7c2b25 idx 2 is not allocated +The inode object 0x7c2b25 idx 3 is not allocated +The inode object 0x7c2b25 idx 4 is not allocated +The inode object 0x7c2b25 idx 5 is not allocated +The inode object 0x7c2b25 idx 6 is not allocated +The inode object 0x7c2b25 idx 7 is not allocated +The inode object 0x7c2b25 idx 8 is not allocated +The inode object 0x7c2b25 idx 9 is not allocated +The inode object 0x7c2b25 idx 10 is not allocated +The inode object 0x7c2b25 idx 11 is not allocated +The inode object 0x7c2b25 idx 12 is not allocated +The inode object 0x7c2b25 idx 13 is not allocated +The inode object 0x7c2b25 idx 14 is not allocated +The inode object 0x7c2b25 idx 15 is not allocated +The inode object 0x7c2b25 idx 16 is not allocated +The inode object 0x7c2b25 idx 17 is not allocated +The inode object 0x7c2b25 idx 18 is not allocated +The inode object 0x7c2b25 idx 19 is not allocated +The inode object 0x7c2b25 idx 20 is not allocated +The inode object 0x7c2b25 idx 21 is not allocated +The inode object 0x7c2b25 idx 22 is not allocated +The inode object 0x7c2b25 idx 23 is not allocated +The inode object 0x7c2b25 idx 24 is not allocated +Id Size Used Use% + 0 1000 MB 4.0 MB 0% + 1 1000 MB 4.0 MB 0% + 2 1000 MB 4.0 MB 0% +Total 2.9 GB 12 MB 0% + +Total virtual image size 100 MB diff --git a/tests/group b/tests/group index c82ddf9..09f2857 100644 --- a/tests/group +++ b/tests/group @@ -71,3 +71,4 @@ 055 auto cluster md 056 auto quick cluster md 057 auto quick cluster md +058 auto quick cluster md -- 1.7.9.5