From: Cleber Rosa <crosa@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 01/10] qemu-iotests: make execution of tests agnostic to test type
Date: Fri, 17 Nov 2017 08:15:33 -0500 [thread overview]
Message-ID: <efb77a22-77c4-9671-744e-5713ae727959@redhat.com> (raw)
In-Reply-To: <a5c42ab2-f384-4768-6e07-30814789ef5c@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 4867 bytes --]
On 11/17/2017 02:25 AM, Paolo Bonzini wrote:
> On 16/11/2017 18:38, Cleber Rosa wrote:
>> check makes a distinction on how it runs Python based tests. The
>> current approach is inconsistent because:
>>
>> 1) a large number of Python tests are already set as executable files
>> (eg: 030, 040, 041, 044, 045, 055, 056, 057, 065, 093, 118, 147, 149,
>> 155, 165 and 194)
>>
>> 2) a smaller number of Python tests are not set as executable files
>>
>> 3) the true purpose of a shebang line is to make a file executable,
>> while it currently is used (inconsistently) as a test type flag
>>
>> 4) the same logic could in theory be applied to shell based tests,
>> that is, if first line contains a shell shebang, run it with
>> "$SHELL $test_file", but it'd be pointless
>>
>> IMO, there's no value in the distinction that check makes. Dropping
>> this distinction makes the interface simpler: check requires an
>> executable file.
>>
>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>
> This is quirky, but I think it makes sense to obey the configure
> script's chosen Python interpreter. Unlike /bin/sh or /bin/bash, there
> can be many Python interpreters on a system and the user may not want
> the one in /usr/bin/python (think of old RHEL with software collections,
> even though our use of Python is generally portable to older versions).
>
Yes, that's a valid point. Looking at it closer, we usually get "python
-B" from configure, so this changes the behavior (can plague the
developer box with .pyc files).
> I'd keep it for now; in the longer term, we should set up a virtual
> environment so that the shebang line does the right thing.
>
Agreed.
> However, making files executable is certainly a good idea.
>
> Thanks,
>
> Paolo
>
Thanks for the review,
- Cleber.
>
>> ---
>> tests/qemu-iotests/096 | 0
>> tests/qemu-iotests/124 | 0
>> tests/qemu-iotests/129 | 0
>> tests/qemu-iotests/132 | 0
>> tests/qemu-iotests/136 | 0
>> tests/qemu-iotests/139 | 0
>> tests/qemu-iotests/148 | 0
>> tests/qemu-iotests/152 | 0
>> tests/qemu-iotests/163 | 0
>> tests/qemu-iotests/check | 9 ++-------
>> 10 files changed, 2 insertions(+), 7 deletions(-)
>> mode change 100644 => 100755 tests/qemu-iotests/096
>> mode change 100644 => 100755 tests/qemu-iotests/124
>> mode change 100644 => 100755 tests/qemu-iotests/129
>> mode change 100644 => 100755 tests/qemu-iotests/132
>> mode change 100644 => 100755 tests/qemu-iotests/136
>> mode change 100644 => 100755 tests/qemu-iotests/139
>> mode change 100644 => 100755 tests/qemu-iotests/148
>> mode change 100644 => 100755 tests/qemu-iotests/152
>> mode change 100644 => 100755 tests/qemu-iotests/163
>>
>> diff --git a/tests/qemu-iotests/096 b/tests/qemu-iotests/096
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/132 b/tests/qemu-iotests/132
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/136 b/tests/qemu-iotests/136
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/139 b/tests/qemu-iotests/139
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/148 b/tests/qemu-iotests/148
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/152 b/tests/qemu-iotests/152
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163
>> old mode 100644
>> new mode 100755
>> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
>> index e6b6ff7a04..08741328d0 100755
>> --- a/tests/qemu-iotests/check
>> +++ b/tests/qemu-iotests/check
>> @@ -741,20 +741,15 @@ do
>> start=`_wallclock`
>> $timestamp && printf %s " [$(date "+%T")]"
>>
>> - if [ "$(head -n 1 "$source_iotests/$seq")" == "#!/usr/bin/env python" ]; then
>> - run_command="$PYTHON $seq"
>> - else
>> - run_command="./$seq"
>> - fi
>> export OUTPUT_DIR=$PWD
>> if $debug; then
>> (cd "$source_iotests";
>> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(($RANDOM % 255 + 1))} \
>> - $run_command -d 2>&1 | tee $tmp.out)
>> + ./$seq -d 2>&1 | tee $tmp.out)
>> else
>> (cd "$source_iotests";
>> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(($RANDOM % 255 + 1))} \
>> - $run_command >$tmp.out 2>&1)
>> + ./$seq >$tmp.out 2>&1)
>> fi
>> sts=$?
>> $timestamp && _timestamp
>>
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-11-17 13:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 17:38 [Qemu-devel] [PATCH 00/10] I/O tests cleanups Cleber Rosa
2017-11-16 17:38 ` [Qemu-devel] [PATCH 01/10] qemu-iotests: make execution of tests agnostic to test type Cleber Rosa
2017-11-17 7:25 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2017-11-17 13:15 ` Cleber Rosa [this message]
2017-12-01 20:16 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 02/10] qemu-iotests: fix filename containing checks Cleber Rosa
2017-12-01 20:17 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 03/10] qemu-iotests: be strict with expected output Cleber Rosa
2017-12-01 20:25 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 04/10] qemu-iotests: include (source) filters from common.rc Cleber Rosa
2017-12-01 20:28 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 05/10] qemu-iotests: define functions used in _cleanup() before its use Cleber Rosa
2017-12-01 20:43 ` Max Reitz
2017-12-01 21:03 ` Eric Blake
2017-11-16 17:38 ` [Qemu-devel] [PATCH 06/10] qemu-iotests: turn owner variable into a comment Cleber Rosa
2017-11-17 7:19 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2017-11-17 13:18 ` Cleber Rosa
2017-11-17 17:59 ` Eric Blake
2017-11-16 17:38 ` [Qemu-devel] [PATCH 07/10] qemu-iotests: remove the concept of $seq.full (and boiler plate code) Cleber Rosa
2017-12-01 20:52 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 08/10] qemu-iotests: clean up double comment characters Cleber Rosa
2017-12-01 20:53 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 09/10] qemu-iotests: remove unused "here" variable Cleber Rosa
2017-11-17 18:03 ` Eric Blake
2017-12-01 20:55 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 10/10] qemu-iotests: add section on how to write a new I/O test Cleber Rosa
2017-12-01 21:12 ` 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=efb77a22-77c4-9671-744e-5713ae727959@redhat.com \
--to=crosa@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@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 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).