* [RFC] move strace call to gdb_init? (away from testcase)
@ 2011-02-23 8:46 Joel Brobecker
2011-02-23 9:22 ` Pierre Muller
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2011-02-23 8:46 UTC (permalink / raw)
To: gdb-patches
Hello,
One of the things I constantly notice everytime I start writing
a new testcase is that we always start it exactly the same way:
if $tracelevel then {
strace $tracelevel
}
I tried to research a bit how this works. As far as I can tell,
the "tracelevel" variable is controlled via runtest's --strace
command-line switch.
Runtest already does the call to strace:
"--str*" { # (--strace) expect trace level
set tracelevel $optarg
strace $tracelevel
So, I don't think that setting it ourselves is going to be doing
anything. As a test, I tried with various levels of strace-ing,
and nothing seemed to change. In particular, the output in gdb.log
remained the same with or without.
(it might have done something if each testcase script was executed
as it own expect process, but in fact, there is only one expect
process, and testcases are just "source"-ed)
So, I think we could just nuke the thing. Alternatively, we could
be a little extra conservative, and reset it systematically at
the start of every testcase, JIC a testcase changes the strace
level. The best place to do that is in proc gdb_init (lib/gdb.exp).
WDYT?
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [RFC] move strace call to gdb_init? (away from testcase)
2011-02-23 8:46 [RFC] move strace call to gdb_init? (away from testcase) Joel Brobecker
@ 2011-02-23 9:22 ` Pierre Muller
2011-02-23 9:29 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2011-02-23 9:22 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: gdb-patches
> Runtest already does the call to strace:
>
> "--str*" { # (--strace) expect trace level
> set tracelevel $optarg
> strace $tracelevel
I looked into dejagnu history on savanna git
http://git.savannah.gnu.org/gitweb/?p=dejagnu.git;a=summary
and checked that indeed this
strace code exists at least since initial repository creation in 2001.
> So, I don't think that setting it ourselves is going to be doing
> anything. As a test, I tried with various levels of strace-ing,
> and nothing seemed to change. In particular, the output in gdb.log
> remained the same with or without.
>
> (it might have done something if each testcase script was executed
> as it own expect process, but in fact, there is only one expect
> process, and testcases are just "source"-ed)
>
> So, I think we could just nuke the thing. Alternatively, we could
> be a little extra conservative, and reset it systematically at
> the start of every testcase, JIC a testcase changes the strace
> level. The best place to do that is in proc gdb_init (lib/gdb.exp).
No testcase changes tracelevel
for now..
> WDYT?
What about removing it completely
and adding tracelevel variable to the
list of banned variables in lib/gdb.exp
currently, this list has only two items:
gdb.exp, line 2767: set banned_variables { bug_id prms_id }
just add tracelevel variable to this list
and remove all
if {$tracelevel} {
strace $tracelevel
}
from all testcases.
Pierre Muller
GDB pascal language maintainer
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFC] move strace call to gdb_init? (away from testcase)
2011-02-23 9:22 ` Pierre Muller
@ 2011-02-23 9:29 ` Joel Brobecker
2011-02-23 14:56 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2011-02-23 9:29 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> No testcase changes tracelevel
> for now..
... and I forgot to say that I would consider that to be a bug
(to change the strace level without changing it)
> What about removing it completely and adding tracelevel variable to
> the list of banned variables in lib/gdb.exp currently, this list has
> only two items: gdb.exp, line 2767: set banned_variables { bug_id
> prms_id }
>
> just add tracelevel variable to this list and remove all
> if {$tracelevel} {
> strace $tracelevel
> }
> from all testcases.
That would definitely work for me!
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-23 9:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 8:46 [RFC] move strace call to gdb_init? (away from testcase) Joel Brobecker
2011-02-23 9:22 ` Pierre Muller
2011-02-23 9:29 ` Joel Brobecker
2011-02-23 14:56 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox