From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2269 invoked by alias); 5 Aug 2008 13:49:24 -0000 Received: (qmail 2259 invoked by uid 22791); 5 Aug 2008 13:49:24 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 05 Aug 2008 13:45:47 +0000 Received: (qmail 7275 invoked from network); 5 Aug 2008 13:45:44 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 Aug 2008 13:45:44 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Help with solaris testing Date: Tue, 05 Aug 2008 13:49:00 -0000 User-Agent: KMail/1.9.9 Cc: Mark Kettenis , brobecker@adacore.com References: <200807291558.22228.pedro@codesourcery.com> <200807291539.m6TFdFAd007825@brahms.sibelius.xs4all.nl> In-Reply-To: <200807291539.m6TFdFAd007825@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_ZmFmIH+1sCON4PJ" Message-Id: <200808051446.01880.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00071.txt.bz2 --Boundary-00=_ZmFmIH+1sCON4PJ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-length: 1982 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 "" ... } ... 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=E2=80= =99s tty.=20=20=20 This is further initialized so that all settings are =E2=80=9Csane=E2=80= =9D (according to=20=20=20 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 =3D 34; columns =3D 118; ypixels =3D 0; xpixels =3D 0; swtch =3D ; brkint -inpck -istrip icrnl -ixon ixoff imaxbel onlcr onocr tab3 echo echo= e echok echonl echoctl echoke iexten On linux: [pedro@orlando][~/gdb/multi_process/src/gdb/testsuite/gdb.base]>/bin/stty speed 38400 baud; line =3D 0; -brkint -imaxbel iutf8 Probably, passing -nottyinit to spawn would "fix" it too. Anybody seen this before? What's the correct fix for this? --=20 Pedro Alves --Boundary-00=_ZmFmIH+1sCON4PJ Content-Type: text/x-diff; charset="utf-8"; name="fix_expect_sol.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix_expect_sol.diff" Content-length: 880 --- 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; --Boundary-00=_ZmFmIH+1sCON4PJ--