From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21097 invoked by alias); 10 Sep 2004 13:50:26 -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 20560 invoked from network); 10 Sep 2004 13:50:15 -0000 Received: from unknown (HELO smtp10.atl.mindspring.net) (207.69.200.246) by sourceware.org with SMTP; 10 Sep 2004 13:50:15 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by smtp10.atl.mindspring.net with esmtp (Exim 3.33 #1) id 1C5ln1-0006Uy-00; Fri, 10 Sep 2004 09:50:11 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id 17C904B102; Fri, 10 Sep 2004 09:50:34 -0400 (EDT) Date: Fri, 10 Sep 2004 13:50:00 -0000 From: Michael Chastain To: eliz@gnu.org, gdb-patches@sources.redhat.com Subject: [rfc/testsuite/doco] deprecate.txt Message-ID: <4141B12A.nail2461S2ZKE@mindspring.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-09/txt/msg00164.txt.bz2 Here is a new file, gdb/testsuite/deprecate.txt. I think it's more useful to keep this file inside gdb/testsuite rather than making it a section of doc/gdbint.texinfo . Eli, is that okay with you? I'm also interested in comments on the four entries that I've written so far, plus suggestions for new entries. Michael === Deprecated Code in the GDB Test Suite These coding practices are deprecated. Avoid them in new code. bug-gdb@prep.ai.mit.edu This address no longer accepts mail. Just drop the lines in the header about "Please email any bugs, comments, and/or additions to this file to: bug-gdb@prep.ai.mit.edu". exp_continue You should usually use this form: exp_continue -continue_timer The default form of "exp_continue" with no arguments resets the timeout timer. This leads to infinite loops if gdb has a bug (and if gdb had no bugs then we would not need to test it). The "-continue_timer" form does not reset the timeout timer, so if gdb gets stuck in a loop, it will bust out soon enough. So if you use the default form, you need a loop counter or some other explicit way to make sure that the test never goes into an infinite loop. gdb_suppress_entire_file gdb_suppress_entire_file sets funny global state. For gdb_compile, just do this: if { [gdb_compile ...] != "" } { perror "Testcase compile failed" 0 continue } send_gdb + gdb_expect Use gdb_test_multiple instead.