* [Jim Blandy <jimb@redhat.com>] RFA: testsuite: pass optimization flag in the proper way
@ 2002-12-20 11:00 Jim Blandy
2002-12-22 3:04 ` Fernando Nasser
0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2002-12-20 11:00 UTC (permalink / raw)
To: Fernando Nasser; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 33 bytes --]
Ping on this test suite patch.
[-- Attachment #2: Type: message/rfc822, Size: 3562 bytes --]
From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: testsuite: pass optimization flag in the proper way
Date: 18 Nov 2002 22:38:55 -0500
Message-ID: <vt23cpykz3k.fsf@zenia.red-bean.com>
2002-11-18 Jim Blandy <jimb@redhat.com>
* 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 19 Nov 2002 02:48:02 -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,64 ----
set testfile "actions"
set srcfile ${testfile}.c
set binfile $objdir/$subdir/$testfile
!
! # 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)?
! 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Jim Blandy <jimb@redhat.com>] RFA: testsuite: pass optimization flag in the proper way
2002-12-20 11:00 [Jim Blandy <jimb@redhat.com>] RFA: testsuite: pass optimization flag in the proper way Jim Blandy
@ 2002-12-22 3:04 ` Fernando Nasser
2002-12-22 18:50 ` Jim Blandy
0 siblings, 1 reply; 3+ messages in thread
From: Fernando Nasser @ 2002-12-22 3:04 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches
> ! # 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.
Sorry for the delay.
Regards,
Fernando
Jim Blandy wrote:
> Ping on this test suite patch.
>
>
>
> ------------------------------------------------------------------------
>
> Subject:
> RFA: testsuite: pass optimization flag in the proper way
> From:
> Jim Blandy <jimb@redhat.com>
> Date:
> 18 Nov 2002 22:38:55 -0500
> To:
> gdb-patches@sources.redhat.com
>
>
> 2002-11-18 Jim Blandy <jimb@redhat.com>
>
> * 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 19 Nov 2002 02:48:02 -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,64 ----
> set testfile "actions"
> set srcfile ${testfile}.c
> set binfile $objdir/$subdir/$testfile
> !
> ! # 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)?
> ! 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
>
>
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Jim Blandy <jimb@redhat.com>] RFA: testsuite: pass optimization flag in the proper way
2002-12-22 3:04 ` Fernando Nasser
@ 2002-12-22 18:50 ` Jim Blandy
0 siblings, 0 replies; 3+ messages in thread
From: Jim Blandy @ 2002-12-22 18:50 UTC (permalink / raw)
To: Fernando Nasser; +Cc: gdb-patches
Fernando Nasser <fnasser@redhat.com> 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 <jimb@redhat.com>
* 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-23 0:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-20 11:00 [Jim Blandy <jimb@redhat.com>] RFA: testsuite: pass optimization flag in the proper way Jim Blandy
2002-12-22 3:04 ` Fernando Nasser
2002-12-22 18:50 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox