From 606e725eb5204e76e602d26ffd113e40af2ee812 Mon Sep 17 00:00:00 2001 From: Warren Usui Date: Wed, 23 Apr 2014 13:20:14 -0700 Subject: [PATCH] Support latest qemu iotest code Modified qemu-iotests workunit script to check for versions that use the latest qemu (currently only Trusty). Limit the tests to those that are applicable to rbd. Fixes: 7882 Signed-off-by: Warren Usui --- qa/workunits/rbd/qemu-iotests.sh | 41 +++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/qa/workunits/rbd/qemu-iotests.sh b/qa/workunits/rbd/qemu-iotests.sh index 284d88aea683f..8af7174fe31c3 100755 --- a/qa/workunits/rbd/qemu-iotests.sh +++ b/qa/workunits/rbd/qemu-iotests.sh @@ -6,17 +6,46 @@ # to qemu-iotests currently. # This will only work with particular qemu versions, like 1.0. Later -# versions of qemu includ qemu-iotests directly in the qemu +# versions of qemu include qemu-iotests directly in the qemu # repository. -git clone git://ceph.com/git/qemu-iotests.git +codevers=`lsb_release -sc` +iotests=qemu-iotests +testlist='001 002 003 004 005 008 009 010 011 021 025' + +# See if we need to use the iotests suites in qemu (newer version). +# Right now, trusty is the only version that uses this. +for chkcode in "trusty" +do + if [ "$chkcode" = "$codevers" ] + then + iotests=qemu/tests/qemu-iotests + fi +done + +if [ "$iotests" = "qemu/tests/qemu-iotests" ] +then + git clone git://repo.or.cz/qemu.git + testlist=$testlist' 032 033 055 077' +else + git clone git://ceph.com/git/qemu-iotests.git +fi + +cd "$iotests" -cd qemu-iotests mkdir bin # qemu-iotests expects a binary called just 'qemu' to be available ln -s `which qemu-system-x86_64` bin/qemu # TEST_DIR is the pool for rbd -TEST_DIR=rbd PATH="$PATH:$PWD/bin" ./check -rbd +TEST_DIR=rbd PATH="$PATH:$PWD/bin" ./check -rbd $testlist + +if [ "$iotests" = "qemu/tests/qemu-iotests" ] +then + cd ../../.. +else + cd .. +fi + +dname=`echo $iotests | cut -d "/" -f1` +rm -rf $dname -cd .. -rm -rf qemu-iotests -- 2.39.5