From patchwork Mon Jan 17 17:01:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MORITA Kazutaka X-Patchwork-Id: 79199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ADBA9B70CC for ; Tue, 18 Jan 2011 04:31:16 +1100 (EST) Received: from localhost ([127.0.0.1]:44330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PesaC-0003FH-GP for incoming@patchwork.ozlabs.org; Mon, 17 Jan 2011 12:09:32 -0500 Received: from [140.186.70.92] (port=49047 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PesVm-0001Mf-1l for qemu-devel@nongnu.org; Mon, 17 Jan 2011 12:05:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PesVh-0002Qc-5C for qemu-devel@nongnu.org; Mon, 17 Jan 2011 12:04:55 -0500 Received: from sh.osrg.net ([192.16.179.4]:47680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PesVg-0002Mc-H6 for qemu-devel@nongnu.org; Mon, 17 Jan 2011 12:04:53 -0500 Received: from fs.osrg.net (postfix@fs.osrg.net [10.0.0.12]) by sh.osrg.net (8.14.3/8.14.3/OSRG-NET) with ESMTP id p0HH4QYk006177; Tue, 18 Jan 2011 02:04:26 +0900 Received: from localhost (dfs1401.osrg.net [10.68.14.1]) by fs.osrg.net (Postfix) with ESMTP id 4AFF43E004C; Tue, 18 Jan 2011 02:04:26 +0900 (JST) From: MORITA Kazutaka To: hch@lst.de Date: Tue, 18 Jan 2011 02:01:17 +0900 Message-Id: <1295283677-31712-1-git-send-email-morita.kazutaka@lab.ntt.co.jp> X-Mailer: git-send-email 1.5.6.5 X-Dispatcher: imput version 20070423(IM149) Lines: 530 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (sh.osrg.net [192.16.179.4]); Tue, 18 Jan 2011 02:04:28 +0900 (JST) X-Virus-Scanned: clamav-milter 0.96.5 at sh X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: ceph-devel@vger.kernel.org, sheepdog@lists.wpkg.org, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH][qemu-iotests] add support for rbd and sheepdog protocols X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch introduces tests for protocols other than file, and initially supports rbd and sheepdog. Signed-off-by: MORITA Kazutaka --- 001 | 1 + 002 | 1 + 003 | 1 + 004 | 1 + 005 | 6 ++++++ 006 | 1 + 007 | 1 + 008 | 1 + 009 | 1 + 010 | 1 + 011 | 1 + 012 | 1 + 013 | 1 + 014 | 1 + 015 | 1 + 016 | 1 + 017 | 1 + 018 | 1 + 019 | 1 + 020 | 1 + 021 | 1 + 022 | 1 + 023 | 1 + 024 | 1 + 025 | 1 + 026 | 1 + 027 | 1 + 028 | 1 + check | 2 ++ common | 13 +++++++++++++ common.rc | 45 +++++++++++++++++++++++++++++++++++++++++---- 31 files changed, 89 insertions(+), 4 deletions(-) diff --git a/001 b/001 index fe66a8e..bd88dde 100755 --- a/001 +++ b/001 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux diff --git a/002 b/002 index 57af974..bebed84 100755 --- a/002 +++ b/002 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux diff --git a/003 b/003 index 656da99..ee25fb8 100755 --- a/003 +++ b/003 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux size=128M diff --git a/004 b/004 index 3de7ed8..c76451c 100755 --- a/004 +++ b/004 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux diff --git a/005 b/005 index 480276b..74537db 100755 --- a/005 +++ b/005 @@ -42,6 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux # vpc is limited to 127GB, so we can't test it here @@ -49,6 +50,11 @@ if [ "$IMGFMT" = "vpc" ]; then _notrun "image format $IMGFMT does not support large image sizes" fi +# sheepdog image is limited to 4TB, so we can't test it here +if [ "$IMGPROTO" = "sheepdog" ]; then + _notrun "image protocol $IMGPROTO does not support large image sizes" +fi + echo echo "creating large image" _make_test_img 5000G diff --git a/006 b/006 index 98ef4ea..0c0cf5d 100755 --- a/006 +++ b/006 @@ -40,6 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt vpc +_supported_proto generic _supported_os Linux diff --git a/007 b/007 index 2de1aa4..0139264 100755 --- a/007 +++ b/007 @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # currently only qcow2 allows for consistency checks using qemu-img _supported_fmt qcow2 +_supported_proto generic _supported_os Linux echo diff --git a/008 b/008 index b697deb..2c53bac 100755 --- a/008 +++ b/008 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux diff --git a/009 b/009 index 1499b77..f7262b5 100755 --- a/009 +++ b/009 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux diff --git a/010 b/010 index 440e9f6..e3205aa 100755 --- a/010 +++ b/010 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux diff --git a/011 b/011 index 87b4082..59df1ae 100755 --- a/011 +++ b/011 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux diff --git a/012 b/012 index 32a2647..4052956 100755 --- a/012 +++ b/012 @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto file _supported_os Linux diff --git a/013 b/013 index 0671bf6..ce40d5c 100755 --- a/013 +++ b/013 @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" diff --git a/014 b/014 index f38af43..a6d0aea 100755 --- a/014 +++ b/014 @@ -43,6 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" diff --git a/015 b/015 index f3b0acc..bdafd26 100755 --- a/015 +++ b/015 @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # actually any format that supports snapshots _supported_fmt qcow2 +_supported_proto generic _supported_os Linux echo diff --git a/016 b/016 index e09ab86..16f151f 100755 --- a/016 +++ b/016 @@ -40,6 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # currently raw is the only protocol we support _supported_fmt raw +_supported_proto generic _supported_os Linux diff --git a/017 b/017 index 29dd53f..66951eb 100755 --- a/017 +++ b/017 @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" diff --git a/018 b/018 index f155b49..bd2db78 100755 --- a/018 +++ b/018 @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" diff --git a/019 b/019 index a2d67c3..8872b30 100755 --- a/019 +++ b/019 @@ -45,6 +45,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" diff --git a/020 b/020 index b065a53..2fb0ff8 100755 --- a/020 +++ b/020 @@ -43,6 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" diff --git a/021 b/021 index eb61230..6da79eb 100755 --- a/021 +++ b/021 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic +_supported_proto generic _supported_os Linux diff --git a/022 b/022 index 635ad14..d35b816 100755 --- a/022 +++ b/022 @@ -43,6 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format that supports snapshots _supported_fmt qcow2 +_supported_proto generic _supported_os Linux TEST_OFFSETS="10485760 4294967296" diff --git a/023 b/023 index 55c5be7..4f31b56 100755 --- a/023 +++ b/023 @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" diff --git a/024 b/024 index ff6e984..3d6f103 100755 --- a/024 +++ b/024 @@ -43,6 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Currently only qcow2 and qed support rebasing _supported_fmt qcow2 qed +_supported_proto generic _supported_os Linux CLUSTER_SIZE=65536 diff --git a/025 b/025 index 6af1e46..fba44a4 100755 --- a/025 +++ b/025 @@ -40,6 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.pattern _supported_fmt raw qcow2 +_supported_proto file sheepdog _supported_os Linux echo "=== Creating image" diff --git a/026 b/026 index ad109f7..33e7da6 100755 --- a/026 +++ b/026 @@ -42,6 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Currently only qcow2 supports rebasing _supported_fmt qcow2 +_supported_proto generic _supported_os Linux diff --git a/027 b/027 index 543c48f..7d90481 100755 --- a/027 +++ b/027 @@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt vmdk qcow qcow2 qed +_supported_proto generic _supported_os Linux diff --git a/028 b/028 index cb8b255..8321c93 100755 --- a/028 +++ b/028 @@ -45,6 +45,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files except vmdk and qcow which do not support # smaller backing files. _supported_fmt qcow2 qed +_supported_proto generic _supported_os Linux # Choose a size that is not necessarily a cluster size multiple for image diff --git a/check b/check index e0eaa7a..84ef3e5 100755 --- a/check +++ b/check @@ -152,12 +152,14 @@ rm -f check.full [ -f check.time ] || touch check.time FULL_IMGFMT_DETAILS=`_full_imgfmt_details` +FULL_IMGPROTO_DETAILS=`_full_imgproto_details` FULL_HOST_DETAILS=`_full_platform_details` #FULL_MKFS_OPTIONS=`_scratch_mkfs_options` #FULL_MOUNT_OPTIONS=`_scratch_mount_options` cat < /dev/null + ;; + + sheepdog) + collie vdi delete $TEST_DIR/t.$IMGFMT + ;; + + esac } _check_test_img() @@ -207,6 +226,19 @@ _supported_fmt() _notrun "not suitable for this image format: $IMGFMT" } +# tests whether $IMGPROTO is one of the supported image protocols for a test +# +_supported_proto() +{ + for f; do + if [ "$f" = "$IMGPROTO" -o "$f" = "generic" ]; then + return + fi + done + + _notrun "not suitable for this image protocol: $IMGPROTO" +} + # tests whether the host OS is one of the supported OSes for a test # _supported_os() @@ -234,6 +266,11 @@ _full_imgfmt_details() echo "$IMGFMT" } +_full_imgproto_details() +{ + echo "$IMGPROTO" +} + _full_platform_details() { os=`uname -s`