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 <th...@redhat.com>
> ---
>  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.

(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.)

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to