From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27684 invoked by alias); 22 Oct 2004 21:48:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27677 invoked from network); 22 Oct 2004 21:48:50 -0000 Received: from unknown (HELO granger.mail.mindspring.net) (207.69.200.148) by sourceware.org with SMTP; 22 Oct 2004 21:48:50 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by granger.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1CL7HF-0004en-00; Fri, 22 Oct 2004 17:48:49 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id 9E1C24B102; Fri, 22 Oct 2004 17:48:56 -0400 (EDT) Date: Fri, 22 Oct 2004 21:48:00 -0000 From: Michael Chastain To: pgilliam@us.ibm.com, gdb-patches@sources.redhat.com Subject: Re: [patch] New test for set backtrace related functionality Message-ID: <41798044.nailDG51QLXJD@mindspring.com> References: <200410141539.22560.pgilliam@us.ibm.com> <200410210955.15904.pgilliam@us.ibm.com> <41792E5A.nailCWS110OUT@mindspring.com> <200410220957.46790.pgilliam@us.ibm.com> In-Reply-To: <200410220957.46790.pgilliam@us.ibm.com> User-Agent: nail 10.8 6/28/04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00372.txt.bz2 The design is good, but there are simple implementation nits, and one implementation problem that I haven't got to the bottom of yet. In setbacktrace.c, add a line "#include " to get the declaration of atoi. gcc HEAD does not warn about it today but it might eventually. :-/ When you name the tests, don't use "(...)" as part of the test name: set test "set backtrace" set test "full backtrace" set test "full backtrace (exact)" set test "partial backtrace" set test "partial backtrace (using limit)" Test names that differ only in that way are hard to talk about. Similarly, it's bad when one name is a prefix of another name. How about: set test "set backtrace" set test "full backtrace, ignore extra" set test "full backtrace, exact" set test "partial backtrace, with argument" set test "partial backtrace, with limit" There's a problem with the "partial backtrace (using limit)" test: set extra_frames [lrange $expected_frames 0 [expr $subr_depth + 2]] $expected_frames has 22 elements in it, and this call to lrange asks for elements 0 to 22, which is 23 elements. Here's the tough problem. I'm getting a weird random timeout on the "partial backtrace (using limit)" test. In a group of 12 configurations, I saw 2 PASS and 12 FAIL/timeout. I suspect some ".*" or "[^foo]*" that is too greedy and eating more than it should, leaving the later bits of the expect_list out to dry. gdb_expect_list is matching them one at a time so there is no backtracking if an early r.e. mistakenly eats too much. Specifically, it might be a problem with the definition of $leadin. Michael === 2004-10-14 Paul Gilliam * gdb.base/setbacktrace.c gdb.base/setbacktrace.exp: New files.