From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16543 invoked by alias); 20 May 2013 19:14:15 -0000 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 Received: (qmail 16532 invoked by uid 89); 20 May 2013 19:14:15 -0000 X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 20 May 2013 19:14:14 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4KJEDOa017347 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 20 May 2013 15:14:13 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4KJECYX029521 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 20 May 2013 15:14:13 -0400 Message-ID: <519A7604.4090805@redhat.com> Date: Mon, 20 May 2013 19:14:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org ml" Subject: Re: [RFA] gdb_expect -> gdb_test_multiple for filesym.exp References: <51951EAC.9090607@redhat.com> <51952C91.5040605@redhat.com> <51952E71.90601@redhat.com> <51953173.70002@redhat.com> <5195440D.6070601@redhat.com> <51960BCD.7070404@redhat.com> In-Reply-To: <51960BCD.7070404@redhat.com> Content-Type: multipart/mixed; boundary="------------050309070908000303010305" X-Virus-Found: No X-SW-Source: 2013-05/txt/msg00743.txt.bz2 This is a multi-part message in MIME format. --------------050309070908000303010305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1023 On 05/17/2013 03:51 AM, Pedro Alves wrote: > As long as we're revising... :-) Sure! > set tst "complete on \"filesy\"" > send_gdb "break filesy\t" > gdb_test_multiple "" $tst { > -re "^break filesy\\\x07m" { > pass $tst > > # Now ask for the completion list > set tst "completion list for \"filesym\"" > send_gdb "\t\t" > gdb_test_multiple "" $tst { > -re "\\\x07\r\nfilesym\[ \t\]+filesym.c\[ \t\]+\r\n$gdb_prompt " { > pass $tst > > # Flush the rest of the output by creating the breakpoint. > # This ensures this file passes testsuite/12649. > send_gdb "\n" > gdb_test "" "Breakpoint 1.*" "set breakpoint at filesym" > } > } > } > } I've used this verbatim and tested with the read1 scenario, too. All looks good. Keith ChangeLog 2013-05-20 Keith Seitz Pedro Alves * gdb.base/filesym.exp: Use gdb_test_multiple instead of gdb_expect. Add test to flush the remaining input buffer so that this file passes testsuite/12649. --------------050309070908000303010305 Content-Type: text/x-patch; name="completer-test-test_multiple-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="completer-test-test_multiple-2.patch" Content-length: 1423 Index: testsuite/gdb.base/filesym.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/filesym.exp,v retrieving revision 1.1 diff -u -p -r1.1 filesym.exp --- testsuite/gdb.base/filesym.exp 15 May 2013 21:21:05 -0000 1.1 +++ testsuite/gdb.base/filesym.exp 20 May 2013 19:11:51 -0000 @@ -26,25 +26,26 @@ if {[prepare_for_testing $testfile.exp $ # complete to "filesym"; completing again, we expect the symbol name and the # filename (in that order). +set tst "complete on \"filesy\"" send_gdb "break filesy\t" -gdb_expect { - -re "m\$" { - pass "complete on \"filesy\"" +gdb_test_multiple "" $tst { + -re "break filesy\\\x07m\$" { + pass $tst # Now ask for the completion list + set tst "completion list for \"filesym\"" send_gdb "\t\t" - gdb_expect { - -re ".*filesym\[ \t\]+filesym.c.*$gdb_prompt break filesym\$" { - pass "completion list for \"filesym\"" - } + gdb_test_multiple "" $tst { + -re "\\\x07\r\nfilesym\[ \t\]+filesym.c\[ \t\]+\r\n$gdb_prompt " { + pass $tst - default { - fail "completion list for \"filesym\"" + # Flush the rest of the output by creating the breakpoint. + # This ensures this file passes testsuite/12649. + send_gdb "\n" + gdb_test "" "Breakpoint 1.*" "set breakpoint at filesym" } } } - - default { - fail "complete on \"filesy\"" - } } + +unset -nocomplain tst --------------050309070908000303010305--