From nobody Sun Feb 8 08:13:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16444030068591020.8593982750236; Wed, 9 Feb 2022 02:36:46 -0800 (PST) Received: from localhost ([::1]:46444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHkL8-0004ev-Dh for importer@patchew.org; Wed, 09 Feb 2022 05:36:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk14-0003Ao-D3 for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:02 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk11-0004tV-4L for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:01 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-556-WKQbYLShPh6mCZRZipxHyw-1; Wed, 09 Feb 2022 05:15:54 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E0DA184B9AA; Wed, 9 Feb 2022 10:15:53 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 05A212A17D; Wed, 9 Feb 2022 10:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644401757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qnC9RjLSHyI5LlB+ffTNU4x+7pIe1i9G46MQwZzTjO4=; b=dTV1QNdVO887SAhxMNrOOwLoo9NqqCsNZ5X8oqP8l+46YMcq//TB/zDVhdFMwf70BKFK4q JulCtUDXDfn2/q5HAKDq1r0oHm95bZLbwfjzaabO+My1Es5mM0C8QsBHcNwOxVsuJK6fwH 8H5rFMi/GhbBnFdaApeKGYIgbP7rr7A= X-MC-Unique: WKQbYLShPh6mCZRZipxHyw-1 From: Thomas Huth To: qemu-block@nongnu.org, Hanna Reitz , Paolo Bonzini Subject: [PATCH v2 1/8] tests/qemu-iotests/testrunner: Allow parallel test invocations Date: Wed, 9 Feb 2022 11:15:23 +0100 Message-Id: <20220209101530.3442837-2-thuth@redhat.com> In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com> References: <20220209101530.3442837-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644403008694100001 Content-Type: text/plain; charset="utf-8" If multiple tests run in parallel, they must use unique file names for the test output. Suggested-by: Hanna Reitz Signed-off-by: Thomas Huth --- tests/qemu-iotests/testrunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunn= er.py index 0eace147b8..9d20f51bb1 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -259,7 +259,7 @@ def do_run_test(self, test: str, mp: bool) -> TestResul= t: """ =20 f_test =3D Path(test) - f_bad =3D Path(f_test.name + '.out.bad') + f_bad =3D Path(f'{os.getpid()}-{f_test.name}.out.bad') f_notrun =3D Path(f_test.name + '.notrun') f_casenotrun =3D Path(f_test.name + '.casenotrun') f_reference =3D Path(self.find_reference(test)) --=20 2.27.0 From nobody Sun Feb 8 08:13:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644401995128356.47335327949975; Wed, 9 Feb 2022 02:19:55 -0800 (PST) Received: from localhost ([::1]:54514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHk4o-0006eg-O9 for importer@patchew.org; Wed, 09 Feb 2022 05:19:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk14-0003B6-Df for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:38139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk12-0004tl-Hi for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:02 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-35-_GFlBS1wOOKCOdN5RBrO_Q-1; Wed, 09 Feb 2022 05:15:57 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4994786A061; Wed, 9 Feb 2022 10:15:56 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B4EA2B3A7; Wed, 9 Feb 2022 10:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644401759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P09O67l/FWSsw6LKH5uauxICQiasws3LKwEkfmqQzXg=; b=KGE4n/IRZwlbdXz1Ix2PZl3uWMTxhTvoU8Fi9hEKfp8eMswrYyRjhxkKKTmIZDt5l2zP+D 4IBSwRjvio5NY/TXbYIxy1jzPdP1/qY51ini1LvJgX0v2b/6CpBJed28eWaa2P7I+XIgPT kXxoEN5zMC7j8LVGl2YY0RqdVlCPeWM= X-MC-Unique: _GFlBS1wOOKCOdN5RBrO_Q-1 From: Thomas Huth To: qemu-block@nongnu.org, Hanna Reitz , Paolo Bonzini Subject: [PATCH v2 2/8] tests/qemu-iotests: Improve the check for GNU sed Date: Wed, 9 Feb 2022 11:15:24 +0100 Message-Id: <20220209101530.3442837-3-thuth@redhat.com> In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com> References: <20220209101530.3442837-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644401997518100001 Content-Type: text/plain; charset="utf-8" Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better to simply skip the bash-based tests, so that the python-based tests could still be run. Thus add the check for BusyBox sed to common.rc and mark the tests as "not run" if GNU sed is not available. Then we can also remove the sed checks from the check-block.sh script. Signed-off-by: Thomas Huth --- tests/check-block.sh | 12 ------------ tests/qemu-iotests/common.rc | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/tests/check-block.sh b/tests/check-block.sh index 720a46bc36..af0c574812 100755 --- a/tests/check-block.sh +++ b/tests/check-block.sh @@ -52,18 +52,6 @@ if LANG=3DC bash --version | grep -q 'GNU bash, version = [123]' ; then skip "bash version too old =3D=3D> Not running the qemu-iotests." fi =20 -if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then - if ! command -v gsed >/dev/null 2>&1; then - skip "GNU sed not available =3D=3D> Not running the qemu-iotests." - fi -else - # Double-check that we're not using BusyBox' sed which says - # that "This is not GNU sed version 4.0" ... - if sed --version | grep -q 'not GNU sed' ; then - skip "BusyBox sed not supported =3D=3D> Not running the qemu-iotes= ts." - fi -fi - cd tests/qemu-iotests =20 # QEMU_CHECK_BLOCK_AUTO is used to disable some unstable sub-tests diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 9885030b43..9ea504810c 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -17,17 +17,27 @@ # along with this program. If not, see . # =20 +# bail out, setting up .notrun file +_notrun() +{ + echo "$*" >"$OUTPUT_DIR/$seq.notrun" + echo "$seq not run: $*" + status=3D0 + exit +} + +# We need GNU sed for the iotests. Make sure to not use BusyBox sed +# which says that "This is not GNU sed version 4.0" SED=3D for sed in sed gsed; do - ($sed --version | grep 'GNU sed') > /dev/null 2>&1 + ($sed --version | grep -v "not GNU sed" | grep 'GNU sed') > /dev/null = 2>&1 if [ "$?" -eq 0 ]; then SED=3D$sed break fi done if [ -z "$SED" ]; then - echo "$0: GNU sed not found" - exit 1 + _notrun "GNU sed not found" fi =20 dd() @@ -722,16 +732,6 @@ _img_info() done } =20 -# bail out, setting up .notrun file -# -_notrun() -{ - echo "$*" >"$OUTPUT_DIR/$seq.notrun" - echo "$seq not run: $*" - status=3D0 - exit -} - # bail out, setting up .casenotrun file # The function _casenotrun() is used as a notifier. It is the # caller's responsibility to make skipped a particular test. --=20 2.27.0 From nobody Sun Feb 8 08:13:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644402758406903.9062137940706; Wed, 9 Feb 2022 02:32:38 -0800 (PST) Received: from localhost ([::1]:38872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHkH7-0007p4-6V for importer@patchew.org; Wed, 09 Feb 2022 05:32:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk19-0003CY-10 for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:43892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk15-0004uZ-Un for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:06 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-357-ij7d9dCQNQGm7APbFIJGCw-1; Wed, 09 Feb 2022 05:16:00 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 27779871101; Wed, 9 Feb 2022 10:15:59 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id E91232856C; Wed, 9 Feb 2022 10:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644401763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=smtAxOw94clyMYKTLTidPNDlyFBOhRyffFCIsFmx74U=; b=Woto8dSbfik7wtlSibw71qW6wDMLA51DbJ2zzal5WGJaq2KDOYSnm3NwPuyZmc7leRCvZg vIxXSGTh/bXAYibBUvlhskPUPoQPKGHGWYQ2pxbnMWnxke9HWWjseWYfFlRNxUtB4QkfLy lxQ6jK4NEmgZzKStOgPGZjlZ3wXhWeA= X-MC-Unique: ij7d9dCQNQGm7APbFIJGCw-1 From: Thomas Huth To: qemu-block@nongnu.org, Hanna Reitz , Paolo Bonzini Subject: [PATCH v2 3/8] tests/qemu-iotests/meson.build: Improve the indentation Date: Wed, 9 Feb 2022 11:15:25 +0100 Message-Id: <20220209101530.3442837-4-thuth@redhat.com> In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com> References: <20220209101530.3442837-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644402761122100001 By using subdir_done(), we can get rid of one level of indentation in this file. This will make it easier to add more conditions to skip the iotests in future patches. Reviewed-by: Hanna Reitz Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/qemu-iotests/meson.build | 61 ++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 5be3c74127..e1832c90e0 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -1,30 +1,33 @@ -if have_tools and targetos !=3D 'windows' - qemu_iotests_binaries =3D [qemu_img, qemu_io, qemu_nbd, qsd] - qemu_iotests_env =3D {'PYTHON': python.full_path()} - qemu_iotests_formats =3D { - 'qcow2': 'quick', - 'raw': 'slow', - 'qed': 'thorough', - 'vmdk': 'thorough', - 'vpc': 'thorough' - } - - foreach k, v : emulators - if k.startswith('qemu-system-') - qemu_iotests_binaries +=3D v - endif - endforeach - foreach format, speed: qemu_iotests_formats - if speed =3D=3D 'quick' - suites =3D 'block' - else - suites =3D ['block-' + speed, speed] - endif - test('qemu-iotests ' + format, sh, args: [files('../check-block.sh'), = format], - depends: qemu_iotests_binaries, env: qemu_iotests_env, - protocol: 'tap', - suite: suites, - timeout: 0, - is_parallel: false) - endforeach +if not have_tools or targetos =3D=3D 'windows' + subdir_done() endif + +qemu_iotests_binaries =3D [qemu_img, qemu_io, qemu_nbd, qsd] +qemu_iotests_env =3D {'PYTHON': python.full_path()} +qemu_iotests_formats =3D { + 'qcow2': 'quick', + 'raw': 'slow', + 'qed': 'thorough', + 'vmdk': 'thorough', + 'vpc': 'thorough' +} + +foreach k, v : emulators + if k.startswith('qemu-system-') + qemu_iotests_binaries +=3D v + endif +endforeach + +foreach format, speed: qemu_iotests_formats + if speed =3D=3D 'quick' + suites =3D 'block' + else + suites =3D ['block-' + speed, speed] + endif + test('qemu-iotests ' + format, sh, args: [files('../check-block.sh'), fo= rmat], + depends: qemu_iotests_binaries, env: qemu_iotests_env, + protocol: 'tap', + suite: suites, + timeout: 0, + is_parallel: false) +endforeach --=20 2.27.0 From nobody Sun Feb 8 08:13:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644402370919429.1510417103498; Wed, 9 Feb 2022 02:26:10 -0800 (PST) Received: from localhost ([::1]:60450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHkAq-0002w5-VO for importer@patchew.org; Wed, 09 Feb 2022 05:26:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk19-0003Ca-Oj for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39445) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk17-0004uj-IB for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:07 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-56-BeRsYAzmPmyLNfTSvGMyvQ-1; Wed, 09 Feb 2022 05:16:03 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F4151091DA0; Wed, 9 Feb 2022 10:16:02 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3AE02AA92; Wed, 9 Feb 2022 10:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644401764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G8UBRIll1U3psQ9bfFWE/nQlRFPJJWz1cQhvfNkn/qg=; b=aE82MOkOU7c9qKf4obv9YTHWOwiaj8Im1q1+wQCmlw7bBv8i7lqhLWZqQgmuNBMCUZXEsm Y1Jorf/bbcCAFkIL3CYrMeh2ATtG+98wxiYm/0xX+oCs55drPiXVAR+hweURSBjFafq3jT Bz6L0LVPMiuujB349cT6mq6WSWrQmBY= X-MC-Unique: BeRsYAzmPmyLNfTSvGMyvQ-1 From: Thomas Huth To: qemu-block@nongnu.org, Hanna Reitz , Paolo Bonzini Subject: [PATCH v2 4/8] tests/qemu-iotests: Allow to run "./check -n" from the source directory, too Date: Wed, 9 Feb 2022 11:15:26 +0100 Message-Id: <20220209101530.3442837-5-thuth@redhat.com> In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com> References: <20220209101530.3442837-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644402372798100001 Content-Type: text/plain; charset="utf-8" For better integration of the iotests into the meson build system, it would be very helpful to get the list of the tests in the "auto" group during the "configure" step already. However, "check -n -g auto" currently only works if the binaries have already been built. To fix this, skip the check for the binaries while setting up the TestEnv. Signed-off-by: Thomas Huth --- tests/qemu-iotests/check | 2 +- tests/qemu-iotests/testenv.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 75de1b4691..a67b831534 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -124,7 +124,7 @@ if __name__ =3D=3D '__main__': aiomode=3Dargs.aiomode, cachemode=3Dargs.cachemode, imgopts=3Dargs.imgopts, misalign=3Dargs.misalign, debug=3Dargs.debug, valgrind=3Dargs.valgrind, - gdb=3Dargs.gdb, qprint=3Dargs.print) + gdb=3Dargs.gdb, qprint=3Dargs.print, dry_run=3Dargs.dry_= run) =20 if len(sys.argv) > 1 and sys.argv[-len(args.tests)-1] =3D=3D '--': if not args.tests: diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 0f32897fe8..ec8c83ab07 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -180,7 +180,8 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode:= str, debug: bool =3D False, valgrind: bool =3D False, gdb: bool =3D False, - qprint: bool =3D False) -> None: + qprint: bool =3D False, + dry_run: bool =3D False) -> None: self.imgfmt =3D imgfmt self.imgproto =3D imgproto self.aiomode =3D aiomode @@ -226,6 +227,12 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode= : str, self.build_root =3D os.path.join(self.build_iotests, '..', '..') =20 self.init_directories() + + # Don't try to look for binaries etc. in dry run mode, so that + # the dry run mode also works without building the binaries first + if dry_run: + return + self.init_binaries() =20 self.malloc_perturb_ =3D os.getenv('MALLOC_PERTURB_', --=20 2.27.0 From nobody Sun Feb 8 08:13:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644403847331960.3973752679973; Wed, 9 Feb 2022 02:50:47 -0800 (PST) Received: from localhost ([::1]:35676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHkYf-0000NL-Sh for importer@patchew.org; Wed, 09 Feb 2022 05:50:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk34-0005au-2m for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:18:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk32-0006j2-4X for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:18:05 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-33-VfilNWwhPu2qcwA8CrxXhA-1; Wed, 09 Feb 2022 05:16:08 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E7896874996; Wed, 9 Feb 2022 10:16:04 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A2662856C; Wed, 9 Feb 2022 10:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644401883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=45CKTxNpbcccU9Qcy41eDGcxJ9VlwlJ0FFfx5HI8Q80=; b=QP4cnDM/A/9XsyI1K/BhyLNiePLHlAD+NtEID3q35KaryEqDOeSB8lvuWqnQD7/GYca0na U7bjA6lfkrB3K/bTRZ+gXjIAr4OtiAMoCIcG1MLJd1ZuDegFCKaQx/B46x1j/A8Np2XIkY wzE12nTy370t7fJu/ICHvoQA+6iFdNA= X-MC-Unique: VfilNWwhPu2qcwA8CrxXhA-1 From: Thomas Huth To: qemu-block@nongnu.org, Hanna Reitz , Paolo Bonzini Subject: [PATCH v2 5/8] tests/qemu-iotests/meson.build: Call the 'check' script directly Date: Wed, 9 Feb 2022 11:15:27 +0100 Message-Id: <20220209101530.3442837-6-thuth@redhat.com> In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com> References: <20220209101530.3442837-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644403848701100001 Content-Type: text/plain; charset="utf-8" We can get a nicer progress indication if we add the iotests individually via the 'check' script instead of going through the check-block.sh wrapper. For this, we have to add some of the sanity checks that have originally been done in the tests/check-block.sh script (whether "bash" is available or whether CFLAGS contain -fsanitize switches) to the meson.build file now, and add the environment variables that have been set up by the tests/check-block.sh script before. Signed-off-by: Thomas Huth --- tests/qemu-iotests/meson.build | 44 +++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index e1832c90e0..a9eade902f 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -1,9 +1,28 @@ -if not have_tools or targetos =3D=3D 'windows' +if not have_tools or targetos =3D=3D 'windows' or \ + config_host.has_key('CONFIG_GPROF') subdir_done() endif =20 +bash =3D find_program('bash', required: false, version: '>=3D 4.0') +if not bash.found() + message('bash >=3D v4.0 not available =3D=3D> Disabled the qemu-iotests.= ') + subdir_done() +endif + +foreach cflag: config_host['QEMU_CFLAGS'].split() + if cflag.startswith('-fsanitize') and \ + not cflag.contains('safe-stack') and not cflag.contains('cfi-icall') + message('Sanitizers are enabled =3D=3D> Disabled the qemu-iotests.') + subdir_done() + endif +endforeach + qemu_iotests_binaries =3D [qemu_img, qemu_io, qemu_nbd, qsd] -qemu_iotests_env =3D {'PYTHON': python.full_path()} +qemu_iotests_env =3D { + 'PYTHON': python.full_path(), + 'PYTHONUTF8': '1', + 'QEMU_CHECK_BLOCK_AUTO': '1' +} qemu_iotests_formats =3D { 'qcow2': 'quick', 'raw': 'slow', @@ -18,16 +37,25 @@ foreach k, v : emulators endif endforeach =20 +check_script =3D find_program(meson.current_build_dir() / 'check') +iotests =3D run_command(python, [check_script.full_path(), '-g', 'auto', '= -n'], + check: true).stdout().strip().replace('tests/', '').= split('\n') + foreach format, speed: qemu_iotests_formats if speed =3D=3D 'quick' suites =3D 'block' else suites =3D ['block-' + speed, speed] endif - test('qemu-iotests ' + format, sh, args: [files('../check-block.sh'), fo= rmat], - depends: qemu_iotests_binaries, env: qemu_iotests_env, - protocol: 'tap', - suite: suites, - timeout: 0, - is_parallel: false) + foreach tst: iotests + test('iotest-' + format + '-' + tst, + python, args: [check_script.full_path(), '-tap', '-' + format, ts= t], + depends: qemu_iotests_binaries, + env: qemu_iotests_env + \ + { 'TEST_DIR': + meson.current_build_dir() / 'scratch' / format + '-' + tst= }, + protocol: 'tap', + suite: suites, + timeout: 0) + endforeach endforeach --=20 2.27.0 From nobody Sun Feb 8 08:13:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644402794273521.8135595233439; Wed, 9 Feb 2022 02:33:14 -0800 (PST) Received: from localhost ([::1]:40210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHkHh-0000PK-0l for importer@patchew.org; Wed, 09 Feb 2022 05:33:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk1H-0003Io-5k for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:15 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk1F-0004wL-5l for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:14 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-442-WZwG6GDwNTyIaClpVBiNJQ-1; Wed, 09 Feb 2022 05:16:08 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9D9078519E1; Wed, 9 Feb 2022 10:16:07 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6FED62856C; Wed, 9 Feb 2022 10:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644401771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=50VXC+ParcgNxTxx08MQ/AAZcLMM6RL2u1p8TIBrR14=; b=CpZwjWd+UsdECRJrsKbhxycHi3X206zXhwfczD2HW8+0CZJ1YXkKQGEqkTANNJsU2Oy7Wx UxYZRiABD58U4Q16fPIGr0wEAYlPyrdAOuDWb6+wiPdflTbKQq+9dDQrDQ4TZNICC5/D33 iT9gIExLuwkUeaP3akqCGxBAYnO8thk= X-MC-Unique: WZwG6GDwNTyIaClpVBiNJQ-1 From: Thomas Huth To: qemu-block@nongnu.org, Hanna Reitz , Paolo Bonzini Subject: [PATCH v2 6/8] tests: Do not treat the iotests as separate meson test target anymore Date: Wed, 9 Feb 2022 11:15:28 +0100 Message-Id: <20220209101530.3442837-7-thuth@redhat.com> In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com> References: <20220209101530.3442837-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644402796142100001 Content-Type: text/plain; charset="utf-8" Now that we add the single iotests directly in meson.build, we do not have to separate the block suite from the other suits anymore. Signed-off-by: Thomas Huth --- meson.build | 6 +++--- scripts/mtest2make.py | 4 ---- tests/Makefile.include | 9 +-------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 5f43355071..b203402ee1 100644 --- a/meson.build +++ b/meson.build @@ -3,9 +3,9 @@ project('qemu', ['c'], meson_version: '>=3D0.58.2', 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse'], version: files('VERSION')) =20 -add_test_setup('quick', exclude_suites: ['block', 'slow', 'thorough'], is_= default: true) -add_test_setup('slow', exclude_suites: ['block', 'thorough'], env: ['G_TES= T_SLOW=3D1', 'SPEED=3Dslow']) -add_test_setup('thorough', exclude_suites: ['block'], env: ['G_TEST_SLOW= =3D1', 'SPEED=3Dthorough']) +add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: = true) +add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=3D= 1', 'SPEED=3Dslow']) +add_test_setup('thorough', env: ['G_TEST_SLOW=3D1', 'SPEED=3Dthorough']) =20 not_found =3D dependency('', required: false) keyval =3D import('keyval') diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py index 4d542e8aaa..304634b71e 100644 --- a/scripts/mtest2make.py +++ b/scripts/mtest2make.py @@ -101,10 +101,6 @@ def emit_suite(name, suite, prefix): testsuites =3D defaultdict(Suite) for test in introspect['tests']: process_tests(test, targets, testsuites) -# HACK: check-block is a separate target so that it runs with --verbose; -# only write the dependencies -emit_suite_deps('block', testsuites['block'], 'check') -del testsuites['block'] emit_prolog(testsuites, 'check') for name, suite in testsuites.items(): emit_suite(name, suite, 'check') diff --git a/tests/Makefile.include b/tests/Makefile.include index 9157a57b1a..f93ae5b479 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -151,16 +151,9 @@ check-acceptance: check-acceptance-deprecated-warning = | check-avocado =20 # Consolidated targets =20 -.PHONY: check-block check check-clean get-vm-images +.PHONY: check check-clean get-vm-images check: =20 -ifeq ($(CONFIG_TOOLS)$(CONFIG_POSIX),yy) -check: check-block -check-block: run-ninja - $(if $(MAKE.n),,+)$(MESON) test $(MTESTARGS) $(.mtestargs) --verbose \ - --logbase iotestslog $(call .speed.$(SPEED), block block-slow block-thor= ough) -endif - check-build: run-ninja =20 check-clean: --=20 2.27.0 From nobody Sun Feb 8 08:13:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644403466398111.1722679461559; Wed, 9 Feb 2022 02:44:26 -0800 (PST) Received: from localhost ([::1]:54116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHkSW-0001hx-TQ for importer@patchew.org; Wed, 09 Feb 2022 05:44:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk1L-0003N8-2B for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:53715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk1H-0004wm-1T for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:17 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-489-Pa1A0uzeOm-_-tZJXg9hoQ-1; Wed, 09 Feb 2022 05:16:11 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 411101018730; Wed, 9 Feb 2022 10:16:10 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 207B52A178; Wed, 9 Feb 2022 10:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644401774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ikexOuAm5i1DDeTrW77U0hOXhXy5YI84ssuuFDabCRQ=; b=dveXmu2fsAbGjIca9tMy2+xrHVm3TQZQopA+gJPHVtcgtLwYUn4uBFfovuumXlpm58HcbX eM4bHfyMTZn0bujSl+MVLwKXJ/BbcjHrIseAhwo90Z3AHj1LLQ4LgfpeaE7pI3Uu57uW1G R1KJUpyFv304r+Gx/LSTnlmlhSqKo9s= X-MC-Unique: Pa1A0uzeOm-_-tZJXg9hoQ-1 From: Thomas Huth To: qemu-block@nongnu.org, Hanna Reitz , Paolo Bonzini Subject: [PATCH v2 7/8] tests/qemu-iotests/testrunner: Print diff to stderr in TAP mode Date: Wed, 9 Feb 2022 11:15:29 +0100 Message-Id: <20220209101530.3442837-8-thuth@redhat.com> In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com> References: <20220209101530.3442837-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644403466928100001 Content-Type: text/plain; charset="utf-8" When running in TAP mode, stdout is reserved for the TAP protocol. To see the "diff" of the failed test, we have to print it to stderr instead. Signed-off-by: Thomas Huth --- tests/qemu-iotests/testrunner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunn= er.py index 9d20f51bb1..1f7ca1f2f9 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -404,7 +404,10 @@ def run_tests(self, tests: List[str], jobs: int =3D 1)= -> bool: if res.status =3D=3D 'fail': failed.append(name) if res.diff: - print('\n'.join(res.diff)) + if self.tap: + print('\n'.join(res.diff), file=3Dsys.stderr) + else: + print('\n'.join(res.diff)) elif res.status =3D=3D 'not run': notrun.append(name) elif res.status =3D=3D 'pass': --=20 2.27.0 From nobody Sun Feb 8 08:13:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644403680535650.6381331472462; Wed, 9 Feb 2022 02:48:00 -0800 (PST) Received: from localhost ([::1]:60188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHkVz-0005zY-FA for importer@patchew.org; Wed, 09 Feb 2022 05:47:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk1M-0003Of-TX for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:21 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:26673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk1K-0004xl-Mz for qemu-devel@nongnu.org; Wed, 09 Feb 2022 05:16:20 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-195-PFWR95YxMoihU3LhvcDyAg-1; Wed, 09 Feb 2022 05:16:14 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4659F1019983; Wed, 9 Feb 2022 10:16:13 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8BDB2856C; Wed, 9 Feb 2022 10:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644401777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JaHUvzjFbj1WpZOCy8SCdLGzCdMLYST/KTk2UyzmokA=; b=hST+pjvvJ0wiLK55v8m4vgnoX5wnbY1IPawfY/bHqoPVx2TLKCJ5aUoyZ6xSIZ0KFYrVWB HO9kmGql8brpNEf25OS7mvn7ZNBym2uUwa5Nke/B8feHe+nuSr/YJQL2YeQNvESz04nGON AhcqW65ya3GEusVo1QfzUh2ebdHyq28= X-MC-Unique: PFWR95YxMoihU3LhvcDyAg-1 From: Thomas Huth To: qemu-block@nongnu.org, Hanna Reitz , Paolo Bonzini Subject: [PATCH v2 8/8] tests: Remove check-block.sh Date: Wed, 9 Feb 2022 11:15:30 +0100 Message-Id: <20220209101530.3442837-9-thuth@redhat.com> In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com> References: <20220209101530.3442837-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644403682574100001 Content-Type: text/plain; charset="utf-8" Now that the iotests are added by the meson.build file already, we do not need the check-block.sh wrapper script anymore. Signed-off-by: Thomas Huth --- tests/check-block.sh | 73 -------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100755 tests/check-block.sh diff --git a/tests/check-block.sh b/tests/check-block.sh deleted file mode 100755 index af0c574812..0000000000 --- a/tests/check-block.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -if [ "$#" -eq 0 ]; then - echo "Usage: $0 fmt..." >&2 - exit 99 -fi - -# Honor the SPEED environment variable, just like we do it for "meson test" -format_list=3D"$@" -if [ "$SPEED" =3D "slow" ] || [ "$SPEED" =3D "thorough" ]; then - group=3D -else - group=3D"-g auto" -fi - -skip() { - echo "1..0 #SKIP $*" - exit 0 -} - -if grep -q "CONFIG_GPROF=3Dy" config-host.mak 2>/dev/null ; then - skip "GPROF is enabled =3D=3D> Not running the qemu-iotests." -fi - -# Disable tests with any sanitizer except for specific ones -SANITIZE_FLAGS=3D$( grep "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ) -ALLOWED_SANITIZE_FLAGS=3D"safe-stack cfi-icall" -#Remove all occurrencies of allowed Sanitize flags -for j in ${ALLOWED_SANITIZE_FLAGS}; do - TMP_FLAGS=3D${SANITIZE_FLAGS} - SANITIZE_FLAGS=3D"" - for i in ${TMP_FLAGS}; do - if ! echo ${i} | grep -q "${j}" 2>/dev/null; then - SANITIZE_FLAGS=3D"${SANITIZE_FLAGS} ${i}" - fi - done -done -if echo ${SANITIZE_FLAGS} | grep -q "\-fsanitize" 2>/dev/null; then - # Have a sanitize flag that is not allowed, stop - skip "Sanitizers are enabled =3D=3D> Not running the qemu-iotests." -fi - -if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then - skip "No qemu-system binary available =3D=3D> Not running the qemu-iot= ests." -fi - -if ! command -v bash >/dev/null 2>&1 ; then - skip "bash not available =3D=3D> Not running the qemu-iotests." -fi - -if LANG=3DC bash --version | grep -q 'GNU bash, version [123]' ; then - skip "bash version too old =3D=3D> Not running the qemu-iotests." -fi - -cd tests/qemu-iotests - -# QEMU_CHECK_BLOCK_AUTO is used to disable some unstable sub-tests -export QEMU_CHECK_BLOCK_AUTO=3D1 -export PYTHONUTF8=3D1 -# If make was called with -jN we want to call ./check with -j N. Extract t= he -# flag from MAKEFLAGS, so that if it absent (or MAKEFLAGS is not defined),= JOBS -# would be an empty line otherwise JOBS is prepared string of flag with va= lue: -# "-j N" -# Note, that the following works even if make was called with "-j N" or ev= en -# "--jobs N", as all these variants becomes simply "-jN" in MAKEFLAGS vari= able. -JOBS=3D$(echo "$MAKEFLAGS" | sed -n 's/\(^\|.* \)-j\([0-9]\+\)\( .*\|$\)/-= j \2/p') - -ret=3D0 -for fmt in $format_list ; do - ${PYTHON} ./check $JOBS -tap -$fmt $group || ret=3D1 -done - -exit $ret --=20 2.27.0