Richard replied to my comment about RUN-PROGRAM-ED, unintentionally
without CC'ing the list. As you can see below, he had already done
all the heavy lifting of figuring out the problem; all that was left
to me was to suggest a patch (attached). I agree with Richard that
the right thing is to fix the test -- the subtle dependency on getting
CRLFs out of the PTY could not have been intentional, methinks. I've
tested this fix against 1.0.33 on both Solaris and Linux.
Oh, the original symptom, in case you're wondering, was that the test
would hang, preventing completion of the test suite.
---------- Forwarded message ----------
From: Richard M Kreuter <kreuter@...>
Date: Sat, Feb 20, 2010 at 10:36 PM
Subject: Re: [Sbcl-devel] Solaris build tweaks
"Scott L. Burson" writes:
> So now, still on Solaris, I'm trying to debug a problem with test case
> RUN-PROGRAM-ED. Is there a signal I can send to force SBCL to dump a
> backtrace and exit?
I spent some time debugging RUN-PROGRAM-ED failure on OpenSolaris a
couple years ago, but didn't sort it all out. AFAIR, RUN-PROGRAM-ED
subtly relies on the pty's EOL settings, which I guess default to CR/LF
on most systems, since the test would break under other EOL conventions
(and, I think, this is what was and may still be the case on
OpenSolaris). Specifically, READ-LINISH stops at the #\Return or
#\Linefeed, so test body actually does this when the pty terminates with
(assert-ed nil "4") ; reads up to the first #\Return
(assert-ed ".s/bar/baz/g" "") ; reads the last line's #\Linefeed
(assert-ed "w" "4") ; reads up to the first #\Return
(assert-ed "q" "") ; reads just a #\linefeed
That is, the second ASSERT-ED call turns out to depend on the fact that
the first line from ed was CR/LF terminated: that 's' command doesn't
print any output. So the test is broken in this respect.
And, IIRC, the ed output on OpenSolaris wasn't CR/LF terminated. So I
tried making it be that way [*] using the relevant termios flag (ONCLR,
I believe). It didn't work, and when I asked about it on the
opensolaris channel on freenode, somebody telling me to RTFM reminded me
that I didn't really care much about the platform.
So tag, you're it. :)
Hope this helps,
[*] Of course, fixing the test would be best, but it's not clear to me
what regression that test is actually trying to disconfirm.