unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>, "Josselin Poiret" <dev@jpoiret.xyz>
Cc: 63024@debbugs.gnu.org, 62334@debbugs.gnu.org,
	Greg Hogan <code@greghogan.com>,
	Simon Tournier <zimon.toutoune@gmail.com>
Subject: bug#62334: [PATCH 3/3] tests: Test that system* works if stdin/out/err isn't backed by fdes
Date: Fri,  5 May 2023 15:39:24 +0200	[thread overview]
Message-ID: <19baf4a40b5ce28624a7bcb3f9381fce0f318cf3.1683293896.git.dev@jpoiret.xyz> (raw)
In-Reply-To: <87mt2l4whd.fsf@gnu.org>

From: Ludovic Courtès <ludo@gnu.org>

* test-suite/tests/posix.test: New test for https://bugs.gnu.org/63024.
---
 test-suite/tests/posix.test | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test
index d5cf47cda..18dad8902 100644
--- a/test-suite/tests/posix.test
+++ b/test-suite/tests/posix.test
@@ -374,7 +374,17 @@
                     (system* "sh" "-c" "echo bong >&2"))))))))
 
       (and (zero? (status:exit-val status))
-           (call-with-input-file file get-string-all)))))
+           (call-with-input-file file get-string-all))))
+
+  (pass-if-equal "https://bugs.gnu.org/63024"
+      0
+    (if (file-exists? "/proc/self/fd/0")          ;on GNU/Linux?
+        (parameterize ((current-output-port (%make-void-port "w0")))
+          (system* "guile" "-c"
+                   (object->string
+                    '(exit (string=? "/dev/null"
+                                     (readlink "/proc/self/fd/1"))))))
+        (throw 'unresolved))))
 
 ;;
 ;; spawn
-- 
2.39.2





  parent reply	other threads:[~2023-05-05 13:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 14:17 bug#62334: Network is unreachable only for recursive pypi import Greg Hogan
2023-03-21 21:45 ` Josselin Poiret via Bug reports for GNU Guix
2023-03-24 12:19   ` Maxim Cournoyer
2023-04-24  8:42     ` zimoun
2023-03-28 20:37 ` bug#62334: Network Travis Zimmerman
2023-04-25 12:23 ` bug#62334: Network is unreachable only for recursive pypi import Simon Tournier
2023-04-27 13:32   ` Simon Tournier
2023-05-02 21:47 ` bug#62334: bug#63024: Crash during `guix import pypi -r' Ludovic Courtès
2023-05-02 21:48 ` Ludovic Courtès
2023-05-03  9:04   ` bug#62334: " Ludovic Courtès
2023-05-03 10:08     ` bug#63024: " Simon Tournier
2023-05-04 11:10       ` Ludovic Courtès
2023-05-05 13:39     ` bug#62334: [PATCH 1/3] Add error handling for spawn's posix_spawn_file_actions_adddup2 Josselin Poiret via Bug reports for GNU Guix
2023-05-08 14:08       ` bug#63024: Guile's "sleep pipe" can leak into processes created by 'spawn' Ludovic Courtès
2023-05-05 13:39     ` bug#63024: [PATCH 2/3] Use /dev/null in piped-process if port is not backed by a fdes Josselin Poiret via Bug reports for GNU Guix
2023-05-05 13:39     ` Josselin Poiret via Bug reports for GNU Guix [this message]
2023-05-04 11:13   ` bug#63024: Crash during `guix import pypi -r' Ludovic Courtès
2023-05-05  8:54     ` bug#57391: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19baf4a40b5ce28624a7bcb3f9381fce0f318cf3.1683293896.git.dev@jpoiret.xyz \
    --to=bug-guix@gnu.org \
    --cc=62334@debbugs.gnu.org \
    --cc=63024@debbugs.gnu.org \
    --cc=code@greghogan.com \
    --cc=dev@jpoiret.xyz \
    --cc=ludo@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).