From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22590 invoked by alias); 16 Nov 2012 03:51:01 -0000 Received: (qmail 22572 invoked by uid 22791); 16 Nov 2012 03:51:00 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Nov 2012 03:50:54 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TZCxB-0004sZ-Vw from Maxim_Kuvyrkov@mentor.com for gdb-patches@sourceware.org; Thu, 15 Nov 2012 19:50:54 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 15 Nov 2012 19:50:53 -0800 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Fri, 16 Nov 2012 03:50:51 +0000 From: Maxim Kuvyrkov Content-Type: multipart/mixed; boundary="Apple-Mail=_AE02E7C5-C29D-47D6-81BB-173DFB3A4A96" Subject: [PATCH, testsuite] Avoid testsuite harness failure on i686-mingw32 host Date: Fri, 16 Nov 2012 03:51:00 -0000 Message-ID: <6BFC66D7-25FA-466A-9F9C-51AB52C24848@codesourcery.com> To: MIME-Version: 1.0 (Apple Message framework v1283) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00454.txt.bz2 --Apple-Mail=_AE02E7C5-C29D-47D6-81BB-173DFB3A4A96 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" Content-length: 352 This patch improves testing on i686-mingw32 host. One of the tests in inte= rrupt.exp assumes that Control-D is EOF, which is not the case for Windows = hosts. After the test timeouts the testsuite doesn't get GDB prompt back, = which causes all subsequent tests to fail. OK to apply? Thank you, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics --Apple-Mail=_AE02E7C5-C29D-47D6-81BB-173DFB3A4A96 Content-Disposition: attachment; filename="gdb-win32-eof.ChangeLog" Content-Type: application/octet-stream; name="gdb-win32-eof.ChangeLog" Content-Transfer-Encoding: 7bit Content-length: 150 2012-11-15 Maxim Kuvyrkov gdb/testsuite/ * gdb.base/interrupt.exp: Workaround problem of sending EOF on Windows hosts. --Apple-Mail=_AE02E7C5-C29D-47D6-81BB-173DFB3A4A96 Content-Disposition: attachment; filename="gdb-win32-eof.patch" Content-Type: application/octet-stream; name="gdb-win32-eof.patch" Content-Transfer-Encoding: 7bit Content-length: 1492 Index: gdb/testsuite/gdb.base/interrupt.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/interrupt.exp,v retrieving revision 1.22 diff -u -p -r1.22 interrupt.exp --- gdb/testsuite/gdb.base/interrupt.exp 16 Jan 2012 16:21:44 -0000 1.22 +++ gdb/testsuite/gdb.base/interrupt.exp 16 Nov 2012 03:43:06 -0000 @@ -194,14 +194,28 @@ if ![file exists $binfile] then { } } - send_gdb "\004" - gdb_expect { - -re "end of file.*$inferior_exited_re normally.*$gdb_prompt $" { - pass "send end of file" + # Control-D is not EOF on Windows hosts, so skip this test. + if { ! [ishost i686-*-mingw32] } { + send_gdb "\004" + gdb_expect { + -re "end of file.*$inferior_exited_re normally.*$gdb_prompt $" { + pass "send end of file" + } + -re "$gdb_prompt $" { fail "send end of file" } + timeout { fail "send end of file (timeout)" } + eof { fail "send end of file (eof)" } + } + } else { + # Interrupt GDB to get the prompt back. Killing GDB while the + # remote stub is waiting for file I/O may confuse it for future + # tests. + set msg "Send Control-C to get the prompt" + send_gdb "\003" + gdb_test_multiple "" "$msg" { + -re "Program received signal SIGINT.*$gdb_prompt $" { + pass "$msg" + } } - -re "$gdb_prompt $" { fail "send end of file" } - timeout { fail "send end of file (timeout)" } - eof { fail "send end of file (eof)" } } } } --Apple-Mail=_AE02E7C5-C29D-47D6-81BB-173DFB3A4A96--