From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21938 invoked by alias); 31 Aug 2004 15:01:49 -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 21931 invoked from network); 31 Aug 2004 15:01:48 -0000 Received: from unknown (HELO maynard.mail.mindspring.net) (207.69.200.243) by sourceware.org with SMTP; 31 Aug 2004 15:01:48 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by maynard.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1C2A8e-0006AN-00; Tue, 31 Aug 2004 11:01:36 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id A1CF24B102; Tue, 31 Aug 2004 11:02:03 -0400 (EDT) Date: Tue, 31 Aug 2004 15:01:00 -0000 From: Michael Chastain To: ibr@ata.cs.hun.edu.tr, gdb-patches@sources.redhat.com Subject: Re: testcase for "absolute source" patch Message-ID: <413492EA.nailCGN1URW10@mindspring.com> References: <20040816144349.GB1509@ata.cs.hun.edu.tr> <412107B7.nailE7I1XJVIH@mindspring.com> <20040818130626.GB1411@ata.cs.hun.edu.tr> <4123763C.nailM3P11DT7E@mindspring.com> <20040818155324.GC1411@ata.cs.hun.edu.tr> <4123A736.nail5OO17XN7L@mindspring.com> <20040818220613.GA3143@ata.cs.hun.edu.tr> <4123E749.nail65Z1YIZ3O@mindspring.com> <20040826203603.GA18267@ata.cs.hun.edu.tr> <412F4235.nailDKT1M7PGM@mindspring.com> <20040827164839.GC31959@ata.cs.hun.edu.tr> In-Reply-To: <20040827164839.GC31959@ata.cs.hun.edu.tr> 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-08/txt/msg00783.txt.bz2 Good morning Barjaun, More feedback. This is all still shallow stuff. In another 1-2 rounds, all the shallow stuff will be fixed, and also enough of the code will have permeated my brain that I can actually talk about the real contents. . The script works for me now when I run it several times in a row with different gdb's, gcc's, and debug formats. . Include openp.c as a second attachment to your mail. . ChangeLog entry . if [is_remote host] { unresolved "This test script does not work on a remote host." return -1 } . error checking on calls to remote_exec . gdb_suppress_entire_file is rotten and obsolete. if gdb_compile fails, just do: if {[gdb_compile ...] != ""} { perror "Testcase compile failed" 0 return -1 } and then check the return value from cdir_compile . the convention for gdb_start and gdb_exit is to assume that the previous test script left a gdb running and to call gdb_exit first, followed by gdb_start. . in test_bin, don't move the file back and forth -- just copy the file and then leave the copy in place. disk space is cheap, and "mv $binfile $bin_dir ... $mv $bin_dir/$binname $binfile" is vulnerable to cascade failures when you call test_bin 13 times in a row and one of them might de-synchronize. same with test_src. Or am i missing something and it will screw up some tests if you let the prime copies of $srcfile and $binfile exist all the time? . in test_src, drop the semicolons here: global srcname; global srcfile; . don't bother to do "remote_exec host rm $srcfile" In general, for file handling, just create and copy things and don't delete or move them. That makes it easier to debug your script or debug gdb when something doesn't work. Just be prepared that an old copy of something might exist, so plain "mkdir" does not work, but "mkdir -p" is good.