From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sEbLOP73qmIy2gAAbAwnHQ (envelope-from ) for ; Thu, 16 Jun 2022 11:29:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GLPEOP73qmIbugAA9RJhRA (envelope-from ) for ; Thu, 16 Jun 2022 11:29:34 +0200 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 A247539DFE for ; Thu, 16 Jun 2022 11:29:34 +0200 (CEST) Received: from localhost ([::1]:60896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1loj-0007TS-PT for larch@yhetil.org; Thu, 16 Jun 2022 05:29:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1loE-0007SJ-GM for guix-patches@gnu.org; Thu, 16 Jun 2022 05:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1loE-0002JV-8F for guix-patches@gnu.org; Thu, 16 Jun 2022 05:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1loD-0002Sr-Ur for guix-patches@gnu.org; Thu, 16 Jun 2022 05:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55954] [PATCH] gnu: public-inbox: Fixes to allow the testsuite to run Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Jun 2022 09:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55954 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Thiago Jung Bauermann Cc: 55954@debbugs.gnu.org Received: via spool by 55954-submit@debbugs.gnu.org id=B55954.16553716909402 (code B ref 55954); Thu, 16 Jun 2022 09:29:01 +0000 Received: (at 55954) by debbugs.gnu.org; 16 Jun 2022 09:28:10 +0000 Received: from localhost ([127.0.0.1]:40753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1lnL-0002RX-9f for submit@debbugs.gnu.org; Thu, 16 Jun 2022 05:28:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1ln9-0002QM-OH for 55954@debbugs.gnu.org; Thu, 16 Jun 2022 05:28:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1ln3-00029G-8k; Thu, 16 Jun 2022 05:27:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=dZ+rNvOdEuQfuQ6MoY+q4kiAYS66gD9OY+zJHSvELuE=; b=YN5h+nkp4ursuuOlwPG/ L8J4PaPK/r3ULmNvNU5yuksL+cy9LsDFUH5I0wtV0/fk8j97t7Bp5vp112qtXH1GElr5rTdHSHDEE Idw6p7EJZHOyhjNj2vvmkXH2pKdksXXUtBAKRawBx5A22f1w0cv6yA62wFqZtpCNeSy0qtRNduMOg oGSwzhlMtaYu5KVhhpqyO8XE5PLSJ1z3+9VMN3dfLzEvFhgm6XZtuL8CkDLZpbju7ZDko5JFtYHSr TYaMQhYhiAbKs08/zBUQ1a9YELDdW0jpJqpck+wj0SDPzZYU8tBfQk6qqJ4ev1hrXuaC3eIUijo6A fKA0asjJIFa9xA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55629 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1ln1-0000rh-1a; Thu, 16 Jun 2022 05:27:49 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220614033223.377744-1-bauermann@kolabnow.com> Date: Thu, 16 Jun 2022 11:27:44 +0200 In-Reply-To: <20220614033223.377744-1-bauermann@kolabnow.com> (Thiago Jung Bauermann's message of "Tue, 14 Jun 2022 00:32:23 -0300") Message-ID: <87a6adlzzj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655371774; 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: content-transfer-encoding:content-transfer-encoding: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=dZ+rNvOdEuQfuQ6MoY+q4kiAYS66gD9OY+zJHSvELuE=; b=cLHEHBRJAGy3E4X+7JFVtWY1iLlHlHKK4sQ6vw+55andQ0kAFxZzttxzKmQhFbA5EIpiGd PXN4JzyaMik3An/lUxRqmCMTrx7dl1FuCWWK4+U+lNJ4TuuP/0MOrPIVkxC8xj6AiFuGvZ 2cuyFfu0vssWoLFTialilgMWAQHCMTbj5Q9h0RAiHL2cedR5u4U5NlSZ0nVeA04A3HFwfi 87jRzuKU/s/PvlkLsnXYUcJnRoI6/LFXZZcNy4d5dOCxSCYxNiLwg78Zz+8uhL8cnqgAu3 SnHQ06Ym/1QZ3eAqUVt7cQpOS4tm4ZafeAL/dBWj9W9Oz0sA3misLxGIKhGpIQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655371774; a=rsa-sha256; cv=none; b=Mt4Oox1T7Zl6yip3eJJokB/hqW+9jQIYcDWy2HcBShSIb+WL5XMz5CaoUcA2NerZZ82cfC x1tBQ1aXiMKT6RGwRicWJKiNyhPpubGMhZim8el24Ylw6UqpryC/gMMjEFrev9b0YGNhQa p0jpmU/HVWGBCdkWp7afUBPZ2hdXe7+buE7xXGGTnvrRDm6Ug/cTPxEIbcg9YHk6qrZnzZ GfbWpgSW0XaM1HRzqJjTU70smL8aYtpIXavPWzrBeytuPKfZ9WE1MBHidO0J3Rz+zs41hF 9W8/8IAvUV1x7YmDNzF+5To+/9NUwi2aFJnGoTuoVRObw2L3JY94JOsdvfupNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YN5h+nkp; dmarc=pass (policy=none) header.from=gnu.org; 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.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YN5h+nkp; dmarc=pass (policy=none) header.from=gnu.org; 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: A247539DFE X-Spam-Score: -4.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: vEzvnfC+ySZO Hi, Thiago Jung Bauermann skribis: > This patch makes the public-inbox testsuite pass. Some tests are skipped, > so the test coverage could likely be increased with more massaging. > > Perhaps the most significant change is using tini to run the testsuite so > that the testsuite's sub-processes are reaped. The =E2=80=98check=E2=80= =99 phase is based on > the one from the mutter package. Thanks to Maxim Cournoyer for pointing o= ut > this solution. > > * gnu/packages/patches/public-inbox-fix-spawn-test.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add new patch. > * gnu/packages/mail.scm (public-inbox)[source]: Add new patch. > [arguments]<#:tests?>: Remove argument. > <#:imported-modules>: Add argument. > <#:modules>: Likewise. > <#:phases>{qualify-paths}: Substitute path for =E2=80=98/bin/cp=E2=80=99. > {pre-check}: Don't skip httpd-unix.t test. Remove unnecessary path > substitutions for =E2=80=9Cenv=E2=80=9D and =E2=80=9C/bin/sh=E2=80=9D. > {check}: Replace with custom version that launches the tests under tini. > [native-inputs]: Add tini. Applied, thanks! [...] > + (replace 'check > + (lambda* (#:key target > + (tests? (not target)) (test-flags '()) > + #:allow-other-keys) > + (if tests? > + (match (primitive-fork) > + (0 ;child process > + ;; lei tests build UNIX domain sockets in the tempor= ary > + ;; directory, but the path of those sockets can be a= t most > + ;; 108 chars and Guix' default value for the variabl= es > + ;; below already use 47 chars. Use the shortest temp= orary > + ;; path possible to avoid hitting the limit. > + (setenv "TEMP" "/tmp") > + (setenv "TEMPDIR" "/tmp") > + (setenv "TMP" "/tmp") > + (setenv "TMPDIR" "/tmp") > + > + ;; Use tini so that signals are properly handled and > + ;; doubly-forked processes get reaped; otherwise, > + ;; lei-daemon is kept as a zombie and the testsuite > + ;; fails thinking that it didn't quit as it should. > + (set-child-subreaper!) > + (apply execlp "tini" "--" > + "make" "check" test-flags)) > + (pid > + (match (waitpid pid) > + ((_ . status) > + (unless (zero? status) > + (error "`make check' exited with status" status= )))))) It=E2=80=99s a bummer that we have to do all this. Would this work: (replace 'check (lambda _ (sigaction SIGINT SIG_DFL) (sigaction SIGTERM SIG_DFL) (sigaction SIGCHLD (lambda _ (waitpid WAIT_ANY WNOHANG))) ;; Ugly hack to make sure signal handler asyncs get a chance ;; to run while we=E2=80=99re in =E2=80=98waitpid=E2=80=99 during the= =E2=80=9Cmake check=E2=80=9D ;; invocation. (sigaction SIGALRM (lambda _ (alarm 1))) (alarm 1))) ? If not, the solution you propose LGTM. Thanks, Ludo=E2=80=99.