qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cleber Rosa <crosa@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
	qemu-block@nongnu.org, Cleber Rosa <crosa@redhat.com>
Subject: [Qemu-devel] [PATCH 01/10] qemu-iotests: make execution of tests agnostic to test type
Date: Thu, 16 Nov 2017 12:38:01 -0500	[thread overview]
Message-ID: <20171116173810.16457-2-crosa@redhat.com> (raw)
In-Reply-To: <20171116173810.16457-1-crosa@redhat.com>

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>
---
 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
-- 
2.13.6

  reply	other threads:[~2017-11-16 17:38 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 ` Cleber Rosa [this message]
2017-11-17  7:25   ` [Qemu-devel] [Qemu-block] [PATCH 01/10] qemu-iotests: make execution of tests agnostic to test type Paolo Bonzini
2017-11-17 13:15     ` Cleber Rosa
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=20171116173810.16457-2-crosa@redhat.com \
    --to=crosa@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 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).