Re: CLISP on Haiku

Alexandru Popa <[email protected]> Thu, 9 Jan 2025 15:02:04 +0200
Newsgroups gmane.lisp.clisp.devel
Message-ID <CAL2wRjQSMxCjSgP5rzPdk5QdhZ54sHt8Z120fJq1BywA5m-c8Q@mail.gmail.com>
--===============3721370060249122305==
Content-Type: multipart/alternative; boundary="000000000000602ea8062b459636"

--000000000000602ea8062b459636
Content-Type: text/plain; charset="UTF-8"

Hi Bruno,

I freshly build and retest (make check) CLISP on Haiku. Two .erg files are
generated in tests folder: socket.erg and weakhash.erg (this one is empty).
The socket.erg content is the following:

Form: (CHECK-OS-ERROR (SOCKET-CONNECT 12345 "localhost" :BUFFERED NIL
:TIMEOUT 0) (:ECONNREFUSED -2147454944))
CORRECT: T
CLISP  : -2147483639
OUT:
"[OS-ERROR]: OS-ERROR(-2147483639): Operation timed out
"

This fail does not seem to be related to missing from Haiku ESOCKTNOSUPPORT
error code. I analyzed tests/socket.tst file and found this operation fails
similarly on Windows and CYGWIN. So I added the exception for Haiku.
Changed from:

(check-os-error (socket:socket-connect 12345 "localhost" :buffered nil
:timeout 0)
  #.(let ((os (ext:operating-system-type)))
      (cond ((equal os "Windows") '(:ETIMEDOUT 10060))
            ((equal os "CYGWIN") `(:ETIMEDOUT ,+ETIMEDOUT+))
            (t `(:ECONNREFUSED ,+ECONNREFUSED+)))))
T

to:

(check-os-error (socket:socket-connect 12345 "localhost" :buffered nil
:timeout 0)
  #.(let ((os (ext:operating-system-type)))
      (cond ((equal os "Windows") '(:ETIMEDOUT 10060))
            ((equal os "CYGWIN") `(:ETIMEDOUT ,+ETIMEDOUT+))
            ((equal os "Haiku) `(:ETIMEDOUT ,+ETIMEDOUT+))
            (t `(:ECONNREFUSED ,+ECONNREFUSED+)))))
T

I did not modify tests for:
(socket:socket-connect 12345 "localhost" :timeout 0)
(socket:socket-connect 12345 "localhost" :timeout 30)

After this change, make check still fails, no weakhash.erg is generated and
socket.erg is generated but is empty. The last log before test ending is:

*** - READ: input stream
      #<INPUT BUFFERED FILE-STREAM CHARACTER #P"socket.tst" @730> ends
within
      a string

The file socket.tst has 729 lines.

I am not sure how to interpret this result. Also, I am not the proper
person to judge if this change can be considered as "fix" or as "hiding a
problem". Just report it to you. Maybe CLISP sockets support on Haiku are
in better shape than it may seem.

Also, the tests with comment:

;; This test frequently fails on Haiku.

do not seem to fail on Haiku.

Alexandru

--000000000000602ea8062b459636
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Bruno,</div><div><br></div><div>I freshly build an=
d retest (make check) CLISP on Haiku. Two .erg files are generated in tests=
 folder: socket.erg and weakhash.erg (this one is empty). The socket.erg co=
ntent is the following:</div><div><br></div><div>Form: (CHECK-OS-ERROR (SOC=
KET-CONNECT 12345 &quot;localhost&quot; :BUFFERED NIL :TIMEOUT 0) (:ECONNRE=
FUSED -2147454944))<br>CORRECT: T<br>CLISP =C2=A0: -2147483639<br>OUT:<br>&=
quot;[OS-ERROR]: OS-ERROR(-2147483639): Operation timed out<br>&quot;</div>=
<div><br></div><div>This fail does not seem to be related to missing from H=
aiku ESOCKTNOSUPPORT error code. I analyzed tests/socket.tst file and found=
 this operation fails similarly on Windows and CYGWIN. So I added the excep=
tion for Haiku. Changed from:</div><div><br></div><div>(check-os-error (soc=
ket:socket-connect 12345 &quot;localhost&quot; :buffered nil :timeout 0)<br=
>=C2=A0 #.(let ((os (ext:operating-system-type)))<br>=C2=A0 =C2=A0 =C2=A0 (=
cond ((equal os &quot;Windows&quot;) &#39;(:ETIMEDOUT 10060))<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((equal os &quot;CYGWIN&quot;) `(:ETIMEDOUT=
 ,+ETIMEDOUT+))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (t `(:ECONNREF=
USED ,+ECONNREFUSED+)))))<br>T</div><div><br></div><div>to:</div><div><br><=
/div><div>(check-os-error (socket:socket-connect 12345 &quot;localhost&quot=
; :buffered nil :timeout 0)<br>=C2=A0 #.(let ((os (ext:operating-system-typ=
e)))<br>=C2=A0 =C2=A0 =C2=A0 (cond ((equal os &quot;Windows&quot;) &#39;(:E=
TIMEDOUT 10060))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((equal os &q=
uot;CYGWIN&quot;) `(:ETIMEDOUT ,+ETIMEDOUT+))<br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 ((equal os &quot;Haiku) `(:ETIMEDOUT ,+ETIMEDOUT+))<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (t `(:ECONNREFUSED ,+ECONNREFUSED=
+)))))<br>T</div><div><br></div><div>I did not modify tests for:</div><div>=
(socket:socket-connect 12345 &quot;localhost&quot; :timeout 0)</div><div>(s=
ocket:socket-connect 12345 &quot;localhost&quot; :timeout 30)</div><div></d=
iv><div><br></div><div>After this change, make check still fails, no weakha=
sh.erg is generated and socket.erg is generated but is empty. The last log =
before test ending is:</div><div><br></div><div>*** - READ: input stream</d=
iv><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #&lt;INPUT BUFFERED FILE-STREAM CHAR=
ACTER #P&quot;socket.tst&quot; @730&gt; ends within</div><div>=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 a string<br></div><div><br></div><div>The file socket.ts=
t has 729 lines.<br></div><div><br></div><div>I am not sure how to interpre=
t this result. Also, I am not the proper person to judge if this change can=
 be considered as &quot;fix&quot; or as &quot;hiding a problem&quot;. Just =
report it to you. Maybe CLISP sockets support on Haiku are in better shape =
than it may seem.</div><div><br></div><div>Also, the tests with comment:</d=
iv><div><br></div><div>;; This test frequently fails on Haiku.</div><div><b=
r></div><div>do not seem to fail on Haiku.</div><div><br></div><div>Alexand=
ru<br></div></div>

--000000000000602ea8062b459636--


--===============3721370060249122305==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3721370060249122305==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel

--===============3721370060249122305==--