From unknown Sun Jun 22 22:43:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#39211 <39211@debbugs.gnu.org> To: bug#39211 <39211@debbugs.gnu.org> Subject: Status: [PATCH 1/1] 00-repl-server.test: don't use fixed path for socket Reply-To: bug#39211 <39211@debbugs.gnu.org> Date: Mon, 23 Jun 2025 05:43:41 +0000 retitle 39211 [PATCH 1/1] 00-repl-server.test: don't use fixed path for soc= ket reassign 39211 guile submitter 39211 Rob Browning severity 39211 normal tag 39211 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 20 22:21:57 2020 Received: (at submit) by debbugs.gnu.org; 21 Jan 2020 03:21:57 +0000 Received: from localhost ([127.0.0.1]:46359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itk73-0001Xh-Br for submit@debbugs.gnu.org; Mon, 20 Jan 2020 22:21:57 -0500 Received: from lists.gnu.org ([209.51.188.17]:59276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itk71-0001XZ-9B for submit@debbugs.gnu.org; Mon, 20 Jan 2020 22:21:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54000) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itk70-0005xf-5n for bug-guile@gnu.org; Mon, 20 Jan 2020 22:21:55 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itk6z-0008Jp-5A for bug-guile@gnu.org; Mon, 20 Jan 2020 22:21:54 -0500 Received: from defaultvalue.org ([45.33.119.55]:58108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itk6z-0008Iv-0o for bug-guile@gnu.org; Mon, 20 Jan 2020 22:21:53 -0500 Received: from trouble.defaultvalue.org (localhost [127.0.0.1]) (Authenticated sender: rlb@defaultvalue.org) by defaultvalue.org (Postfix) with ESMTPSA id 5963D2009C for ; Mon, 20 Jan 2020 21:21:51 -0600 (CST) Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 1BF8214E071; Mon, 20 Jan 2020 21:22:14 -0600 (CST) From: Rob Browning To: bug-guile@gnu.org Subject: [PATCH 1/1] 00-repl-server.test: don't use fixed path for socket Date: Mon, 20 Jan 2020 21:22:14 -0600 Message-Id: <20200121032214.1908896-1-rlb@defaultvalue.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.33.119.55 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Even setting aside any security concerns, this caused tests to fail if you ran them as a given user and then ran them again as another user. --- It didn't look like we have anything like mkdtemp or I'd have used it instead. And it looks like this might apply to, and it would be nice to have something like it on stable-2.2 as well. test-suite/tests/00-repl-server.test | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/test-suite/tests/00-repl-server.test b/test-suite/tests/00-r= epl-server.test index 54f518a66..4324f7371 100644 --- a/test-suite/tests/00-repl-server.test +++ b/test-suite/tests/00-repl-server.test @@ -24,13 +24,25 @@ #:use-module (web request) #:use-module (test-suite lib)) =20 +(define (make-tempdir) + (let loop ((try 0) + (n (random:uniform))) + (let* ((path (string-append "/tmp/repl-server-test-" (number->string= n))) + (dir (false-if-exception (mkdir path #o700)))) + (cond + (dir path) + ((> try 10) + (error "Unable to create directory in /tmp for 00-repl-server.te= st")) + (else (loop (1+ try) (random:uniform))))))) + (define (call-with-repl-server proc) "Set up a REPL server in a separate process and call PROC with a socket connected to that server." - (let ((sockaddr (make-socket-address AF_UNIX "/tmp/repl-server")) - (client-socket (socket AF_UNIX SOCK_STREAM 0))) - (false-if-exception - (delete-file (sockaddr:path sockaddr))) + (let* ((tmpdir (make-tempdir)) + (sockaddr (make-socket-address AF_UNIX (string-append tmpdir "/= repl-server"))) + (client-socket (socket AF_UNIX SOCK_STREAM 0))) + (false-if-exception (delete-file (sockaddr:path sockaddr))) + (false-if-exception (rmdir tmpdir)) =20 ;; The REPL server requires thread. The test requires fork. (unless (and (provided? 'threads) (provided? 'fork)) --=20 2.24.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 21 11:51:12 2020 Received: (at 39211) by debbugs.gnu.org; 21 Jan 2020 16:51:12 +0000 Received: from localhost ([127.0.0.1]:48342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itwk8-0006gF-LK for submit@debbugs.gnu.org; Tue, 21 Jan 2020 11:51:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itwk2-0006fg-JP for 39211@debbugs.gnu.org; Tue, 21 Jan 2020 11:51:06 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itwjx-000824-6N; Tue, 21 Jan 2020 11:50:57 -0500 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=35186 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1itwjw-0006iS-GU; Tue, 21 Jan 2020 11:50:57 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Rob Browning Subject: Re: bug#39211: [PATCH 1/1] 00-repl-server.test: don't use fixed path for socket References: <20200121032214.1908896-1-rlb@defaultvalue.org> Date: Tue, 21 Jan 2020 17:50:54 +0100 In-Reply-To: <20200121032214.1908896-1-rlb@defaultvalue.org> (Rob Browning's message of "Mon, 20 Jan 2020 21:22:14 -0600") Message-ID: <8736c8da8h.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39211 Cc: 39211@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Rob, Rob Browning skribis: > Even setting aside any security concerns, this caused tests to fail if > you ran them as a given user and then ran them again as another user. Oops, indeed. > It didn't look like we have anything like mkdtemp or I'd have used it > instead. And it looks like this might apply to, and it would be nice > to have something like it on stable-2.2 as well. I thought we had =E2=80=98mkdtemp!=E2=80=99 but it=E2=80=99s just in Guix. = :-/ Well we can go that way for now, perhaps with a FIXME comment suggesting the use of =E2=80=98mkdtemp!=E2=80=99 once it=E2=80=99s available. Also please make sure to include a ChangeLog-style commit log. Apart from that it LGTM! I think we should add =E2=80=98mkdtemp!=E2=80=99 to libguile in a separate = commit; it=E2=80=99s OK to _add_ procedures during a stable release. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 06 09:44:29 2020 Received: (at 39211-done) by debbugs.gnu.org; 6 Mar 2020 14:44:29 +0000 Received: from localhost ([127.0.0.1]:44327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAEDF-0002QE-7r for submit@debbugs.gnu.org; Fri, 06 Mar 2020 09:44:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAEDE-0002Q2-94 for 39211-done@debbugs.gnu.org; Fri, 06 Mar 2020 09:44:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jAED9-0005Qm-3A; Fri, 06 Mar 2020 09:44:23 -0500 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60282 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jAED8-0004YT-Me; Fri, 06 Mar 2020 09:44:22 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Rob Browning Subject: Re: bug#39211: [PATCH 1/1] 00-repl-server.test: don't use fixed path for socket References: <20200121032214.1908896-1-rlb@defaultvalue.org> Date: Fri, 06 Mar 2020 15:44:20 +0100 In-Reply-To: <20200121032214.1908896-1-rlb@defaultvalue.org> (Rob Browning's message of "Mon, 20 Jan 2020 21:22:14 -0600") Message-ID: <87o8t9mtkr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39211-done Cc: 39211-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Rob Browning skribis: > Even setting aside any security concerns, this caused tests to fail if > you ran them as a given user and then ran them again as another user. > > --- > > It didn't look like we have anything like mkdtemp or I'd have used it > instead. And it looks like this might apply to, and it would be nice > to have something like it on stable-2.2 as well. > > test-suite/tests/00-repl-server.test | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) I believe what you pushed as ddcab06f20525d975503d8d9611e02021fb0dff1 fixes this issue, so I=E2=80=99m closing it now. Thanks, Ludo=E2=80=99. From unknown Sun Jun 22 22:43:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Apr 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator