From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gKBrI9ph7GGYggAAgWs5BA (envelope-from ) for ; Sat, 22 Jan 2022 20:58:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aEHMINph7GHtFAEA9RJhRA (envelope-from ) for ; Sat, 22 Jan 2022 20:58:18 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 49EA83D440 for ; Sat, 22 Jan 2022 20:58:16 +0100 (CET) Received: from localhost ([::1]:37056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBMWc-0000I4-Sf for larch@yhetil.org; Sat, 22 Jan 2022 14:58:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBMWQ-0000Hp-14 for guix-patches@gnu.org; Sat, 22 Jan 2022 14:58:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nBMWP-0001TY-NL for guix-patches@gnu.org; Sat, 22 Jan 2022 14:58:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nBMWP-00052w-N6 for guix-patches@gnu.org; Sat, 22 Jan 2022 14:58:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports, Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Jan 2022 19:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53389 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 53389@debbugs.gnu.org Received: via spool by 53389-submit@debbugs.gnu.org id=B53389.164288146319369 (code B ref 53389); Sat, 22 Jan 2022 19:58:01 +0000 Received: (at 53389) by debbugs.gnu.org; 22 Jan 2022 19:57:43 +0000 Received: from localhost ([127.0.0.1]:37989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBMW7-00052L-2C for submit@debbugs.gnu.org; Sat, 22 Jan 2022 14:57:43 -0500 Received: from xavier.telenet-ops.be ([195.130.132.52]:36182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBMW5-00052C-2U for 53389@debbugs.gnu.org; Sat, 22 Jan 2022 14:57:42 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id lvxe2601o4UW6Th01vxfyf; Sat, 22 Jan 2022 20:57:39 +0100 Message-ID: <729a1d056ccd32c52e45c667749f1e7f0981ae42.camel@telenet.be> From: Maxime Devos Date: Sat, 22 Jan 2022 20:57:34 +0100 In-Reply-To: <87lez7zpgf.fsf_-_@gnu.org> References: <6b1c1d98514b2547907a81a04c1241d9b865d6fa.camel@telenet.be> <20220120130849.292178-1-maximedevos@telenet.be> <87lez7zpgf.fsf_-_@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-mY+pwp5qjw6CQI30/UYy" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642881459; bh=wNzKEPu8TodLcZOjebj495BUvYWiDuR2JHFhUub+3tA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=f929oQtAe70vZ9EZaYWdpRUX4J05xxAERWUwSV48LvNfjDa9AFrM8/r4XNWPsqubG FxU/vwqfwgBZEEXGMwITvcR++3gjigYlXVhHdTSDeLR46jwXMbc4imGpBmmCCsVj5I JR3H4W+9jpwKcntsmx0QWn3msgnZi/ZUzU8wPYmvA6EIgqw6BCQS0+Lr9MNPyNmalR rDPZXcNz+wn2eP2xtzkIZ6UYXpfIXGkNCzSuBypr7vEis7yZDjRvb75phI194B5gRO dqpTg59yGBkcyFxPayxEkZzsI8rqv+kL6/ANnzLAQIQHVfM8JlVOlUGgcC+PlCxwP1 4JtnVUPH6w01A== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642881496; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=wNzKEPu8TodLcZOjebj495BUvYWiDuR2JHFhUub+3tA=; b=mB20N4t35quJobwdhh96CIWGpqyv9JAAYTkFfJRnfEjuG3qPJ6eoKf8GXQuasKvM/5Yh3z zzAot9z52bd6J6UGeD8niTZmxa/ljtDLSJjqBhi5oaGRrRYRgZqaVkU+t/h7KqP8KWrMki k3E2cNjMkBZIeV7W01pjFUd2t4GNAG7z66no9ZZwNx9rkn4tGTZi8W21FNrCyYw3E3+3yE cuhac3N7WpfpH4Bh8uaYYV8ls7kZndRcc1m2yx5N6BB2GVUFy5qxj2wAvIgOf0SgWtaSv/ bSGgHUvxMxYD6kwZiSvsMG2TTSEPx/oY5v2HIIGkJNZoi/2BDmwgYIW6lLnlgg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642881496; a=rsa-sha256; cv=none; b=FlBe+HqrlQXCfYU1ei0uH3cuqTTTZmmrnqGR6Q8CsUWP73D1I3OrrgA8fu7+vSu/uoh+M8 E9ukl848T6Dk6m+5cGvTwwKwRJAHEiwkpaK3neM6F7XXpnOjsnE5LcZ3Glnc9yPl4fd0wi ovB/XJskkGr8Kn5NVTsUPVdGBhddHssgBuZYsfLyDXddxvgVWfeozOsMcgm5ZhQ7PRIc1X 3pXO7LucVa8sXuDp+yeYsK+LBrtJCjj0aEC1XV+tLScOAz3StGbC+G5QwdkZzuvX4r6J4C ITzu8pyJyeF+NwGn6VTBZYq0JukmYJjtuV6DYLWFEFQu/PcP408B8cblbtp52Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=f929oQtA; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=f929oQtA; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 49EA83D440 X-Spam-Score: -4.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: iPo9hkVl20s/ --=-mY+pwp5qjw6CQI30/UYy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s schreef op za 22-01-2022 om 17:48 [+0100]: > My first reaction was: have we gone overboard?=C2=A0 :-) >=20 > Since it=E2=80=99s an internal module and a test helper, I=E2=80=99m in f= avor of keeping > it as simple as possible. >=20 I don't see what it matters that this module is only available from a git checkout (or extracted tarball) and that it is only used by tests. Keeping things simple is good, but making it simpler in such a way that it becomes unusable to some tests (tests/minetest.scm) somewhat defeats the purpose of the test helper. > =C2=A0 Can we keep a single =E2=80=98with-http-server=E2=80=99 form > that would cover all cases? We have a single form that covers all cases: with-http-server*. However, the full power of the functinal with-http-server*, accepting an arbitrary mapping from requests to responses, often isn't necessary. For those cases, we have the declarative with-http-server, which is quite a bit simpler to use, but much less flexible. We could remove 'with-http-server' and keep a single macro 'with-http-server*' but I don't think that's what you were going for. This seems a bit like trivial-build-system/copy-build-system. trivial-build-system is rather complicated to use, but can in theory do anything. copy-build-system is rather limited in what it can do, but when it is suitable to the problem, it is very easy to use. There is no attempt to somehow shove everything trivial-build-system can do into copy-build-system. There's also the option of letting 'call-with-http-server' test if the (responses+data) is a procedure or a list, and in the first case behave like the old 'with-http-server*' and in the second case like 'with-http-server'. This overloading doesn't seem great though, I would rather have two separate procedures for two separate APIs -- albeit with one implemented with the other. > We can update existing tests to include the expected URL path (or a > wildcard, if needed), instead of keeping several forms.=C2=A0 We don=E2= =80=99t need > to worry about backward compatibility at all. Always including the URL path in the declarative forms (with-http-server) seems good to me, but it would be a lot of work -- actually, on second though, I ran "git grep -F with-http-server | wc -l" and there were 51 hits, which seems doable. Let's do that in the v2. However, the declarative form is too limiting and not sufficiently expressive for some tests (tests/minetest.scm) and tests/minetest.scm doesn't have any use for wildcards, so with-http-server remains unsuitable for some tests. Greetings, Maxime. --=-mY+pwp5qjw6CQI30/UYy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYexhrhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ie9AQDQKmBJ5Ftew3o8q8NbB660J8ak i1Z8FMzEqsZzVMp4yQEAxdDivaUzzO1SNPMC1GRLa9I8g2IAubDNmCJyu41o+Qw= =BfMF -----END PGP SIGNATURE----- --=-mY+pwp5qjw6CQI30/UYy--