From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2788 invoked by alias); 23 Dec 2002 00:01:35 -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 2759 invoked from network); 23 Dec 2002 00:01:31 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by 209.249.29.67 with SMTP; 23 Dec 2002 00:01:31 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id gBMNh05h003784; Sun, 22 Dec 2002 18:43:00 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id gBMNgxIN003780; Sun, 22 Dec 2002 18:42:59 -0500 To: Fernando Nasser Cc: gdb-patches@sources.redhat.com Subject: Re: [Jim Blandy ] RFA: testsuite: pass optimization flag in the proper way References: <3E059F82.3040101@redhat.com> From: Jim Blandy Date: Sun, 22 Dec 2002 18:50:00 -0000 In-Reply-To: <3E059F82.3040101@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.92 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00626.txt.bz2 Fernando Nasser writes: > > ! # Why do we need to specify '-O1' here? Shouldn't that sort of > > ! # compilation parameter be under the control of the test framework > > ! # (the target_list and so on)? > > Because you would be changing it for all tests while this test seems > to require a specific setting.for some reason. > > This part is approved: > > > ! if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \ > > ! executable {debug additional_flags=-w optimize=-O1}] != "" } { > > The comment could be: > > "Why do we need this specific optimization level here?" > > or the answer to this question if you know why. Okay, thanks. I've committed the following: 2002-12-22 Jim Blandy * gdb.trace/tfind.exp: Pass '-O1' flag via the 'optimize' option, rather than as part of the output file name. Index: gdb/testsuite/gdb.trace/tfind.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/tfind.exp,v retrieving revision 1.2 diff -c -r1.2 tfind.exp *** gdb/testsuite/gdb.trace/tfind.exp 6 Mar 2001 08:22:00 -0000 1.2 --- gdb/testsuite/gdb.trace/tfind.exp 22 Dec 2002 23:58:33 -0000 *************** *** 53,60 **** set testfile "actions" set srcfile ${testfile}.c set binfile $objdir/$subdir/$testfile ! if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile -O1" \ ! executable {debug additional_flags=-w}] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } gdb_load $binfile --- 53,65 ---- set testfile "actions" set srcfile ${testfile}.c set binfile $objdir/$subdir/$testfile ! ! # Why does this test require '-O1' level optimization? (In ! # general, the optimization level should be left under the control ! # of the test framework (target_list and so on), so if we don't ! # have to override it in individual tests like this, we shouldn't.) ! if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \ ! executable {debug additional_flags=-w optimize=-O1}] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } gdb_load $binfile