GNU bug report logs - #71796
[PATCH] Do not depend on tmpnam in posix.test.

Previous Next

Package: guile;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Thu, 27 Jun 2024 13:45:02 UTC

Severity: normal

Tags: patch

Merged with 71742, 71765

Found in version 3.0.10

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71796 in the body.
You can then email your comments to 71796 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#71796; Package guile. (Thu, 27 Jun 2024 13:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tomas Volf <~@wolfsden.cz>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Thu, 27 Jun 2024 13:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: bug-guile <at> gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [PATCH] Do not depend on tmpnam in posix.test.
Date: Thu, 27 Jun 2024 15:43:35 +0200
`tmpnam' is a deprecated procedure that can be excluded during a
configure (`--disable-tmpnam').  There currently was a single test
relying on it, and therefore failing is such configuration.  This commit
switches to mkstemp instead.

* test-suite/tests/posix.test ("system*"): Use mkstemp instead of
tmpnam.
---
 test-suite/tests/posix.test | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test
index 18dad8902..0d75eb145 100644
--- a/test-suite/tests/posix.test
+++ b/test-suite/tests/posix.test
@@ -362,7 +362,8 @@
 
   (pass-if-equal "https://bugs.gnu.org/52835"
       "bong\n"
-    (let ((file (tmpnam)))
+    (let* ((port (mkstemp "T-XXXXXX"))
+           (file (port-filename port)))
       ;; Redirect stdout and stderr to FILE.
       (define status
         (call-with-output-file file
@@ -373,8 +374,9 @@
                   (lambda ()
                     (system* "sh" "-c" "echo bong >&2"))))))))
 
+      (delete-file file)
       (and (zero? (status:exit-val status))
-           (call-with-input-file file get-string-all))))
+           (get-string-all port))))
 
   (pass-if-equal "https://bugs.gnu.org/63024"
       0
-- 
2.45.1





Merged 71742 71765 71796. Request was from Tomas Volf <~@wolfsden.cz> to control <at> debbugs.gnu.org. (Thu, 27 Jun 2024 14:37:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 71796 <at> debbugs.gnu.org and Tomas Volf <~@wolfsden.cz> Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 20 Oct 2024 19:28:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 18 Nov 2024 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.