All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Max Reitz <mreitz@redhat.com>,
	qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>
Cc: John Snow <jsnow@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH v4 5/6] iotests: Skip Python-based tests if QEMU does not support virtio-blk
Date: Mon, 20 Jan 2020 17:05:15 +0100	[thread overview]
Message-ID: <c0b9256b-0954-a683-6b1e-c5c7017535cd@redhat.com> (raw)
In-Reply-To: <a51a4748-fa43-d2b2-ffa2-05769e8f32f3@redhat.com>

On 20/01/2020 15.50, Max Reitz wrote:
> On 02.12.19 11:10, Thomas Huth wrote:
>> We are going to enable some of the python-based tests in the "auto" group,
>> and these tests require virtio-blk to work properly. Running iotests
>> without virtio-blk likely does not make too much sense anyway, so instead
>> of adding a check for the availability of virtio-blk to each and every
>> test (which does not sound very appealing), let's rather add a check for
>> this a central spot in the "check" script instead (so that it is still
>> possible to run "make check" for qemu-system-tricore for example).
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  tests/qemu-iotests/check | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
>> index 90970b0549..bce3035d5a 100755
>> --- a/tests/qemu-iotests/check
>> +++ b/tests/qemu-iotests/check
>> @@ -642,7 +642,11 @@ fi
>>  python_usable=false
>>  if $PYTHON -c 'import sys; sys.exit(0 if sys.version_info >= (3,6) else 1)'
>>  then
>> -    python_usable=true
>> +    # Our python framework also requires virtio-blk
>> +    if "$QEMU_PROG" -M none -device help | grep -q virtio-blk >/dev/null 2>&1
>> +    then
>> +        python_usable=true
>> +    fi
>>  fi
>>  
>>  default_machine=$($QEMU_PROG -machine help | sed -n '/(default)/ s/ .*//p')
>> @@ -830,7 +834,7 @@ do
>>                  run_command="$PYTHON $seq"
>>              else
>>                  run_command="false"
>> -                echo "Unsupported Python version" > $seq.notrun
>> +                echo "Unsupported Python version or missing virtio-blk" > $seq.notrun
> 
> A $python_unusable_because might be helpful (set in to-be-added else
> branches for the ifs that set python_usable to true), but either way:

Sounds like a good idea, I'll give it a try and send a v5.

 Thanks,
  Thomas



  reply	other threads:[~2020-01-20 16:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 10:10 [PATCH v4 0/6] Enable more iotests during "make check-block" Thomas Huth
2019-12-02 10:10 ` [PATCH v4 1/6] iotests: remove 'linux' from default supported platforms Thomas Huth
2019-12-02 10:10 ` [PATCH v4 2/6] iotests: Test 041 only works on certain systems Thomas Huth
2020-01-20 14:31   ` Max Reitz
2019-12-02 10:10 ` [PATCH v4 3/6] iotests: Test 183 does not work on macOS and OpenBSD Thomas Huth
2020-01-20 14:36   ` Max Reitz
2020-01-20 16:01     ` Thomas Huth
2019-12-02 10:10 ` [PATCH v4 4/6] iotests: Check for the availability of the required devices in 267 and 127 Thomas Huth
2020-01-20 14:47   ` Max Reitz
2019-12-02 10:10 ` [PATCH v4 5/6] iotests: Skip Python-based tests if QEMU does not support virtio-blk Thomas Huth
2020-01-20 14:50   ` Max Reitz
2020-01-20 16:05     ` Thomas Huth [this message]
2019-12-02 10:10 ` [PATCH v4 6/6] iotests: Enable more tests in the 'auto' group to improve test coverage Thomas Huth
2020-01-20 14:51   ` Max Reitz
2020-01-20 14:52 ` [PATCH v4 0/6] Enable more iotests during "make check-block" Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0b9256b-0954-a683-6b1e-c5c7017535cd@redhat.com \
    --to=thuth@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.