[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

[ ruby-Bugs-10620 ] TestReadline fails depending on the terminal in which the test is run.

From: <noreply@...>
Date: 2007-05-05 19:43:51 UTC
List: ruby-core #11097
Bugs item #10620, was opened at 2007-05-05 21:43
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=10620&group_id=426

Category: Core
Group: 1.8.6
Status: Open
Resolution: None
Priority: 3
Submitted By: Hans de Graaff (graaff)
Assigned to: Nobody (None)
Summary: TestReadline fails depending on the terminal in which the test is run.

Initial Comment:
This issue has been described in more detail as Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=143341 (but note that there are also other testing bugs mentioned there)

The symptom is this:

  1) Failure:
test_readline(TestReadline) [./readline/test_readline.rb:25]:
<"> "> expected but was
<"\e[">.

After some additional investigation I found that some terminals (I tested with gnome-terminal, with TERM=xterm) insert an escape code in the stdout file that is used by the test, so instead of the expected "> " prompt the escape code is found. Here is the hex dump of the stdout file:

00000000  1b 5b 3f 31 30 33 34 68  3e 20 68 65 6c 6c 6f 0a  |.[?1034h> hello.|
00000010

I could run the process without any problem by using a more conservative terminal, e.g. this passes the tests:

  TERM=vt100 ruby -C . runner.rb -t TestReadline -v

Perhaps the test should be adjusted to always enforce a conservative terminal, e.g. by setting ENV['TERM'] at the beginning of the test_readline method. This fixes the problem for me.


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=10620&group_id=426

In This Thread

Prev Next