bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63024: [PATCH 3/3] tests: Test that system* works if stdin/out/err i


From: Josselin Poiret
Subject: bug#63024: [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

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]