1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

Adjust 'spawn' tests to accept 'LD_ORIGIN_PATH' on GNU/Hurd.

Fixes <https://bugs.gnu.org/62501>.

* test-suite/tests/posix.test ("spawn")["env with #:environment
and #:output"]: Add workaround for GNU/Hurd.
* NEWS: Update.
This commit is contained in:
Ludovic Courtès 2023-04-02 15:37:00 +02:00
parent 9cc85a4f52
commit e93525e549
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 9 additions and 1 deletions

2
NEWS
View file

@ -27,6 +27,8 @@ the compiler reports it as "possibly unused".
(<https://bugs.gnu.org/62290>)
** Fix invalid use of 'posix_spawn' on non-glibc systems
(<https://bugs.gnu.org/61095>)
** Adjust 'spawn' test for GNU/Hurd
(<https://bugs.gnu.org/62501>)
** Hashing of UTF-8 symbols with non-ASCII characters avoids corruption
(<https://bugs.gnu.org/56413>)

View file

@ -431,7 +431,13 @@
(let ((str (get-string-all (car input+output))))
(close-port (car input+output))
(waitpid pid)
str)))
;; On GNU/Hurd, the exec server prepends 'LD_ORIGIN_PATH' for
;; every program: <https://bugs.gnu.org/62501>. Strip it.
(if (and (string=? "GNU" (utsname:sysname (uname)))
(string-prefix? "LD_ORIGIN_PATH=" str))
(string-drop str (+ 1 (string-index str #\newline)))
str))))
(pass-if-equal "ls /proc/self/fd"
"0\n1\n2\n3\n" ;fourth FD is for /proc/self/fd