From patchwork Thu Nov 16 17:38:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 838709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yd7nz2mLNz9s4s for ; Fri, 17 Nov 2017 04:41:10 +1100 (AEDT) Received: from localhost ([::1]:42142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFOA0-0000fQ-M4 for incoming@patchwork.ozlabs.org; Thu, 16 Nov 2017 12:41:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFO7Q-0007QP-Qu for qemu-devel@nongnu.org; Thu, 16 Nov 2017 12:38:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFO7P-0002sx-Mw for qemu-devel@nongnu.org; Thu, 16 Nov 2017 12:38:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37516) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFO7M-0002k3-K4; Thu, 16 Nov 2017 12:38:24 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C4E496A7D7; Thu, 16 Nov 2017 17:38:23 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-124.rdu2.redhat.com [10.10.120.124]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7CC7B614D0; Thu, 16 Nov 2017 17:38:20 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Thu, 16 Nov 2017 12:38:01 -0500 Message-Id: <20171116173810.16457-2-crosa@redhat.com> In-Reply-To: <20171116173810.16457-1-crosa@redhat.com> References: <20171116173810.16457-1-crosa@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 16 Nov 2017 17:38:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 01/10] qemu-iotests: make execution of tests agnostic to test type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Cleber Rosa , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- 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