Working on the debian package clisp version: 1:2.49.20180218+really2.49.92-3+b4
there's an issue related to the streams tests failing on a pipe stdout file descriptor.
Building clisp package in an OBS instance FTBFS because of the following
test failure:
(let ((reopen-open-file nil)) ; stdout can be a file, it will be detected!
(with-open-file (copy s :direction :output) (streamp copy))) T
Build error log shows the following output for that test:
$ cat usr/src/packages/BUILD/debian/build/tests/.erg
Form: (LET ((REOPEN-OPEN-FILE* NIL)) (WITH-OPEN-FILE (COPY S
:DIRECTION :OUTPUT) (STREAMP COPY)))
CORRECT: T
CLISP : ERROR
OS-FILE-ERROR(13): Permission denied
OUT:
"[OS-FILE-ERROR]: OS-FILE-ERROR(13): Permission denied
"
That Lisp form tries to open the stdout file descriptor, but in this
case it's failing with EACCES (Permission denied).
AFAICS, running strace
on the test shows that on the OBS instance,
stdout
is piped, causing the access issue:
[ 148s] lstat("/proc/2867342/fd/2", {st_mode=S_IFLNK|0300,
st_size=64, ...}) = 0
[ 148s] readlink("/proc/2867342/fd/2", "pipe:[4065697]", 64) = 14
[ 148s] stat("/proc/2867342/fd/2", {st_mode=S_IFIFO|0600, st_size=0,
...}) = 0
[ 148s] openat(AT_FDCWD, "/proc/2867342/fd/2",
O_WRONLY|O_CREAT|O_TRUNC, 0644) = -1 EACCES (Permission denied)
However, on a "local" build, stdout
going directly to the pseudo
terminal doesn't raise any issue:
lstat("/proc/2901662/fd/2", {st_mode=S_IFLNK|0700, st_size=64, ...}) = 0
readlink("/proc/2901662/fd/2", "/dev/pts/1", 64) = 10
readlink("/dev", 0x7fff7e9fbd30, 4095) = -1 EINVAL (Invalid argument)
readlink("/dev/pts", 0x7fff7e9fbd30, 4095) = -1 EINVAL (Invalid argument)
lstat("/dev/pts/1", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1),
...}) = 0
stat("/dev/pts/1", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1),
...}) = 0
openat(AT_FDCWD, "/dev/pts/1", O_WRONLY|O_CREAT|O_TRUNC, 0644) = 10
This seems to be related to how output fds are handled. AFAICS there's a
difference between these two cases, see:
Is this an issue and should be checked? What's the expected behaviour on
these cases?
Related submitted debian issue for reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990244
I agree with the analysis in the debian bug by Dennis Filder:
I suggest that you either disable the test locally or run in a more permissive environment.
Last edit: Sam Steingold 2022-02-09