[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2] iotests: Check for enabled drivers before te

From: Thomas Huth
Subject: Re: [Qemu-block] [PATCH v2] iotests: Check for enabled drivers before testing them
Date: Tue, 3 Sep 2019 15:19:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 03/09/2019 14.55, Max Reitz wrote:
> On 23.08.19 15:35, Thomas Huth wrote:
>> It is possible to enable only a subset of the block drivers with the
>> "--block-drv-rw-whitelist" option of the "configure" script. All other
>> drivers are marked as unusable (or only included as read-only with the
>> "--block-drv-ro-whitelist" option). If an iotest is now using such a
>> disabled block driver, it is failing - which is bad, since at least the
>> tests in the "auto" group should be able to deal with this situation.
>> Thus let's introduce a "_require_drivers" function that can be used by
>> the shell tests to check for the availability of certain drivers first,
>> and marks the test as "not run" if one of the drivers is missing.
>> This patch mainly targets the test in the "auto" group which should
>> never fail in such a case, but also improves some of the other tests
>> along the way. Note that we also assume that the "qcow2" and "file"
>> drivers are always available - otherwise it does not make sense to
>> run "make check-block" at all (which only tests with qcow2 by default).
>> Signed-off-by: Thomas Huth <address@hidden>
>> ---
>>  v2:
>>  - Update the check in _require_drivers() according to Max' suggestion
>>  - Remove superfluous check in test 081
>>  - Mark 120 to require "raw"
>>  - Replaced the check in 162 to use the new _require_drivers() function
>>  - Mark 186 to require "null-co"
>>  tests/qemu-iotests/071       |  1 +
>>  tests/qemu-iotests/081       |  4 +---
>>  tests/qemu-iotests/099       |  1 +
>>  tests/qemu-iotests/120       |  1 +
>>  tests/qemu-iotests/162       |  4 +---
>>  tests/qemu-iotests/184       |  1 +
>>  tests/qemu-iotests/186       |  1 +
>>  tests/qemu-iotests/common.rc | 14 ++++++++++++++
>>  8 files changed, 21 insertions(+), 6 deletions(-)
> This patch breaks these iotests when $DISPLAY is not set.  It does work
> with “iotests: Add -display none to the qemu options”.
> Hm.  You reviewed that one, so I suppose I’ll just take it into v2 of my
> pull request as well.

Sounds like the righ way to go, thanks!

> (I’m not going to say having added the iotests to make check gives me as
> a maintainer more trouble than I had before, but, you know.)

I expected some initial trouble, since the iotests now get exposed to
much more different systems. But I hope it will pay off in the long run!
(Remember the 4.1 development cycles? The iotests have been completely
broken in the master branch by accident two or three times ... I hope at
least those days will now be gone or at least not happen that often anymore)


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]