2013-04-13 00:33:45 +00:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
|
|
# Run qemu-iotests against rbd. These are block-level tests that go
|
|
|
|
# through qemu but do not involve running a full vm. Note that these
|
|
|
|
# require the admin ceph user, as there's no way to pass the ceph user
|
|
|
|
# to qemu-iotests currently.
|
|
|
|
|
2016-12-07 14:59:39 +00:00
|
|
|
testlist='001 002 003 004 005 008 009 010 011 021 025 032 033 055'
|
2014-04-23 20:20:14 +00:00
|
|
|
|
2015-10-15 16:44:06 +00:00
|
|
|
git clone https://github.com/qemu/qemu.git
|
|
|
|
cd qemu
|
2016-12-05 18:46:02 +00:00
|
|
|
if lsb_release -da | grep -iq xenial; then
|
|
|
|
# Xenial requires a recent test harness
|
|
|
|
git checkout v2.3.0
|
|
|
|
else
|
|
|
|
# use v2.2.0-rc3 (last released version that handles all the tests
|
|
|
|
git checkout 2528043f1f299e0e88cb026f1ca7c40bbb4e1f80
|
|
|
|
|
|
|
|
fi
|
2013-04-13 00:33:45 +00:00
|
|
|
|
2015-10-15 16:44:06 +00:00
|
|
|
cd tests/qemu-iotests
|
2013-04-13 00:33:45 +00:00
|
|
|
mkdir bin
|
|
|
|
# qemu-iotests expects a binary called just 'qemu' to be available
|
2015-02-02 15:43:35 +00:00
|
|
|
if [ -x '/usr/bin/qemu-system-x86_64' ]
|
|
|
|
then
|
|
|
|
QEMU='/usr/bin/qemu-system-x86_64'
|
|
|
|
else
|
|
|
|
QEMU='/usr/libexec/qemu-kvm'
|
2016-01-18 20:57:43 +00:00
|
|
|
|
|
|
|
# disable test 055 since qemu-kvm (RHEL/CentOS) doesn't support the
|
|
|
|
# required QMP commands
|
|
|
|
testlist=$(echo ${testlist} | sed "s/ 055//g")
|
2015-02-02 15:43:35 +00:00
|
|
|
fi
|
|
|
|
ln -s $QEMU bin/qemu
|
2013-04-13 00:33:45 +00:00
|
|
|
|
2014-08-18 03:54:28 +00:00
|
|
|
# this is normally generated by configure, but has nothing but a python
|
|
|
|
# binary definition, which we don't care about. for some reason it is
|
|
|
|
# not present on trusty.
|
|
|
|
touch common.env
|
|
|
|
|
2013-04-13 00:33:45 +00:00
|
|
|
# TEST_DIR is the pool for rbd
|
2014-04-23 20:20:14 +00:00
|
|
|
TEST_DIR=rbd PATH="$PATH:$PWD/bin" ./check -rbd $testlist
|
|
|
|
|
2015-10-15 16:44:06 +00:00
|
|
|
cd ../../..
|
|
|
|
rm -rf qemu
|