From: Cleber Rosa <crosa@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Jing Liu <liujbjl@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip
Date: Tue, 25 Jul 2017 12:47:11 -0400 [thread overview]
Message-ID: <b0b6a212-2be4-dfb2-3c99-615555efbb60@redhat.com> (raw)
In-Reply-To: <20170725162405.GT26394@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2925 bytes --]
On 07/25/2017 12:24 PM, Daniel P. Berrange wrote:
>>
>> OK, let's abstract a bit more. Let's take this part of your statement:
>>
>> "if qemu-io in this environment cannot do aio=native"
>>
>> Let's call that a feature check. Depending on how the *feature check*
>> is written, a negative result may hide a test failure, because it would
>> now be skipped.
>>
>> Suppose that a feature check for "SDL display" is such that you run
>> "qemu -display sdl". A *feature failure* here (SDL init is broken), or
>> an environment issue (DISPLAY=), will cause a SDL test skip.
>
> You could have a way to statically define what features any given run
> of the test suite should enable, then report failure if they were not
> detected.
>
You hit a key point here: statically define(d). As a said before,
feature statements are a safer place upon which to base tests. Ad hoc
checks, as suggested by Stefan, are definitely not.
> This is a similar situation to that seen with configure scripts. If invoked
> with no --enable-xxx flags, it will probe for features & enable them if
> found. This means you can accidentally build without expected features if
> you have a missing -devel package, or a header/library is broken in some
> way. This is why configure prints a summary of which features it actually
> found. It is also why when building binary packages like RPMs, it is common
> to explicitly give --enable-xxx flags for all features you expect to see.
> Automatic enablement is none the less still useful for people in general.
>
> So if we applied this kind of approach for testing, then any automated
> test systems at least, ought to provide a fixed list of features they
> expect to be present for tests. So if any features accidentally broke
> the tests would error.
>
> Regards,
> Daniel
>
Right. The key question here seems to be the distance of the "fixed
list of features" from the test itself. For instance, think of this
workflow/approach:
1) ./scripts/configured-features-to-feature-list.sh > ~/feature_list
2) tweak feature_list
3) ./rpm -e SDL-devel
4) ./configure --enable-sdl
5) ./make
6) ./scripts/run-test-suite.sh --only-features=~/feature_list
This would only run tests that are expected to PASS within the given
feature list. The test runner (run-test-suite.sh) would select only
tests that match the features given. No SKIPs would be expected as the
outcome of *any test*.
The other approach is to let the feature match to the test, and SKIPs
would then be OK. The downside to this is that a "--enable-xxx" with
missing "-devel" package, as you exemplified, would not show up as ERRORs.
Makes sense?
Regards!
--
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]
[ 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 ]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-07-25 16:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 3:47 [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip Cleber Rosa
2017-07-21 3:47 ` [Qemu-devel] [PATCH 1/3] scripts: introduce buildconf.py Cleber Rosa
2017-07-21 14:00 ` Eric Blake
2017-07-21 14:07 ` Cleber Rosa
2017-07-21 3:47 ` [Qemu-devel] [PATCH 2/3] qemu-iotests: add _require_feature() function Cleber Rosa
2017-07-21 3:47 ` [Qemu-devel] [PATCH 3/3] qemu-iotests: require CONFIG_LINUX_AIO for test 087 Cleber Rosa
2017-07-24 6:44 ` Jing Liu
2017-07-25 15:45 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-07-25 15:48 ` Daniel P. Berrange
2017-07-26 8:55 ` Jing Liu
2017-07-26 9:49 ` Daniel P. Berrange
2017-07-21 4:39 ` [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip no-reply
2017-07-21 12:33 ` Stefan Hajnoczi
2017-07-21 13:49 ` Cleber Rosa
2017-08-08 8:01 ` Markus Armbruster
2017-07-21 14:01 ` Daniel P. Berrange
2017-07-21 14:21 ` Cleber Rosa
2017-07-25 15:49 ` Stefan Hajnoczi
2017-07-25 16:16 ` Cleber Rosa
2017-07-25 16:24 ` Daniel P. Berrange
2017-07-25 16:47 ` Cleber Rosa [this message]
2017-07-26 17:58 ` Stefan Hajnoczi
2017-07-26 18:24 ` Cleber Rosa
2017-07-27 13:41 ` Stefan Hajnoczi
2017-08-08 8:06 ` Markus Armbruster
2017-08-08 12:44 ` Stefan Hajnoczi
2017-08-08 14:52 ` Markus Armbruster
2017-08-09 10:30 ` Stefan Hajnoczi
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=b0b6a212-2be4-dfb2-3c99-615555efbb60@redhat.com \
--to=crosa@redhat.com \
--cc=berrange@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=liujbjl@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).