From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3850 invoked by alias); 30 Jun 2009 21:37:48 -0000 Received: (qmail 3840 invoked by uid 22791); 30 Jun 2009 21:37:47 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Jun 2009 21:37:36 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5ULbYvg016787 for ; Tue, 30 Jun 2009 17:37:34 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5ULbXbr002901; Tue, 30 Jun 2009 17:37:34 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5ULbWJr009011; Tue, 30 Jun 2009 17:37:33 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n5ULbWZf022239; Tue, 30 Jun 2009 23:37:32 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id n5ULbW3B022238; Tue, 30 Jun 2009 23:37:32 +0200 Date: Tue, 30 Jun 2009 21:37:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [patch] testsuite: Fix gdb.base/completion.exp for check// subdirectories. Message-ID: <20090630213731.GC21623@host0.dyn.jankratochvil.net> References: <20090630190707.GA3384@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-IsSubscribed: yes 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: 2009-06/txt/msg00903.txt.bz2 On Tue, 30 Jun 2009 23:21:17 +0200, Tom Tromey wrote: > >>>>> "Jan" == Jan Kratochvil writes: > > Jan> currently when you run gdb.base/completion.exp by check//unix/-m64 etc. you > Jan> get many FAILs due to initial failing: > Jan> dir ../testsu^GiteFAIL: gdb.base/completion.exp: directory completion (timeout) > > Jan> as gdb/testsuite* has also the matches like `gdb/testsuite.unix.-m64'. > > Thanks, this is ok. During a retest found out the original patch did cause a regression when run in the testsuite/ directory this time. Changed it this way: -set uniquedir ${objdir}/${subdir}/completion-uNiQuEdIr -> +# Do not use the `completion' start here as it would conflict with the +# testcase (complete 'file ./gdb.base/complet') expectations. +set uniquedir ${objdir}/${subdir}/compl-uNiQuEdIr Checked-in now with this change. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2009-06/msg00207.html --- src/gdb/testsuite/ChangeLog 2009/06/30 21:23:38 1.1908 +++ src/gdb/testsuite/ChangeLog 2009/06/30 21:33:19 1.1909 @@ -1,5 +1,14 @@ 2009-06-30 Jan Kratochvil + * gdb.base/completion.exp (directory completion): Create the directory. + New variables uniquedir, escapeduniquedir, uniquesu, uniquesub, + escapeuniquesub. + (directory completion 2): Expect now ${escapeuniquesub}. + (Glob remaining of directory test): Remove one excessive newline. + Expect the real output. + +2009-06-30 Jan Kratochvil + Fix `make check//%' target after `make check' has been ran. * Makefile.in (TEST_TARGETS): Remove the %/.dir dependency. Add a mkdir call. --- src/gdb/testsuite/gdb.base/completion.exp 2009/03/25 10:52:22 1.37 +++ src/gdb/testsuite/gdb.base/completion.exp 2009/06/30 21:33:20 1.38 @@ -735,25 +735,33 @@ "cd to \${srcdir}" -# GDB used to fail adding / on directories, on the first try only -send_gdb "dir ../testsu\t" +# GDB used to fail adding / on directories, on the first try only. +# Do not use the `completion' start here as it would conflict with the +# testcase (complete 'file ./gdb.base/complet') expectations. +set uniquedir ${objdir}/${subdir}/compl-uNiQuEdIr +set escapeduniquedir [string_to_regexp ${uniquedir}] +set uniquesu subdi +set uniquesub ${uniquesu}r +set escapeuniquesub [string_to_regexp ${uniquesub}] +file mkdir ${uniquedir}/${uniquesub} +send_gdb "dir ${uniquedir}\t" gdb_expect { - -re "../testsuite/$" { + -re "${escapeduniquedir}/" { pass "directory completion" - send_gdb "gdb.bas\t" + send_gdb "${uniquesu}\t" } - -re "../testsuite $" { + -re "${escapeduniquedir} $" { fail "directory completion (old gdb bug)" - send_gdb "\b/gdb.bas\t" + send_gdb "\b/${uniquesu}\t" } default { fail "directory completion (timeout)" - send_gdb "\ndir ../testsuite/gdb.bas\t" + send_gdb "\ndir ${uniquedir}/${uniquesu}\t" } } gdb_expect { - -re "gdb.base/$" { + -re "${escapeuniquesub}/$" { pass "directory completion 2" } timeout { @@ -761,7 +769,8 @@ } } -gdb_test "\n" "" "Glob remaining of directory test" +# Empty COMMAND sends no newline while " " sends the newline we need. +gdb_test " " "Source directories searched: .*" "Glob remaining of directory test" send_gdb "complete file ./gdb.base/compl\n"