From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, brobecker@adacore.com
Subject: Re: Help with solaris testing
Date: Tue, 05 Aug 2008 13:49:00 -0000 [thread overview]
Message-ID: <200808051446.01880.pedro@codesourcery.com> (raw)
In-Reply-To: <200807291539.m6TFdFAd007825@brahms.sibelius.xs4all.nl>
[-- Attachment #1: Type: text/plain, Size: 1994 bytes --]
Hi Mark, thanks, and sorry for not replying sooner. Only now
I came back to the issue.
On Tuesday 29 July 2008 16:39:15, Mark Kettenis wrote:
> > When running the testsuite under Solaris, I get a bunch of failures
> > and they appear to be related to something translating "\r" -> "\r\n".
> > The eols end up being "\r\r\n" instead of "\r\n", and a lot of test
> > patterns don't expect that.
> >
> > How do people test under solaris? Is this perhaps a well known
> > issue with an easy well known fix?
>
> This is strange; I've tested GDB on Solaris in the past and never
> encountered this problem.
>
> What does stty -a say on the system? Could it be that one of ocrnl or
> onlret is set?
Hmm, not really.
-bash-3.2$ /usr/bin/stty -a
...
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
I just found a workaround. Overriding the stty settings expect does on
the pty used in spawn's,
proc default_gdb_start { } {
...
global stty_init
set stty_init "<the stty -a settings of my terminal>"
...
}
... makes the issue go away.
This bit here http://www.cotse.com/dlf/man/expect/spawn.htm:
"Internally, spawn uses a pty, initialized the same way as the user’s tty.
This is further initialized so that all settings are “sane” (according to
stty(1))."
The latter seems to indicate where the problem is:
On solaris:
pedro@opensolaris:~/orlando/gdb/multi_process/build-solaris/gdb$ /usr/bin/stty
speed 38400 baud; -parity
rows = 34; columns = 118; ypixels = 0; xpixels = 0;
swtch = <undef>;
brkint -inpck -istrip icrnl -ixon ixoff imaxbel onlcr onocr tab3 echo echoe echok echonl echoctl echoke iexten
On linux:
[pedro@orlando][~/gdb/multi_process/src/gdb/testsuite/gdb.base]>/bin/stty
speed 38400 baud; line = 0;
-brkint -imaxbel iutf8
Probably, passing -nottyinit to spawn would "fix" it too.
Anybody seen this before? What's the correct fix for this?
--
Pedro Alves
[-- Attachment #2: fix_expect_sol.diff --]
[-- Type: text/x-diff, Size: 880 bytes --]
---
gdb/testsuite/lib/gdb.exp | 4 ++++
1 file changed, 4 insertions(+)
Index: src/gdb/testsuite/lib/gdb.exp
===================================================================
--- src.orig/gdb/testsuite/lib/gdb.exp 2008-08-05 14:03:59.000000000 +0100
+++ src/gdb/testsuite/lib/gdb.exp 2008-08-05 14:42:40.000000000 +0100
@@ -1154,6 +1154,10 @@ proc default_gdb_start { } {
global gdb_prompt
global timeout
global gdb_spawn_id;
+ global stty_init
+
+# set stty_init raw
+ set stty_init "-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr onocr -onlret -ofill -ofdel nl0 cr0 tab3 bs0 vt0 ff0 isig icanon iexten echo echoe echok echonl -noflsh -xcase -tostop -echoprt echoctl echoke"
gdb_stop_suppressing_tests;
next prev parent reply other threads:[~2008-08-05 13:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 15:38 Pedro Alves
2008-07-29 15:43 ` Mark Kettenis
2008-08-05 13:49 ` Pedro Alves [this message]
2008-08-05 14:04 ` Daniel Jacobowitz
2008-08-05 14:33 ` Mark Kettenis
2008-08-07 22:32 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808051446.01880.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox