From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS54825 147.75.48.0/24 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C86C51F451 for ; Wed, 10 Jan 2024 09:02:21 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm2 header.b=U9szqsY7; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=7fImizCg; dkim-atps=neutral Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0C609B23E91 for ; Wed, 10 Jan 2024 09:02:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B53E43C689; Wed, 10 Jan 2024 09:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="U9szqsY7"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="7fImizCg" Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A65AD3C466 for ; Wed, 10 Jan 2024 09:01:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 8F1543200A02; Wed, 10 Jan 2024 04:01:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 10 Jan 2024 04:01:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1704877314; x=1704963714; bh=AHUBPTRIdk 2XQ23ZlFiS9PVLuF8+pbs7IAZIcTdf0Do=; b=U9szqsY7OkGz5B7rlsHHTekfYW ylVCAhh5M3v2F2neVNi+khAUfH9CScVZkHQGxl2wyU8xfAReX0v3PX/5ev1xiTUV 4M3aD1jvNYGkO5VqJHe3kANIolAroEA8Sl1bFy62Lkvps1BNm06aMUI4B2FoCok4 O+yiP2qVMTdcUHWQC2rENwvDES6NkGFfj79Hn0oJ5vxCU6rMA66uCoETjY/CtO9Y InXO92ySK7tUZiwXjJBc+rflbe/rqyoq2TcrbfMloxUy6nKhwya0ra+MupGIDli+ iGBtI7MowfGVQ+DMVcwUU1jpK9DpGGd+Q2TVL4cRWlzc0POk2Lfhin/V+PoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704877314; x=1704963714; bh=AHUBPTRIdk2XQ23ZlFiS9PVLuF8+ pbs7IAZIcTdf0Do=; b=7fImizCgt6J2i3p8AAbZpphcWHLYjJGSp2GMF3asGhdd 2bKLveQkZRXFCQ64wLnr7/OLonaHO0IgW1FIVUkLrO1yeGG0EXq8nTGarGJzMSiU 5F4ZpKJEaeB4MTEVpGn/tl3ltOC0xdcAyCgSAN7YtnuGQIDQg65SzxGosa6PZ68b Cj9X2vtp4g660zpp5JAqpraaJtQnkfQMxCAzDL0tyxn58QNPm87eqP/GRUkf7ebB EAtT6r/NFPSAT1+RdliX1lBCj00AVJBbIWGPHqOHb5TlAXUyo991UqvwyS/RJRHT 8FsuvoZU/HF0FgiXPkfJ1OTRr35OYRoppzpX6sgBwA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeitddguddviecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Jan 2024 04:01:53 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id ac0f7ef1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 10 Jan 2024 08:59:13 +0000 (UTC) Date: Wed, 10 Jan 2024 10:01:51 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Taylor Blau , Eric Sunshine Subject: [PATCH v2 4/6] t1419: mark test suite as files-backend specific Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gml0pbnVoYVohA7O" Content-Disposition: inline In-Reply-To: --gml0pbnVoYVohA7O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable With 59c35fac54 (refs/packed-backend.c: implement jump lists to avoid excluded pattern(s), 2023-07-10) we have implemented logic to handle excluded refs more efficiently in the "packed" ref backend. This logic allows us to skip emitting refs completely which we know to not be of any interest to the caller, which can avoid quite some allocations and object lookups. This was wired up via a new `exclude_patterns` parameter passed to the backend's ref iterator. The backend only needs to handle them on a best effort basis though, and in fact we only handle it for the "packed-refs" file, but not for loose references. Consequently, all callers must still filter emitted refs with those exclude patterns. The result is that handling exclude patterns is completely optional in the ref backend, and any future backends may or may not implement it. Let's thus mark the test for t1419 to depend on the REFFILES prereq. An alternative would be to introduce a new prereq that tells us whether the backend under test supports exclude patterns or not. But this does feel a bit overblown: - It would either map to the REFFILES prereq, in which case it feels overengineered because the prereq is only ever relevant to t1419. - Otherwise, it could auto-detect whether the backend supports exclude patterns. But this could lead to silent failures in case the support for this feature breaks at any point in time. It should thus be good enough to just use the REFFILES prereq for now. If future backends ever grow support for exclude patterns we can easily add their respective prereq as another condition for this test suite to execute. Signed-off-by: Patrick Steinhardt --- t/t1419-exclude-refs.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/t1419-exclude-refs.sh b/t/t1419-exclude-refs.sh index 5d8c86b657..1359574419 100755 --- a/t/t1419-exclude-refs.sh +++ b/t/t1419-exclude-refs.sh @@ -8,6 +8,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME TEST_PASSES_SANITIZE_LEAK=3Dtrue . ./test-lib.sh =20 +if test_have_prereq !REFFILES +then + skip_all=3D'skipping `git for-each-ref --exclude` tests; need files backe= nd' + test_done +fi + for_each_ref__exclude () { GIT_TRACE2_PERF=3D1 test-tool ref-store main \ for-each-ref--exclude "$@" >actual.raw --=20 2.43.GIT --gml0pbnVoYVohA7O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF9hrgiFbCdvenl/rVbJhu7ckPpQFAmWeXP4ACgkQVbJhu7ck PpT+4g/+I5kBri/RuFSDpXiXXi1ErlpHtLJIkfAi+BveXZIaFKabjRJYxh/o6ilt LC4umgq5LqWSsk7iriBsD1aJgqjfB82LqZ4bl5fto3rVNAaV/kmZexuS4yBtvGFd maDF+mqchCnu8H8hGI4Eirl2nAOhl0iGWFl1cdlye3n1ds+o3IxVdDTrJBWh1yfX KHkZfsvhE7n/xAG0DJId1sgv/DiAdpYD1G7eyNPcBcbqscVA/EeDhbLpPOhV3wXD SRb+0iNy2SjbgqTrc8m777la+yz4vJiasFOipblaQKBj8dQXJNumz/XnHeDEiZ79 64DRwP+UEhwtCPUUn61gRgB+XyvJrybzl9lmHJTVmLIka1GneSbNvC5+nua0hwWy LI/+BNWviyAWXYISWmoGw1MN8xGg5uwhwy479Rn3KThfsHYGcGKSrySZRMNgob3o iKTkfA+iC35Qs/vOFa2mj+dGaE6OjALddIIW391CVRGPkd8CkNooKd20FRYglt8y 1Rs4C6UrtEbJgyR/NGFnDSH7Ts8eT6zbR4jOFRzBoLUsBbNMOFDvy8UPoOXd4bpf V7d3RkGYDQ1JSGIEnZkHyVnS+lehZQdfsmy8gQfH6GculnWv5rBUp3pJTma1U76a vE0VjKLpPUrEL99aWFPcEFsApCeNqXeoItnPO5WSIdrdKFQvt/4= =J4xi -----END PGP SIGNATURE----- --gml0pbnVoYVohA7O--