From nobody Sun May 12 04:22:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253652; cv=none; d=zohomail.com; s=zohoarc; b=BI86fjzi+xE2qOODE4YQaFmQRnPg/bvqfjOcDyxdjvaRqhHt8ZbSAKtl/BuObnZKx+ifTvGRW5XeNFRubY0INSBbdftMWLIRob7u6opQDFmFnWkuqy5OW/ir2D8oyMv6wRO1pncQawzJ5S+pYu66oxIxdHrMAUvf24BrFM7F80M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253652; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=eCJre7ZTTPZwLjEgRuGDm+u7U17mzFaCSgHcT+5UFuw=; b=QuTWbr4Lb6X5lv4E2SJrKgNsOjPc/JkaqQOy0XsiNfqM2Rh5cbGrnaJLIZ9brEEh0J3D5SFEhzpk9cKgo5EQsIWV5qLlQUg23JxmDDfiDdUsIrsT7feGGl/SexgjQ75S0vfV6vIfwV12Y2EV6VAeNs0jL8rWDyD1RmY8IXs+k0k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1698253652819842.2599765431912; Wed, 25 Oct 2023 10:07:32 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-180-RFrlBzZvPkSvu3c3iP8w1Q-1; Wed, 25 Oct 2023 13:07:12 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8324984B11C; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6EC57492BE8; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 31D3519465A3; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1A496194658C for ; Wed, 25 Oct 2023 17:07:08 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 011F0492BE7; Wed, 25 Oct 2023 17:07:08 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01819492BE8 for ; Wed, 25 Oct 2023 17:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253651; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eCJre7ZTTPZwLjEgRuGDm+u7U17mzFaCSgHcT+5UFuw=; b=Y7ydhVB+HmhGscuoQhRN/HPwqdLoHtKH1pomwN3mbWTObHS6c88cIcVUfKfJMkChNJ/9tg SLbzrHzz+q9ykmXo5UxkBZKct2ksZbc6k5WJ2e4W5VaIAq4O8y2HPg3oFZMKxk9QNJxU6O xAcX3XT/8CL//N02KYRjWaXA+A1f8SM= X-MC-Unique: RFrlBzZvPkSvu3c3iP8w1Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/8] tests: Fix some test cases on macOS Date: Wed, 25 Oct 2023 19:06:54 +0200 Message-ID: <20231025170701.239137-2-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253653418100011 Content-Type: text/plain; charset="utf-8"; x-default="true" Test cases that depend on duplicating fds are using fairly big values as targets. This works fine on Linux, where RLIMIT_NOFILE is 1024 by default, but fails on macOS which uses 256 as the default. Decrease the values so that they're valid across all platforms. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- .../qemuxml2argvdata/disk-source-fd.x86_64-latest.args | 10 +++++----- .../qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args | 2 +- tests/qemuxml2argvtest.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/qemuxml2argvdata/disk-source-fd.x86_64-latest.args b/tes= ts/qemuxml2argvdata/disk-source-fd.x86_64-latest.args index 9d8109a8f4..1341b7d032 100644 --- a/tests/qemuxml2argvdata/disk-source-fd.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-source-fd.x86_64-latest.args @@ -27,18 +27,18 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUG= uest1/.config \ -no-shutdown \ -boot strict=3Don \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ --add-fd set=3D2,fd=3D700,opaque=3Dlibvirt-4-storage0 \ --add-fd set=3D2,fd=3D705,opaque=3Dlibvirt-4-storage1 \ +-add-fd set=3D2,fd=3D200,opaque=3Dlibvirt-4-storage0 \ +-add-fd set=3D2,fd=3D205,opaque=3Dlibvirt-4-storage1 \ -blockdev '{"driver":"file","filename":"/dev/fdset/2","node-name":"libvirt= -4-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"qco= w2","file":"libvirt-4-storage"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"li= bvirt-4-format","id":"virtio-disk4","bootindex":1}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/rhel7.1484= 071876","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"un= map"}' \ -blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"qcow= 2","file":"libvirt-3-storage","backing":null}' \ --add-fd set=3D1,fd=3D777,opaque=3Dlibvirt-2-storage0 \ --add-fd set=3D1,fd=3D778,opaque=3Dlibvirt-2-storage1 \ +-add-fd set=3D1,fd=3D247,opaque=3Dlibvirt-2-storage0 \ +-add-fd set=3D1,fd=3D248,opaque=3Dlibvirt-2-storage1 \ -blockdev '{"driver":"file","filename":"/dev/fdset/1","node-name":"libvirt= -2-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"qcow= 2","file":"libvirt-2-storage","backing":"libvirt-3-format"}' \ --add-fd set=3D0,fd=3D704,opaque=3Dlibvirt-1-storage0 \ +-add-fd set=3D0,fd=3D204,opaque=3Dlibvirt-1-storage0 \ -blockdev '{"driver":"file","filename":"/dev/fdset/0","node-name":"libvirt= -1-storage","read-only":false,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage","backing":"libvirt-2-format"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x3","drive":"li= bvirt-1-format","id":"virtio-disk5"}' \ diff --git a/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args b/tes= ts/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args index b987455ee4..27035184ad 100644 --- a/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-vhostvdpa.x86_64-latest.args @@ -27,7 +27,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -no-shutdown \ -boot strict=3Don \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ --add-fd set=3D0,fd=3D801,opaque=3Dlibvirt-1-storage-vdpa \ +-add-fd set=3D0,fd=3D201,opaque=3Dlibvirt-1-storage-vdpa \ -blockdev '{"driver":"virtio-blk-vhost-vdpa","path":"/dev/fdset/0","node-n= ame":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-rea= d-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"dir= ect":true,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"li= bvirt-1-format","id":"virtio-disk0","bootindex":1,"write-cache":"on"}' \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 48058cb924..4fda68a4ce 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1186,7 +1186,7 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-vhostuser-numa"); DO_TEST_CAPS_LATEST("disk-vhostuser"); DO_TEST_CAPS_ARCH_LATEST_FULL("disk-vhostvdpa", "x86_64", - ARG_VDPA_FD, "/dev/vhost-vdpa-0", 801); + ARG_VDPA_FD, "/dev/vhost-vdpa-0", 201); DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-device-lun-type-invalid"); DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-attaching-partition-nosupport"); DO_TEST_CAPS_LATEST("disk-usb-device"); @@ -1226,9 +1226,9 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-backing-chains-index"); DO_TEST_CAPS_LATEST("disk-backing-chains-noindex"); DO_TEST_CAPS_ARCH_LATEST_FULL("disk-source-fd", "x86_64", - ARG_FD_GROUP, "testgroup2", 2, 700, 705, - ARG_FD_GROUP, "testgroup5", 1, 704, - ARG_FD_GROUP, "testgroup6", 2, 777, 778); + ARG_FD_GROUP, "testgroup2", 2, 200, 205, + ARG_FD_GROUP, "testgroup5", 1, 204, + ARG_FD_GROUP, "testgroup6", 2, 247, 248); =20 DO_TEST_CAPS_LATEST("disk-slices"); DO_TEST_CAPS_LATEST("disk-rotation"); --=20 2.41.0 From nobody Sun May 12 04:22:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253642; cv=none; d=zohomail.com; s=zohoarc; b=hetXzgGbuopfypei7yplVIOPzlc10Iha93NeIexBWtG8riw+ZMvcTpKkcqE0XKl5BN8/VOp9nllOAKDyTf5c0wIWVJhoow3xrYLxPq7dQES1GDaiRxUg1U3ZALX1HTmVDXrR3Iu1DWGvapr9f56AVoQc7FE5fuj1C4e+6vzEKY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253642; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=QNaGYnxdOeRKe7WTVmgbFt9o3uEju9/mUddYhOSWfBc=; b=eSgvdOPVH1Ufh9kN3BtMg0yELad0XNhF8bWoI0rAW/jjMmA855pCZo+jH7pQ7syMSer60H8k4l+hxI77ZK0GDMTsafpExxfwgz4kgS/5WFo5T9TILpgLXohsSVFhDOMkiCkxSbfE4K089G206vh/zJBtFUXVjt2uVudBPhWgBcA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1698253642083372.0011166150017; Wed, 25 Oct 2023 10:07:22 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-9-GRmrKcE7OROwtRylxCjQLQ-1; Wed, 25 Oct 2023 13:07:16 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 02A6884B108; Wed, 25 Oct 2023 17:07:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFB9C492BFC; Wed, 25 Oct 2023 17:07:12 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F190E1946595; Wed, 25 Oct 2023 17:07:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AA606194658C for ; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9A25A492BE9; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F618492BF0 for ; Wed, 25 Oct 2023 17:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253640; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=QNaGYnxdOeRKe7WTVmgbFt9o3uEju9/mUddYhOSWfBc=; b=JovRQUVljr7yC9Yfif/8ZTPbI4bCIvEDWlIkil3TOL21vvIezPYBXssdQKRGG/Bm9QZwbf Da9n161S+Nm4TDThnMaKKtl8D4szsGTT4rKxo9hYDhlTX8ivNcLwQhtlGqLdhkBC/D7qgh w8s1+rZbO32qOnyL3fs4vAd3qK2bDWU= X-MC-Unique: GRmrKcE7OROwtRylxCjQLQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/8] ci: Disable optimizations on macOS Date: Wed, 25 Oct 2023 19:06:55 +0200 Message-ID: <20231025170701.239137-3-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253643356100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Clang can be too aggressive at optimizations, which can end up breaking our test suite. See f9f5ab57189b for details. As a result of this, since 7944700b4037 we are automatically disabling tests when Clang is used unless it supports the -fsemantic-interposition compiler flag. Since the version of Clang included in macOS doesn't support that compiler flag, we end up always disabling the test suite on that platform. This is already far from ideal, considering that it was just last year when we finally managed to get the test suite to successfully pass on macOS, and it would be a real shame if the situation regressed again. With the upcoming changes, which will turn running 'meson test' into a hard failure if tests are disabled, this behavior will result in every single pipeline failing. Work around the problem the only way we can: disabling optimizations entirely for the macOS CI jobs. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- ci/cirrus/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/cirrus/build.yml b/ci/cirrus/build.yml index 519e5ae144..60ac90eee0 100644 --- a/ci/cirrus/build.yml +++ b/ci/cirrus/build.yml @@ -24,7 +24,7 @@ build_task: - git fetch origin "${CI_MERGE_REQUEST_REF_PATH:-$CI_COMMIT_REF_NAME}" - git reset --hard "$CI_COMMIT_SHA" build_script: - - meson setup build + - if test "$(uname)" =3D "Darwin"; then meson setup build --optimizati= on 0; else meson setup build; fi - meson dist -C build --no-tests - meson compile -C build - meson test -C build --no-suite syntax-check --print-errorlogs || (ca= t ~/Library/Logs/DiagnosticReports/*.crash && exit 1) --=20 2.41.0 From nobody Sun May 12 04:22:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253643; cv=none; d=zohomail.com; s=zohoarc; b=cXz7sz7Uc6cmMNOY+YkvS2e2OB1YncY7y/QbwbDUrxHhly1COdUyolywKaC87xseY24GqB6/H4lYwyw08rPUYrmXtztQkOBYbX2Nzt3nzx5+3V3Tyz8Go8tSfzdd4wczj6N6HOmU31ZW8blSJI0NVTcPMqjffXVGw0NVjUKkbY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253643; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=95heORws0D7IGEQcoWtNYzl97Hgh1CyDDXcZ/6lhjPc=; b=BGKcJSLSX0GoPd/YOBVW45wcJE9sGVh5tsWINBgzeqjIsCKVBigcgh4vR+JVzS9hcI+Fmi9wpXvZHGHWgcJGxNhINV8B5jANLg/ebdOlhkl2C7uUuK0C6FRs2KVkt9TK5RKIXPcZChGxlC4OQGNwMAKislXqZUXZ1va/cLs7fyY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1698253643731114.35420805367062; Wed, 25 Oct 2023 10:07:23 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-487-cVcR5-5GOJaoU2JCXZRwxw-1; Wed, 25 Oct 2023 13:07:17 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7C5B8101B06C; Wed, 25 Oct 2023 17:07:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 544802026D68; Wed, 25 Oct 2023 17:07:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6938019465B9; Wed, 25 Oct 2023 17:07:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5872919465BC for ; Wed, 25 Oct 2023 17:07:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3ACB6492BE9; Wed, 25 Oct 2023 17:07:11 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3DAAC492BE8 for ; Wed, 25 Oct 2023 17:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253642; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=95heORws0D7IGEQcoWtNYzl97Hgh1CyDDXcZ/6lhjPc=; b=X7+4JuoZMNrFlrEMHMWUGVbxdOoUjoKBASv+iBq4uQxftRlOGjPNtGvq2u8TFIyeR6c9HO Q1RF1P0txS9EmWYu9vlda9HZkeA2qwWkUwB39PCZP0r9w3O9bovhGh4Y7lBM9F2bQXV31S pDYKIGkmfvNvaQ6e7TtiC3+oUlOJaSM= X-MC-Unique: cVcR5-5GOJaoU2JCXZRwxw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 3/8] meson: Do less when not building from git Date: Wed, 25 Oct 2023 19:06:56 +0200 Message-ID: <20231025170701.239137-4-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253645389100003 Content-Type: text/plain; charset="utf-8"; x-default="true" As explained in the comment, the syntax-check machinery uses git to figure out the list of files it should operate on, so we can only enable it when building from git. Despite only registering the various tests with meson in that case, however, we unconditionally perform a bunch of preparation that is only useful for the purpose of registering and running the tests. If we're not going to do that, we can skip a few steps and save a bit of time. Best viewed with 'git show -w'. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Reviewed-by: Martin Kletzander --- build-aux/meson.build | 99 +++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 50 deletions(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index 16d085505d..b5d88a4c44 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -1,63 +1,62 @@ -flake8_path =3D '' -if flake8_prog.found() - flake8_path =3D flake8_prog.full_path() -endif +# Skip syntax-check if not building from git because we get the list of fi= les +# to check using git commands and it fails if we are not in git repository. +if git + flake8_path =3D '' + if flake8_prog.found() + flake8_path =3D flake8_prog.full_path() + endif =20 -if host_machine.system() =3D=3D 'freebsd' or host_machine.system() =3D=3D = 'darwin' - make_prog =3D find_program('gmake') - sed_prog =3D find_program('gsed') -else - make_prog =3D find_program('make') - sed_prog =3D find_program('sed') -endif + if host_machine.system() =3D=3D 'freebsd' or host_machine.system() =3D= =3D 'darwin' + make_prog =3D find_program('gmake') + sed_prog =3D find_program('gsed') + else + make_prog =3D find_program('make') + sed_prog =3D find_program('sed') + endif =20 -if host_machine.system() =3D=3D 'freebsd' - grep_prog =3D find_program('grep') - grep_cmd =3D run_command(grep_prog, '--version', check: true) - if grep_cmd.stdout().startswith('grep (BSD grep') - grep_prog =3D find_program('/usr/local/bin/grep', required: false) - if not grep_prog.found() - error('GNU grep not found') + if host_machine.system() =3D=3D 'freebsd' + grep_prog =3D find_program('grep') + grep_cmd =3D run_command(grep_prog, '--version', check: true) + if grep_cmd.stdout().startswith('grep (BSD grep') + grep_prog =3D find_program('/usr/local/bin/grep', required: false) + if not grep_prog.found() + error('GNU grep not found') + endif endif + elif host_machine.system() =3D=3D 'darwin' + grep_prog =3D find_program('ggrep') + else + grep_prog =3D find_program('grep') endif -elif host_machine.system() =3D=3D 'darwin' - grep_prog =3D find_program('ggrep') -else - grep_prog =3D find_program('grep') -endif - -awk_prog =3D find_program('awk') =20 -syntax_check_conf =3D configuration_data({ - 'top_srcdir': meson.project_source_root(), - 'top_builddir': meson.project_build_root(), - 'flake8_path': flake8_path, - 'runutf8': ' '.join(runutf8), - 'PYTHON3': python3_prog.full_path(), - 'GREP': grep_prog.full_path(), - 'SED': sed_prog.full_path(), - 'AWK': awk_prog.full_path(), -}) + awk_prog =3D find_program('awk') =20 -configure_file( - input: 'Makefile.in', - output: '@BASENAME@', - configuration: syntax_check_conf, -) + syntax_check_conf =3D configuration_data({ + 'top_srcdir': meson.project_source_root(), + 'top_builddir': meson.project_build_root(), + 'flake8_path': flake8_path, + 'runutf8': ' '.join(runutf8), + 'PYTHON3': python3_prog.full_path(), + 'GREP': grep_prog.full_path(), + 'SED': sed_prog.full_path(), + 'AWK': awk_prog.full_path(), + }) =20 -rc =3D run_command( - 'sed', '-n', - 's/^sc_\\([a-zA-Z0-9_-]*\\):.*/\\1/p', - meson.current_source_dir() / 'syntax-check.mk', - check: true, -) + configure_file( + input: 'Makefile.in', + output: '@BASENAME@', + configuration: syntax_check_conf, + ) =20 -sc_tests =3D rc.stdout().strip().split() + rc =3D run_command( + 'sed', '-n', + 's/^sc_\\([a-zA-Z0-9_-]*\\):.*/\\1/p', + meson.current_source_dir() / 'syntax-check.mk', + check: true, + ) =20 + sc_tests =3D rc.stdout().strip().split() =20 -# Skip syntax-check if not building from git because we get the list of fi= les -# to check using git commands and it fails if we are not in git repository. -if git foreach target : sc_tests test( target, --=20 2.41.0 From nobody Sun May 12 04:22:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253646; cv=none; d=zohomail.com; s=zohoarc; b=OywJEd2L8yzyQEcRvaqw9hfu99rCSVbsbRjIqT3t1Y7wR5TmOLHj7UU9t+26LR+WOeGyM457Y5NLTYI4RbT6LTwXRZ/pJn1nWf/fFxmQMnZxNyfC4T17s9ovOgOfxsA4uQ0HQft4p/vhv4hhVxlxGXzJNzRIJo+jLuzJBvjmLPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253646; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=rrBoETI3lx8VDP5QyxSjP/6Ch0IAGJrLHCF0FWsE9RU=; b=S/UxaOBfB+L34+VDkBj3ZGjUqpFkyxYB6D4vi56axNrQudAyDWWOzCV4BFE6SLr4V2yUsWLn6lUbaoQnqTaPIEZn8fINvChkEDRW/I44JGOmPDs0WcJDqi80+i8AC9PiR0hy1bwKnBxUlPCiprFQrT9QiiVnBHlpZHs2GT9YkM0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1698253645807219.76295675432686; Wed, 25 Oct 2023 10:07:25 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-187-iyZ7rohXOX6mQtnWsRVCvA-1; Wed, 25 Oct 2023 13:07:19 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E7BF72810D42; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CDB391C060B0; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A1313194658D; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E738A19466EF for ; Wed, 25 Oct 2023 17:07:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CDEE5492BE8; Wed, 25 Oct 2023 17:07:12 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D10DC492BE7 for ; Wed, 25 Oct 2023 17:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253644; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=rrBoETI3lx8VDP5QyxSjP/6Ch0IAGJrLHCF0FWsE9RU=; b=EM8FcDbnCtuYVnAzg/SHDNc1ZKVF2m9CaK9cxVMHhAScyh9pIuJ6dEaOSiusMpZF6UvEoa erV5g3xL280PHiOEc1EceM7Ep9cxbZ2EQUW8S8DtwyXGRGBVv9qLolgoTB7wOmqAYyKT9i 1MfkKvYhDtWZ7LdpIwaSYWG1zPgDo2g= X-MC-Unique: iyZ7rohXOX6mQtnWsRVCvA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 4/8] meson: Move all handling of test options together Date: Wed, 25 Oct 2023 19:06:57 +0200 Message-ID: <20231025170701.239137-5-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253647378100005 Content-Type: text/plain; charset="utf-8"; x-default="true" This will make future patches nicer. Note that we need to handle these somewhat late because of the dependency on information about the compiler and the flags it supports. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Reviewed-by: Martin Kletzander --- meson.build | 57 +++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/meson.build b/meson.build index 47748febb8..a372f99c21 100644 --- a/meson.build +++ b/meson.build @@ -151,23 +151,6 @@ if packager_version !=3D '' endif =20 =20 -# test options - -if get_option('expensive_tests').auto() - use_expensive_tests =3D not git -else - use_expensive_tests =3D get_option('expensive_tests').enabled() -endif - -coverage_flags =3D [] -if get_option('test_coverage') - coverage_flags =3D [ - '-fprofile-arcs', - '-ftest-coverage', - ] -endif - - # Add RPATH information when building for a non-standard prefix, or # when explicitly requested to do so =20 @@ -2041,6 +2024,35 @@ endif =20 conf.set_quoted('TLS_PRIORITY', get_option('tls_priority')) =20 + +# test options + +build_tests =3D [ not get_option('tests').disabled() ] +if build_tests[0] and \ + cc.get_id() =3D=3D 'clang' and \ + not supported_cc_flags.contains('-fsemantic-interposition') \ + and get_option('optimization') !=3D '0' + # If CLang doesn't support -fsemantic-interposition then our + # mocking doesn't work. The best we can do is to not run the + # test suite. + build_tests =3D [ false, '!!! Forcibly disabling tests because CLang la= cks -fsemantic-interposition. Update CLang or disable optimization !!!' ] +endif + +if get_option('expensive_tests').auto() + use_expensive_tests =3D not git +else + use_expensive_tests =3D get_option('expensive_tests').enabled() +endif + +coverage_flags =3D [] +if get_option('test_coverage') + coverage_flags =3D [ + '-fprofile-arcs', + '-ftest-coverage', + ] +endif + + # Various definitions =20 # Python3 < 3.7 treats the C locale as 7-bit only. We must force env vars = so @@ -2064,17 +2076,6 @@ subdir('src') =20 subdir('tools') =20 -build_tests =3D [ not get_option('tests').disabled() ] -if build_tests[0] and \ - cc.get_id() =3D=3D 'clang' and \ - not supported_cc_flags.contains('-fsemantic-interposition') \ - and get_option('optimization') !=3D '0' - # If CLang doesn't support -fsemantic-interposition then our - # mocking doesn't work. The best we can do is to not run the - # test suite. - build_tests =3D [ false, '!!! Forcibly disabling tests because CLang la= cks -fsemantic-interposition. Update CLang or disable optimization !!!' ] -endif - if build_tests[0] subdir('tests') endif --=20 2.41.0 From nobody Sun May 12 04:22:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253649; cv=none; d=zohomail.com; s=zohoarc; b=ZNIk/NlWp1EF1wQa8tr06enXe+HW5da3LTCMq/bPk+ZXu9pj6xZU3/EM3KvM2aHqYR5S82gQFIuHLfhKgT+YKtu+Eu3aIgr/zoUg3VtZzOF3WOCsaJ+4tGG1hb23Ce64E49QNGda4Spq4yRhIANubs0W8Ft3e4qJCxPZtDVy21M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253649; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=u53SewZUJFqzSsC2W+n+bgnMuiWgV/L4vGgOG5ZWEXw=; b=A+nOGSRgwbPAQOAebyMZBuwLQISJ1cRSK4NK5jTP2bl1s2sHKaad6m83puMOH/DR0UEq4yTQhyqCSOxhRmim6tSD4c+VFoOyuhINphsJoDfaTdQAq9athG4bVf+sHy1F/QRltK1h7bJFoysC3Qfo0Bo6tno1h8Cml4eQHXURA3c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 169825364958091.66797904922225; Wed, 25 Oct 2023 10:07:29 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-sRhYFPSHMSGzW1rpFapbUQ-1; Wed, 25 Oct 2023 13:07:22 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0CA96185A787; Wed, 25 Oct 2023 17:07:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDA04C1596D; Wed, 25 Oct 2023 17:07:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D9B1A194658D; Wed, 25 Oct 2023 17:07:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 89168194658C for ; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6DFE0492BE7; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 74A13492BF1 for ; Wed, 25 Oct 2023 17:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253648; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=u53SewZUJFqzSsC2W+n+bgnMuiWgV/L4vGgOG5ZWEXw=; b=XG7asOovnrl5u6QTGQN4XLBdKc1pvG1WdfnfpIBzRvLCLu0lBFtqfZOudu052erthb0Bqs IWYmvRG0rjdKW2uRPjx9s6U0saeVdIsP8IpjARY27xCGjkoWFc78kxeUScCWpsIaR/ziTT zvG3Wi1Nb6fmBHYIfDR+iVkO0MgKghY= X-MC-Unique: sRhYFPSHMSGzW1rpFapbUQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 5/8] meson: Handle -Dtests=enabled with Clang Date: Wed, 25 Oct 2023 19:06:58 +0200 Message-ID: <20231025170701.239137-6-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253651376100009 Content-Type: text/plain; charset="utf-8"; x-default="true" There are some cases in which we automatically disable tests when using Clang as the compiler. If the user has explicitly asked for tests to be enabled, however, we should error out instead of silently disabling things. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Reviewed-by: Martin Kletzander --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index a372f99c21..ea8ee84ba0 100644 --- a/meson.build +++ b/meson.build @@ -2035,7 +2035,11 @@ if build_tests[0] and \ # If CLang doesn't support -fsemantic-interposition then our # mocking doesn't work. The best we can do is to not run the # test suite. - build_tests =3D [ false, '!!! Forcibly disabling tests because CLang la= cks -fsemantic-interposition. Update CLang or disable optimization !!!' ] + msg =3D 'Forcibly disabling tests because CLang lacks -fsemantic-interp= osition. Update CLang or disable optimization' + if get_option('tests').enabled() + error(msg) + endif + build_tests =3D [ false, '!!! @0@ !!!'.format(msg) ] endif =20 if get_option('expensive_tests').auto() --=20 2.41.0 From nobody Sun May 12 04:22:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253648; cv=none; d=zohomail.com; s=zohoarc; b=Zpbk4iadUQGLzEwqZC6Z5m9V3mhfJHD/s4YbXFmlyub9uS6GmtvfEk+GwTaoNtxm5JYwAPHI6+Ypfpc8WPp4GAjUlJC9cWptmGN06r4VPrYVSQ9bfAcZvOgNQc7Digthtfs+fjhUCQ22e9xNx2pFIXvxmj+T62C7tNAb6xJpGn0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253648; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=vIoilYF+s0a6dx9Q/fwAZa8jNmiuwkkcyjIDVk5cfIQ=; b=nKzkvDrMcm9Oo26pUv0dBPL5Oue8se3oNoHcVaBU8h0SJ3U/lgoqDXGGLY1P6pXsfU0stbWqXQpZ0yEJMEeAAaRMxw+jXAzBVcw9KgdbKDepvqBj1FQ0m6hJbt45ABVKvW1baJeNDVov+RJKOccL60l8deH73PiTvhU4qftFcy0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1698253648205334.4998804405377; Wed, 25 Oct 2023 10:07:28 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-583-oTbHqeorN4Wg8BstnIFzcg-1; Wed, 25 Oct 2023 13:07:22 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3D4B6811E96; Wed, 25 Oct 2023 17:07:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 296351C060AE; Wed, 25 Oct 2023 17:07:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1A07C194658D; Wed, 25 Oct 2023 17:07:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1882A19465B8 for ; Wed, 25 Oct 2023 17:07:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0A135492BEE; Wed, 25 Oct 2023 17:07:16 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1515C492BE7 for ; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253647; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vIoilYF+s0a6dx9Q/fwAZa8jNmiuwkkcyjIDVk5cfIQ=; b=dz9VVaUzna0K/QqcAR+FuXRXn29I6CGTsQotBceBNfMX2qm8+vKCJWjehAcPWOOY3GURT3 TYY3wUXQLcMmIdRtZELKapD++s/C+vDqRrHoSh4F/ezx1Y0Ky8KZnkMmVBz75GlSeM2JBs LU40zxCLXEpzSJ+1b4M6YTxDfFNQfec= X-MC-Unique: oTbHqeorN4Wg8BstnIFzcg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 6/8] meson: Make -Dexpensive_tests depend on -Dtests Date: Wed, 25 Oct 2023 19:06:59 +0200 Message-ID: <20231025170701.239137-7-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253649387100007 Content-Type: text/plain; charset="utf-8"; x-default="true" It only makes sense to enable expensive tests when tests are enabled. Disallow invalid configurations. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Reviewed-by: Martin Kletzander --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ea8ee84ba0..33027404f6 100644 --- a/meson.build +++ b/meson.build @@ -2043,9 +2043,12 @@ if build_tests[0] and \ endif =20 if get_option('expensive_tests').auto() - use_expensive_tests =3D not git + use_expensive_tests =3D not git and build_tests[0] else use_expensive_tests =3D get_option('expensive_tests').enabled() + if use_expensive_tests and not build_tests[0] + error('cannot enable expensive tests when tests are disabled') + endif endif =20 coverage_flags =3D [] --=20 2.41.0 From nobody Sun May 12 04:22:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253655; cv=none; d=zohomail.com; s=zohoarc; b=oAgTZejSCjjcdpRxETqGvGO+EVJvFJLKkJEu+Y6yauzP65of5mBicbbs/07qek7TZy6VWvfpnVcRm3a7016kB0QPIjk75ThD73fYv0/eakIZgSw/ppurqnCe47Pv7RDsVJbKXTjOGNMASeOmkKAld2n2UR1yGNyB02jwrIZS9RY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253655; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=jAEbT+xtgumOkoVbhmiNxHsjXus7N8TIPzwf+x333T0=; b=VOyM+gfx71aduZXJpGBMsEVHJSU1Rh3V6LCm6Goc3BWpzRMf07ELot+wfwZm5m2Uu3ndtA0613BoJrnICT1f2OOcBV1SuMH6UJOiKy6yIQCyAOlyvZdbI8/Uifd3/4WGywJ2ZTrGAY0yAhHyyi7gnyXtVHgxzF4dIiwVfKXPwHo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1698253655060527.9249416697029; Wed, 25 Oct 2023 10:07:35 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-319-JTgIHwpmNZGRCowptuUZJQ-1; Wed, 25 Oct 2023 13:07:25 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 58F9584B102; Wed, 25 Oct 2023 17:07:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43865492BE7; Wed, 25 Oct 2023 17:07:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 32FF7194658D; Wed, 25 Oct 2023 17:07:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B2D0B194658C for ; Wed, 25 Oct 2023 17:07:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A9150492BE7; Wed, 25 Oct 2023 17:07:18 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9B28492BE9 for ; Wed, 25 Oct 2023 17:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253653; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jAEbT+xtgumOkoVbhmiNxHsjXus7N8TIPzwf+x333T0=; b=UKlYKkb6H3cI2PoVu/04UvWIYN0CKnnXlx7ZNPcJKi9kEV6yXa0mD6wnPQCmk7GYWjDw+q fBoR0PxKRTCpwocjrk4LrFdZ41TAwFdlMNzgUB+PzWTUnyF3bUET+dncjKsnekPM6ClCNG lM5ZzVhmMlLRbtNH/Lc6IzquAIO6TR4= X-MC-Unique: JTgIHwpmNZGRCowptuUZJQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 7/8] meson: Disable all tests when tests are disabled Date: Wed, 25 Oct 2023 19:07:00 +0200 Message-ID: <20231025170701.239137-8-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253655479100014 Content-Type: text/plain; charset="utf-8"; x-default="true" Currently, passing -Dtests=3Ddisabled only disables a subset of tests: those that are written in C and thus require compilation. Other tests, such as the syntax-check ones and those that are implemented as scripts, are always enabled. There's a potentially dangerous consequence of this behavior: when tests are disabled, 'meson test' will succeed as if they had been enabled. No indication of this will be shown, so the user will likely make the reasonable assumption that everything is fine when in fact the significantly reduced coverage might be hiding failures. To solve this issues, disable *all* tests when asked to do so, and inject an intentionally failing test to ensure that 'meson test' doesn't succeed. Best viewed with 'git show -w'. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- build-aux/meson.build | 2 +- docs/html/meson.build | 20 ++-- docs/meson.build | 24 ++--- meson.build | 7 ++ src/access/meson.build | 16 ++-- src/meson.build | 204 +++++++++++++++++++++-------------------- 6 files changed, 144 insertions(+), 129 deletions(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index b5d88a4c44..84405c5ec8 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -1,6 +1,6 @@ # Skip syntax-check if not building from git because we get the list of fi= les # to check using git commands and it fails if we are not in git repository. -if git +if git and build_tests[0] flake8_path =3D '' if flake8_prog.found() flake8_path =3D flake8_prog.full_path() diff --git a/docs/html/meson.build b/docs/html/meson.build index c0a666f4e1..b4e81f8501 100644 --- a/docs/html/meson.build +++ b/docs/html/meson.build @@ -119,12 +119,14 @@ html_xslt_gen =3D [] =20 # --- end of XSLT processing --- =20 -test( - 'check-html', - xmllint_prog, - args: [ - '--nonet', '--noout', docs_html_paths, - ], - depends: docs_html_dep, - suite: 'script' -) +if build_tests[0] + test( + 'check-html', + xmllint_prog, + args: [ + '--nonet', '--noout', docs_html_paths, + ], + depends: docs_html_dep, + suite: 'script' + ) +endif diff --git a/docs/meson.build b/docs/meson.build index b20ef1c926..52763a8597 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -351,14 +351,16 @@ run_target( depends: install_web_deps, ) =20 -test( - 'check-html-references', - python3_prog, - args: [ - check_html_references_prog.full_path(), - '--webroot', - meson.project_build_root() / 'docs' - ], - env: runutf8, - suite: 'script' -) +if build_tests[0] + test( + 'check-html-references', + python3_prog, + args: [ + check_html_references_prog.full_path(), + '--webroot', + meson.project_build_root() / 'docs' + ], + env: runutf8, + suite: 'script' + ) +endif diff --git a/meson.build b/meson.build index 33027404f6..b30150d605 100644 --- a/meson.build +++ b/meson.build @@ -2085,6 +2085,13 @@ subdir('tools') =20 if build_tests[0] subdir('tests') +else + # Ensure that 'meson test' fails when tests are disabled, as opposed to + # misleadingly succeeding at doing absolutely nothing + test( + 'tests-are-disabled', + python3_prog, args: [ '-c', 'raise Exception("tests are disabled")' ], + ) endif =20 subdir('examples') diff --git a/src/access/meson.build b/src/access/meson.build index e65f17c0a2..6ca953c932 100644 --- a/src/access/meson.build +++ b/src/access/meson.build @@ -105,10 +105,12 @@ access_dep =3D declare_dependency( =20 generated_sym_files +=3D access_gen_sym =20 -test( - 'check-aclperms', - python3_prog, - args: [ check_aclperms_prog.full_path(), access_perm_h, files('viraccess= perm.c') ], - env: runutf8, - suite: 'script' -) +if build_tests[0] + test( + 'check-aclperms', + python3_prog, + args: [ check_aclperms_prog.full_path(), access_perm_h, files('viracce= ssperm.c') ], + env: runutf8, + suite: 'script' + ) +endif diff --git a/src/meson.build b/src/meson.build index 43146fe3c3..e25b3e5980 100644 --- a/src/meson.build +++ b/src/meson.build @@ -946,121 +946,123 @@ meson.add_install_script( =20 # Check driver files =20 -if host_machine.system() =3D=3D 'linux' - test( - 'check-symfile', - python3_prog, - args: [ check_symfile_prog.full_path(), libvirt_syms, libvirt_lib ], - env: runutf8, - suite: 'script' - ) - - if conf.has('WITH_REMOTE') +if build_tests[0] + if host_machine.system() =3D=3D 'linux' test( - 'check-admin-symfile', + 'check-symfile', python3_prog, - args: [ check_symfile_prog.full_path(), libvirt_admin_syms, libvirt_= admin_lib ], + args: [ check_symfile_prog.full_path(), libvirt_syms, libvirt_lib ], env: runutf8, suite: 'script' ) + + if conf.has('WITH_REMOTE') + test( + 'check-admin-symfile', + python3_prog, + args: [ check_symfile_prog.full_path(), libvirt_admin_syms, libvir= t_admin_lib ], + env: runutf8, + suite: 'script' + ) + endif endif -endif =20 -test( - 'check-symsorting', - python3_prog, - args: [ - check_symsorting_prog.full_path(), - meson.current_source_dir(), - files(sym_files, used_sym_files), - ], - env: runutf8, - suite: 'script' -) + test( + 'check-symsorting', + python3_prog, + args: [ + check_symsorting_prog.full_path(), + meson.current_source_dir(), + files(sym_files, used_sym_files), + ], + env: runutf8, + suite: 'script' + ) =20 -test( - 'check-admin-symsorting', - python3_prog, - args: [ - check_symsorting_prog.full_path(), - meson.current_source_dir(), - libvirt_admin_private_syms, - ], - env: runutf8, - suite: 'script' -) + test( + 'check-admin-symsorting', + python3_prog, + args: [ + check_symsorting_prog.full_path(), + meson.current_source_dir(), + libvirt_admin_private_syms, + ], + env: runutf8, + suite: 'script' + ) =20 -test( - 'check-drivername', - python3_prog, - args: [ - check_drivername_prog.full_path(), files(driver_headers), - files('libvirt_public.syms'), libvirt_qemu_syms, libvirt_lxc_syms, - ], - env: runutf8, - suite: 'script' -) + test( + 'check-drivername', + python3_prog, + args: [ + check_drivername_prog.full_path(), files(driver_headers), + files('libvirt_public.syms'), libvirt_qemu_syms, libvirt_lxc_syms, + ], + env: runutf8, + suite: 'script' + ) =20 -test( - 'check-admin-drivername', - python3_prog, - args: [ - check_drivername_prog.full_path(), libvirt_admin_public_syms, - ], - env: runutf8, - suite: 'script' -) + test( + 'check-admin-drivername', + python3_prog, + args: [ + check_drivername_prog.full_path(), libvirt_admin_public_syms, + ], + env: runutf8, + suite: 'script' + ) =20 -test( - 'check-driverimpls', - python3_prog, - args: [ check_driverimpls_prog.full_path(), driver_source_files ], - env: runutf8, - suite: 'script' -) + test( + 'check-driverimpls', + python3_prog, + args: [ check_driverimpls_prog.full_path(), driver_source_files ], + env: runutf8, + suite: 'script' + ) =20 -test( - 'check-aclrules', - python3_prog, - args: [ check_aclrules_prog.full_path(), files('remote/remote_protocol.x= '), stateful_driver_source_files ], - env: runutf8, - suite: 'script' -) + test( + 'check-aclrules', + python3_prog, + args: [ check_aclrules_prog.full_path(), files('remote/remote_protocol= .x'), stateful_driver_source_files ], + env: runutf8, + suite: 'script' + ) =20 -if augparse_prog.found() - foreach data : augeas_test_data - test( - 'check-augeas-@0@'.format(data['name']), - augparse_prog, - args: [ - '-I', data['srcdir'], - '-I', data['builddir'], - data['file'].full_path(), - ], - suite: 'script' - ) - endforeach -endif + if augparse_prog.found() + foreach data : augeas_test_data + test( + 'check-augeas-@0@'.format(data['name']), + augparse_prog, + args: [ + '-I', data['srcdir'], + '-I', data['builddir'], + data['file'].full_path(), + ], + suite: 'script' + ) + endforeach + endif =20 -if pdwtags_prog.found() and cc.get_id() !=3D 'clang' - foreach proto : check_protocols - lib =3D proto['lib'] - test( - 'check-@0@'.format(proto['name']), - python3_prog, - args: [ - check_remote_protocol_prog.full_path(), - proto['name'], - lib.name(), - lib.full_path(), - pdwtags_prog.full_path(), - files('@0@-structs'.format(proto['name'])), - ], - env: runutf8, - depends: [ lib ], - suite: 'script' - ) - endforeach + if pdwtags_prog.found() and cc.get_id() !=3D 'clang' + foreach proto : check_protocols + lib =3D proto['lib'] + test( + 'check-@0@'.format(proto['name']), + python3_prog, + args: [ + check_remote_protocol_prog.full_path(), + proto['name'], + lib.name(), + lib.full_path(), + pdwtags_prog.full_path(), + files('@0@-structs'.format(proto['name'])), + ], + env: runutf8, + depends: [ lib ], + suite: 'script' + ) + endforeach + endif endif =20 # configure pkg-config files for run script --=20 2.41.0 From nobody Sun May 12 04:22:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698253654; cv=none; d=zohomail.com; s=zohoarc; b=CLe7meAuHoi7E7LVYq07zdOIF2kDoIlgBpUCNQUBe/jpU6EvStIv0qbsaY5UJhaQ616UOzXoE/C2a3JGg3rHgSBleURr1Aswkd11CG9aNTJsstH7/ImvDG91xH3FazCK8PdV2EJ5Y0q2xGrUvjPXHoD3XaS0mxm8M9Hq28tynMA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253654; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ojxQqoHHuf2hzmk770A1dZaC90tW5eih8P4lcVm+5wY=; b=HppCrlU8lwn8aEmyGi+RuTvR2VFI4zR9ooRa3p3EVb4ffPmHs5VnvR5Z/KIJ92rTrXOXFZDuViCrMSY7wDMRJrRu94PeY7QaH0dQkPyy6+bgbICBk2KeZwVOH2rfqCxNnmAVi9xdXkY4Ao3mYaG+095oiOQq+fMnxhFJ61gDPHg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1698253654084706.8652691041274; Wed, 25 Oct 2023 10:07:34 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-121-iLDq7CdrMmqeKciYAz1neQ-1; Wed, 25 Oct 2023 13:07:28 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DA982811E92; Wed, 25 Oct 2023 17:07:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C48B9C15983; Wed, 25 Oct 2023 17:07:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 86846194658D; Wed, 25 Oct 2023 17:07:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6655D194658D for ; Wed, 25 Oct 2023 17:07:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 551B7492BE7; Wed, 25 Oct 2023 17:07:20 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5352D492BE8 for ; Wed, 25 Oct 2023 17:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253652; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ojxQqoHHuf2hzmk770A1dZaC90tW5eih8P4lcVm+5wY=; b=GcAlXqFXqbkYcDlbQTHKcmrFUfOdQcDyYLs16Qe9EnLnfCVtQt54ckYqrtK6YbcMuI0Spq lhR2B3b8rvBfHkBz/Lz7+PN+smoBIt+3UbjeW3FBhQceK0OtU7/CIyhSqFQpVzqSSoEC+P /1GpGqUHAeQgYLhgAjiLlfgZq7ok+Tc= X-MC-Unique: iLDq7CdrMmqeKciYAz1neQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 8/8] meson: Rename build_tests -> tests_enabled Date: Wed, 25 Oct 2023 19:07:01 +0200 Message-ID: <20231025170701.239137-9-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253655446100013 Content-Type: text/plain; charset="utf-8"; x-default="true" Given that this variable now controls not just whether C tests are built, but also whether any test at all is executed, the new name is more appropriate. Update the description for the corresponding meson option accordingly. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Reviewed-by: Martin Kletzander --- build-aux/meson.build | 2 +- docs/html/meson.build | 2 +- docs/meson.build | 2 +- meson.build | 14 +++++++------- meson_options.txt | 2 +- src/access/meson.build | 2 +- src/meson.build | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index 84405c5ec8..f96d46c445 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -1,6 +1,6 @@ # Skip syntax-check if not building from git because we get the list of fi= les # to check using git commands and it fails if we are not in git repository. -if git and build_tests[0] +if git and tests_enabled[0] flake8_path =3D '' if flake8_prog.found() flake8_path =3D flake8_prog.full_path() diff --git a/docs/html/meson.build b/docs/html/meson.build index b4e81f8501..e2758ed177 100644 --- a/docs/html/meson.build +++ b/docs/html/meson.build @@ -119,7 +119,7 @@ html_xslt_gen =3D [] =20 # --- end of XSLT processing --- =20 -if build_tests[0] +if tests_enabled[0] test( 'check-html', xmllint_prog, diff --git a/docs/meson.build b/docs/meson.build index 52763a8597..87d728213c 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -351,7 +351,7 @@ run_target( depends: install_web_deps, ) =20 -if build_tests[0] +if tests_enabled[0] test( 'check-html-references', python3_prog, diff --git a/meson.build b/meson.build index b30150d605..e51ba9231e 100644 --- a/meson.build +++ b/meson.build @@ -2027,8 +2027,8 @@ conf.set_quoted('TLS_PRIORITY', get_option('tls_prior= ity')) =20 # test options =20 -build_tests =3D [ not get_option('tests').disabled() ] -if build_tests[0] and \ +tests_enabled =3D [ not get_option('tests').disabled() ] +if tests_enabled[0] and \ cc.get_id() =3D=3D 'clang' and \ not supported_cc_flags.contains('-fsemantic-interposition') \ and get_option('optimization') !=3D '0' @@ -2039,14 +2039,14 @@ if build_tests[0] and \ if get_option('tests').enabled() error(msg) endif - build_tests =3D [ false, '!!! @0@ !!!'.format(msg) ] + tests_enabled =3D [ false, '!!! @0@ !!!'.format(msg) ] endif =20 if get_option('expensive_tests').auto() - use_expensive_tests =3D not git and build_tests[0] + use_expensive_tests =3D not git and tests_enabled[0] else use_expensive_tests =3D get_option('expensive_tests').enabled() - if use_expensive_tests and not build_tests[0] + if use_expensive_tests and not tests_enabled[0] error('cannot enable expensive tests when tests are disabled') endif endif @@ -2083,7 +2083,7 @@ subdir('src') =20 subdir('tools') =20 -if build_tests[0] +if tests_enabled[0] subdir('tests') else # Ensure that 'meson test' fails when tests are disabled, as opposed to @@ -2307,7 +2307,7 @@ endif misc_summary =3D { 'Warning Flags': supported_cc_flags, 'docs': gen_docs, - 'tests': build_tests, + 'tests': tests_enabled, 'DTrace': conf.has('WITH_DTRACE_PROBES'), 'firewalld': conf.has('WITH_FIREWALLD'), 'firewalld-zone': conf.has('WITH_FIREWALLD_ZONE'), diff --git a/meson_options.txt b/meson_options.txt index 7c428a9eb0..a0928102bf 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,7 +10,7 @@ option('git_werror', type: 'feature', value: 'auto', desc= ription: 'use -Werror i option('rpath', type: 'feature', value: 'auto', description: 'whether to i= nclude rpath information in installed binaries and libraries') option('docdir', type: 'string', value: '', description: 'documentation in= stallation directory') option('docs', type: 'feature', value: 'auto', description: 'whether to ge= nerate documentation') -option('tests', type: 'feature', value: 'auto', description: 'whether to b= uild tests') +option('tests', type: 'feature', value: 'auto', description: 'whether to b= uild and run tests') =20 =20 # build dependencies options diff --git a/src/access/meson.build b/src/access/meson.build index 6ca953c932..fc5ba5b342 100644 --- a/src/access/meson.build +++ b/src/access/meson.build @@ -105,7 +105,7 @@ access_dep =3D declare_dependency( =20 generated_sym_files +=3D access_gen_sym =20 -if build_tests[0] +if tests_enabled[0] test( 'check-aclperms', python3_prog, diff --git a/src/meson.build b/src/meson.build index e25b3e5980..5fc4d03b4a 100644 --- a/src/meson.build +++ b/src/meson.build @@ -946,7 +946,7 @@ meson.add_install_script( =20 # Check driver files =20 -if build_tests[0] +if tests_enabled[0] if host_machine.system() =3D=3D 'linux' test( 'check-symfile', --=20 2.41.0