From nobody Fri May 3 02:57:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677782830; cv=none; d=zohomail.com; s=zohoarc; b=m3kap4ob91WUMRWt2gXQa8P2l6cYL5f8rPmI+cUrkrb5CjsvyCqHvH7t02TtUH6TMWJe76ybDdkYt+WzrYIg6PKiBfpTAMf/CWgfFee+kNmcF4xFIMmFRbsFeIHZZ/1561lJcrkdHq12p46kzK5XBmV7+lLEKGf/BCUhzuwdxkY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677782830; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/6ApikPP/FgnXZsOu95/fvwfQFK7ck6XKqwLw9PSu/w=; b=TgxWWVGhg51jvqIDfFnryvTqVsMk0CAFNCcExOa+NsoLfNCDvQOdMuAZtYfIwryaVh1ht/M7Z0xayxB24NaF1f9iAPqGPAx1OwVqe8YfmqWfpjRfDADoxlCJiVKCWO/Fpy4plhLFWOV2lAIgMdpU8t3sL0hd4ZZ3bXq8kXC6DOc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677782830037273.5201749647099; Thu, 2 Mar 2023 10:47:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXnwa-0001FB-Er; Thu, 02 Mar 2023 13:46:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwY-00016e-CH for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwW-00059h-HU for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:17 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-433-k0Ui8ittNHa2MNnJBefXLA-1; Thu, 02 Mar 2023 13:46:12 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DB4B185A78B; Thu, 2 Mar 2023 18:46:12 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 83476C16027; Thu, 2 Mar 2023 18:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677782775; 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=/6ApikPP/FgnXZsOu95/fvwfQFK7ck6XKqwLw9PSu/w=; b=TKKFrCZx+z/ST9N2Sc3epEjmZpTNhQXvaEXeWU0lLuBENBMajrJk97ZFyfg2CSlyLVZtwR n4w795DMZ+FIHXeJ2sXT3jXUv4cHBvqZFpGLSV4o4eT//VzlNzJI4Izn6sTwQLWSVHIYOC nvdwaAS0rAAhVxyh9Bu6TXS0js8KGbw= X-MC-Unique: k0Ui8ittNHa2MNnJBefXLA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org, Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 1/5] iotests: explicitly pass source/build dir to 'check' command Date: Thu, 2 Mar 2023 18:46:02 +0000 Message-Id: <20230302184606.418541-2-berrange@redhat.com> In-Reply-To: <20230302184606.418541-1-berrange@redhat.com> References: <20230302184606.418541-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677782830682100001 The 'check' script has some rather dubious logic whereby it assumes that if invoked as a symlink, then it is running from a separate source tree and build tree, otherwise it assumes the current working directory is a combined source and build tree. This doesn't work if you want to invoke the 'check' script using its full source tree path while still using a split source and build tree layout. This would be a typical situation with meson if you ask it to find the 'check' script path using files('check'). Rather than trying to make the logic more magical, add support for explicitly passing the dirs using --source-dir and --build-dir. If either is omitted the current logic is maintained. Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/qemu-iotests/check | 8 +++++++- tests/qemu-iotests/testenv.py | 17 +++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 9bdda1394e..806abc21d6 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -113,6 +113,10 @@ def make_argparser() -> argparse.ArgumentParser: 'middle of the process.') g_sel.add_argument('tests', metavar=3D'TEST_FILES', nargs=3D'*', help=3D'tests to run, or "--" followed by a command= ') + g_sel.add_argument('--build-dir', default=3DNone, + help=3D'Path to iotests build directory') + g_sel.add_argument('--source-dir', default=3DNone, + help=3D'Path to iotests build directory') =20 return p =20 @@ -124,7 +128,9 @@ 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, + source_dir=3Dargs.source_dir, + build_dir=3Dargs.build_dir) =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 a864c74b12..9bf37cd381 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -177,7 +177,9 @@ 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, + source_dir: Optional[str] =3D None, + build_dir: Optional[str] =3D None) -> None: self.imgfmt =3D imgfmt self.imgproto =3D imgproto self.aiomode =3D aiomode @@ -213,12 +215,19 @@ def __init__(self, imgfmt: str, imgproto: str, aiomod= e: str, =20 if os.path.islink(sys.argv[0]): # called from the build tree - self.source_iotests =3D os.path.dirname(os.readlink(sys.argv[0= ])) - self.build_iotests =3D os.path.dirname(os.path.abspath(sys.arg= v[0])) + self.source_iotests =3D os.path.dirname( + os.readlink(sys.argv[0])) + self.build_iotests =3D os.path.dirname( + os.path.abspath(sys.argv[0])) else: # called from the source tree self.source_iotests =3D os.getcwd() - self.build_iotests =3D self.source_iotests + self.build_iotests =3D os.getcwd() + + if source_dir is not None: + self.source_iotests =3D source_dir + if build_dir is not None: + self.build_iotests =3D build_dir =20 self.build_root =3D os.path.join(self.build_iotests, '..', '..') =20 --=20 2.39.2 From nobody Fri May 3 02:57:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677782833; cv=none; d=zohomail.com; s=zohoarc; b=AAztRFVnNAb2OczB9YVyw2tnj4LYTQcplaAvZb508ZHZMBSJ/D5KKnIollZwebmKDuJZC9OgciXVIynsjzWUpYj9X8vqXF/mLwVWfwX27KgeQ8pr0dVb8X/bU74RxGEMU9LL/lQQVGukD5k86ozpmaN5rJJ+/8Rri2uCz5iYJII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677782833; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Vm2qo2oFGbt/kSCsSBoZ+hFmn5nLvxm4q9lpIJk2PwE=; b=MsGov9Vs8Q+3EqNdTNbh0g/hkLQE9Efxg8vDeSqWGEzWNpKzvwo3JAGxQgMfOTqXN2LqaFzIkBppwDhff9gg+3XQv8W1Hutn8teVHoeLDZSns8am+2pBXT0OTIA8PqXFKxeCMcDyq6vVCrlu9vfEYBqIOw8JBx9veH85dRJecj0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677782833360576.8822474331164; Thu, 2 Mar 2023 10:47:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXnwc-0001PV-48; Thu, 02 Mar 2023 13:46:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwZ-0001By-Sn for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwY-0005AV-Bm for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:19 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-487-q6IhYmwoN0ungU0xSvTLdg-1; Thu, 02 Mar 2023 13:46:14 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 172173C14864; Thu, 2 Mar 2023 18:46:14 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78FEFC1602A; Thu, 2 Mar 2023 18:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677782777; 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=Vm2qo2oFGbt/kSCsSBoZ+hFmn5nLvxm4q9lpIJk2PwE=; b=Oxi/MAzAhrihhQ55PeG6v3OlILEzHH3KFLzChVhr9Dja1rrUPtL/phEo/KcCvO9/qesO73 uH4Fl9lrWdqi+N9hIq69H84AkLTJQmDja14WPCqth1QtvZhJDtSpiVp2K6nKrlw5OEdJk3 5PxCNjTZFuu318CWbQA5keTSb2vOgRM= X-MC-Unique: q6IhYmwoN0ungU0xSvTLdg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org, Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 2/5] iotests: allow test discovery before building Date: Thu, 2 Mar 2023 18:46:03 +0000 Message-Id: <20230302184606.418541-3-berrange@redhat.com> In-Reply-To: <20230302184606.418541-1-berrange@redhat.com> References: <20230302184606.418541-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677782834693100001 The 'check' script can be invoked in "dry run" mode, in which case it merely does test discovery and prints out all their names. Despite only doing test discovery it still validates that the various QEMU binaries can be found. This makes it impossible todo test discovery prior to building QEMU. This is a desirable feature to support, because it will let meson discover tests. Fortunately the code in the TestEnv constructor is ordered in a way that makes this fairly trivial to achieve. We can just short circuit the constructor after the basic directory paths have been set. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- tests/qemu-iotests/check | 1 + tests/qemu-iotests/testenv.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 806abc21d6..7e287a79a3 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -129,6 +129,7 @@ if __name__ =3D=3D '__main__': imgopts=3Dargs.imgopts, misalign=3Dargs.misalign, debug=3Dargs.debug, valgrind=3Dargs.valgrind, gdb=3Dargs.gdb, qprint=3Dargs.print, + dry_run=3Dargs.dry_run, source_dir=3Dargs.source_dir, build_dir=3Dargs.build_dir) =20 diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 9bf37cd381..952efa0e63 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -178,6 +178,7 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode:= str, valgrind: bool =3D False, gdb: bool =3D False, qprint: bool =3D False, + dry_run: bool =3D False, source_dir: Optional[str] =3D None, build_dir: Optional[str] =3D None) -> None: self.imgfmt =3D imgfmt @@ -232,6 +233,10 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode= : str, self.build_root =3D os.path.join(self.build_iotests, '..', '..') =20 self.init_directories() + + if dry_run: + return + self.init_binaries() =20 self.malloc_perturb_ =3D os.getenv('MALLOC_PERTURB_', --=20 2.39.2 From nobody Fri May 3 02:57:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677782821; cv=none; d=zohomail.com; s=zohoarc; b=DxK/9MuKsKi2zgY6+fgOgwx4rJXL0XIFyN179wezrpWkrMhzpbMabKXXlL0CdfKMFvl9OYGGJ9jFq2WYpM/+IyL3bcXJGH5KzkaEZCMt/BV+LIAFRVjChjgjKnwiFHACvdeRQ3ljVdka8lx2SB2BB8VYaD99E698aR8VGG+6OBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677782821; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Cou8plli0844KO4kApgnJ8iDk4TVAP4KMLt1Nf0+lH4=; b=jPop/uY5NsGCybQJ416GuuohaxqO/OEMK4tD4BuVdsNP4K9NGw+tSXadsI4w4tjIfUSa8Ge9n9sjE9kuq2FW2AqG4Ez7PDLI724HNHI2fhUgfj9UNgmaJbbSpZjj3xW9t5ouBvkDfojvvwarIqoq0/uWpUARTmS8Rw1+DbtAROY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677782821444280.07052773998885; Thu, 2 Mar 2023 10:47:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXnwc-0001Pm-D0; Thu, 02 Mar 2023 13:46:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwa-0001Et-BF for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwY-0005Ag-Ik for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:19 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-649-sSUP6lB2M7y6GWKFrXpr6A-1; Thu, 02 Mar 2023 13:46:16 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E7540802C18; Thu, 2 Mar 2023 18:46:15 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6717CC16027; Thu, 2 Mar 2023 18:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677782777; 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=Cou8plli0844KO4kApgnJ8iDk4TVAP4KMLt1Nf0+lH4=; b=D+FC23ddr8KbQtqXM0czsqobBFshfTNZa11n6NnJQNvBoOiKl7jS1eC6oYJlvbXVvh00/M ZusyqgKEq1XAcatQW5o1lcLOthNyXHf6tiABRP9vn0eBI1KK37VNy0AHmquUk/5CQPTvJz tk4r0YzzRWVYhwuLJVALvIRFuVP5NKY= X-MC-Unique: sSUP6lB2M7y6GWKFrXpr6A-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org, Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 3/5] iotests: strip subdir path when listing tests Date: Thu, 2 Mar 2023 18:46:04 +0000 Message-Id: <20230302184606.418541-4-berrange@redhat.com> In-Reply-To: <20230302184606.418541-1-berrange@redhat.com> References: <20230302184606.418541-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677782822601100001 When asking 'check' to list individual tests by invoking it in dry run mode, it prints the paths to the tests relative to the base of the I/O test directory. When asking 'check' to run an individual test, however, it mandates that only the unqualified test name is given, without any path prefix. This inconsistency makes it harder to ask for a list of tests and then invoke each one. Thus the test listing code is change to flatten the test names, by printing only the base name, which can be directly invoked. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e --- tests/qemu-iotests/check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 7e287a79a3..3a8744220a 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -169,7 +169,7 @@ if __name__ =3D=3D '__main__': sys.exit(str(e)) =20 if args.dry_run: - print('\n'.join(tests)) + print('\n'.join([os.path.basename(t) for t in tests])) else: with TestRunner(env, tap=3Dargs.tap, color=3Dargs.color) as tr: --=20 2.39.2 From nobody Fri May 3 02:57:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677782808; cv=none; d=zohomail.com; s=zohoarc; b=hLj6jIqdxH9OcuUw7AKrZ/VklaA3GPmnzzfqooHs++WnlsNeko71FFY0CAcBaTWKGkDeBHmAu2mk23nFBLziCWbZ7U6RkPlhC809zXDc3R2cwE/ojaeHttIGKdpqgKpEMrMLHs0Sls5BYubV4i9AyW+43qpYzaXd0ocRENIMVMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677782808; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pDvGNSHUgSnRAK1Yl1OqKTWg1L0reMCofGiVW2qpC6o=; b=bugzOtN3zaGlh7GCO8o0FYTKDqfzTk5OUi3rYc39cDWKzGK4yvc0MFuVQ6SjvcYG8w2WaVNnCxmgoWKkRrbYzleQ35YZ4zY7fM+9J/hP44kuAbwkn3gETTgwNVQ5qR69JZ/iFr8OBnhbJ0sqw/Ad4dHgemCVN/KcjBNx1HI9hTg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677782808672895.158757065803; Thu, 2 Mar 2023 10:46:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXnwk-0002KG-LW; Thu, 02 Mar 2023 13:46:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwi-00023P-Pg for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwh-0005Bz-Eg for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:28 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-74-I7ANcgAlMzirvnRt30aa5g-1; Thu, 02 Mar 2023 13:46:18 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E11C818E0921; Thu, 2 Mar 2023 18:46:17 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 57939C16027; Thu, 2 Mar 2023 18:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677782786; 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=pDvGNSHUgSnRAK1Yl1OqKTWg1L0reMCofGiVW2qpC6o=; b=PEpUAs/O0zTBOxh523x4ox0S0UVkVmTtrGDjz8b6MhxruUFY+vb7n9tlbv+hvl0PiqWxOR +juivfchVcypMy82WIGTPJEOeA9IE2pV4WRM6qZLydeOLHY7luiBHeAlWRPXmiheufax0i cWj2gLGZdJ8xGXwwN+mXyRnZDdK/Wwg= X-MC-Unique: I7ANcgAlMzirvnRt30aa5g-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org, Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 4/5] iotests: print TAP protocol version when reporting tests Date: Thu, 2 Mar 2023 18:46:05 +0000 Message-Id: <20230302184606.418541-5-berrange@redhat.com> In-Reply-To: <20230302184606.418541-1-berrange@redhat.com> References: <20230302184606.418541-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677782810636100003 Recently meson started complaining that TAP test reports don't include the TAP protocol version. While this warning is bogus and has since been removed from Meson, it looks like good practice to include this header going forward. The GLib library test harness has started unconditionally printing the version, so this brings the I/O tests into line. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- tests/qemu-iotests/testrunner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunn= er.py index 5a771da86e..e734800b3d 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -391,6 +391,7 @@ def run_tests(self, tests: List[str], jobs: int =3D 1) = -> bool: casenotrun =3D [] =20 if self.tap: + print('TAP version 13') self.env.print_env('# ') print('1..%d' % len(tests)) else: --=20 2.39.2 From nobody Fri May 3 02:57:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677782830; cv=none; d=zohomail.com; s=zohoarc; b=HtpM94G7jO7i4lby6tNz1IZ1Y9DGXdODKJu5GQpXTWNOqXrk0PhqfdpoxOUT9ssfoZ0+26DuIISGEnfEH2QMlMEezEdOEqPzdxTJS5y12ghkHT5MPuIGW/iQWOE6q9HxNBVMOlFYHpKt4EHwu4uUwYnQAnxJzBSdlihFSNolyE4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677782830; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZbymN6ODIBWCyWIfatbk1cfOZ4XQichSEhXRbexI754=; b=JvzL63sLn/5AmsqkD/TZkhqpH24D/LJjI+oYtHmVUDl+zDDIZ4iSu9x5IKm3r061j5q+x1p95AAjKNE2QkUyvdzWUS0AaEPCk8016XTkUtGbUnoDbYmYkF3zNXQXvxoybR1PnS92AvR0cwWDFDZzf4OEkTksCAjlHbWvQYVudIA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677782830056478.9333924685924; Thu, 2 Mar 2023 10:47:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXnwf-0001eB-5m; Thu, 02 Mar 2023 13:46:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwd-0001Wx-HV for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:23 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXnwc-0005BJ-1I for qemu-devel@nongnu.org; Thu, 02 Mar 2023 13:46:23 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-41-Zre4qo5RNdiCefbWa_3f9w-1; Thu, 02 Mar 2023 13:46:20 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C23D7101A521; Thu, 2 Mar 2023 18:46:19 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 504AEC16027; Thu, 2 Mar 2023 18:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677782781; 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=ZbymN6ODIBWCyWIfatbk1cfOZ4XQichSEhXRbexI754=; b=SV4ibwo8o0u+2siWvbDJDSaHHAA5Csz3VFgHmTf+Z+0qiY0RvcjsM0oN2LXLFhI11aj6LX VkwKTA3OAJ1A1ynzWA+1S7zXvTaceGffyGvOoxSEWFN7/QbCtlVRRw01F/WRGdBGS2MmG9 L1cesm2LejxfYyhqWWDKcjqFYcamSFg= X-MC-Unique: Zre4qo5RNdiCefbWa_3f9w-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org, Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 5/5] iotests: register each I/O test separately with meson Date: Thu, 2 Mar 2023 18:46:06 +0000 Message-Id: <20230302184606.418541-6-berrange@redhat.com> In-Reply-To: <20230302184606.418541-1-berrange@redhat.com> References: <20230302184606.418541-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677782830683100002 Currently meson registers a single test that invokes an entire group of I/O tests, hiding the test granularity from meson. There are various downsides of doing this * You cannot ask 'meson test' to invoke a single I/O test * The meson test timeout can't be applied to the individual tests * Meson only gets a pass/fail for the overall I/O test group not individual tests * If a CI job gets killed by the GitLab timeout, we don't get visibility into how far through the I/O tests execution got. This switches meson to perform test discovery by invoking 'check' in dry-run mode. It then registers one meson test case for each I/O test. Parallel execution remains disabled since the I/O tests do not use self contained execution environments and thus conflict with each other. Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/qemu-iotests/meson.build | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 323a4acb6a..48c82085af 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -32,16 +32,37 @@ foreach k, v : emulators endif endforeach =20 +qemu_iotests_check_cmd =3D files('check') + 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) + + args =3D ['-tap', '-' + format] + if speed =3D=3D 'quick' + args +=3D ['-g', 'auto'] + endif + + rc =3D run_command( + [qemu_iotests_check_cmd] + args + ['-n'], + check: true, + ) + + foreach item: rc.stdout().strip().split() + message('Adding test qemu-iotests-' + format + '-' + item) + args =3D ['-tap', '-' + format, item, + '--source-dir', meson.current_source_dir(), + '--build-dir', meson.current_build_dir()] + test('qemu-iotests-' + format + '-' + item, + qemu_iotests_check_cmd, + args: args, + is_parallel: false, + depends: qemu_iotests_binaries, + env: qemu_iotests_env, + protocol: 'tap', + suite: suites) + endforeach endforeach --=20 2.39.2