From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18346 invoked by alias); 30 Jan 2012 16:22:13 -0000 Received: (qmail 18329 invoked by uid 22791); 30 Jan 2012 16:22:10 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Jan 2012 16:21:51 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0UGLmuK015858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Jan 2012 11:21:48 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0UGLkCI032643; Mon, 30 Jan 2012 11:21:47 -0500 Message-ID: <4F26C39A.1000200@redhat.com> Date: Mon, 30 Jan 2012 17:11:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [patch] Fix identical PASS in gdb.base/skip.exp References: <4F26A994.8060500@codesourcery.com> In-Reply-To: <4F26A994.8060500@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-01/txt/msg00994.txt.bz2 On 01/30/2012 02:30 PM, Yao Qi wrote: > When I was looking at the FAILs in gdb.base/skip.exp, I found there are > some identical PASS in gdb.base/skip.exp. > > 2 PASS: gdb.base/skip.exp: info skip > 2 PASS: gdb.base/skip.exp: skip > 2 PASS: gdb.base/skip.exp: skip file > 2 PASS: gdb.base/skip.exp: step after deleting 1 (1) > 2 PASS: gdb.base/skip.exp: step after deleting 1 (2) > 5 PASS: gdb.base/skip.exp: step > > This patch is to fix this. OK to apply? Thanks. > > -- Yao (齐尧) > > > 0005-make-test-PASS-unique.patch > > > 2012-01-30 Yao Qi > > * gdb.base/skip.exp: Make test result unique. > --- > gdb/testsuite/gdb.base/skip.exp | 29 +++++++++++++++-------------- > 1 files changed, 15 insertions(+), 14 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp > index 061341c..6f9f8ad 100644 > --- a/gdb/testsuite/gdb.base/skip.exp > +++ b/gdb/testsuite/gdb.base/skip.exp > @@ -27,9 +27,9 @@ set srcfile1 skip1.c > # > # Right after we start gdb, there's no default file or function to skip. > # > -gdb_test "skip file" "No default file now." > +gdb_test "skip file" "No default file now." "skip (no default file)" gdb_test "skip file" "No default file now." "skip file (no default file)" > gdb_test "skip function" "No default function now." > -gdb_test "skip" "No default function now." > +gdb_test "skip" "No default function now." "skip (no default function)" > > if ![runto_main] { fail "skip tests suppressed" } > > @@ -41,8 +41,8 @@ gdb_test "info skip" "Not skipping any files or functions\." "info skip empty" > # > # Create a skiplist entry for the current file and function. > # > -gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." > -gdb_test "skip" "Function main at .* will be skipped when stepping\." > +gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip ($srcfile)" gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip file ($srcfile)" > +gdb_test "skip" "Function main at .* will be skipped when stepping\." "skip (main)" > > # > # Create a skiplist entry for a specified file and function. > @@ -82,7 +82,7 @@ gdb_test "info skip" \ > # > > if ![runto_main] { fail "skip tests suppressed" } > -gdb_test "step" > +gdb_test "step" ".*" "step into main" into, or in? AFAICS, you're already in main before the step. > gdb_test "bt" "\\s*\\#0\\s+main.*" "step after all ignored" > > # > @@ -96,11 +96,12 @@ gdb_test "info skip" \ > "Num\\s+Type\\s+Enb\\s+Address\\s+What\\s* > 2\\s+function\\s+y\\s+0x\[0-9a-f\]+ main at .*$srcfile:\[0-9\]+\\s* > 3\\s+file\\s+y\\s+.*$srcfile1\\s* > -4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*" > +4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*" \ > + "info skip (delete 1)" > > if ![runto_main] { fail "skip tests suppressed" } > gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)" > -gdb_test "step"; # Return from foo() > +gdb_test "step" ".*" "step after deleting 1" ; # Return from foo() > gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)" Shouldn't that be gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)" gdb_test "step" ".*" "step after deleting 1 (2)" # Return from foo() gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (3)" ? That is: 1, 2, 3. > > # > @@ -114,10 +115,10 @@ gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \ > > if ![runto_main] { fail "skip tests suppressed" } > gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)" > -gdb_test "step"; # Return from foo() > -gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (2)" > -gdb_test "step"; # Return from bar() > -gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (3)" > +gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo() > +gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)" > +gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar() > +gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)" > > # > # Enable skiplist entry 3 and make sure we step over it like before. > @@ -127,9 +128,9 @@ gdb_test "skip enable 3" > gdb_test "info skip 3" ".*\\n3\\s+file\\s+y.*" \ > "info skip shows entry as enabled" > if ![runto_main] { fail "skip tests suppressed" } > -gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)" > -gdb_test "step"; # Return from foo() > -gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)" > +gdb_test "step" "foo \\(\\) at.*" "step after enable 3 (1)" > +gdb_test "step" ".*" "step after enable 3"; # Return from foo() > +gdb_test "step" "main \\(\\) at.*" "step after enable 3 (2)" 1, 2, 3? Okay with those fixed. -- Pedro Alves