* Extra diagnostic for tests
@ 2006-09-13 9:52 Vladimir Prus
2006-09-13 10:20 ` Mark Kettenis
2006-09-16 11:19 ` Vladimir Prus
0 siblings, 2 replies; 7+ messages in thread
From: Vladimir Prus @ 2006-09-13 9:52 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
Hi,
at the moment, the dejagnu tests use PATH to find the gdb binary, and don't
report which gdb binary is used. As result, when running runtest manually on
one test, one can test with different gdb from the one used by 'make check'.
The attached patch makes gdb print to log file the location of gdb, and also
makes sure invocation parameters are always printed to log file. While we're
on it, the 'serialport' parameter to 'target' command is also reported.
OK?
- Volodya
2006-09-13 Vladimir Prus <vladimir@codesourcery.com>
* lib/gdb.exp (default_gdb_start): Always add
invocation command to log file. Report the location where
gdb was found.
* lib/gdbserver-support.exp (gdb_target_cmd): Report
the serialport on connection, not just target kind.
[-- Attachment #2: gdb_testing_diagnostics.diff --]
[-- Type: text/x-diff, Size: 1876 bytes --]
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.70
diff -u -r1.70 gdb.exp
--- lib/gdb.exp 18 Aug 2006 18:34:18 -0000 1.70
+++ lib/gdb.exp 13 Sep 2006 09:45:24 -0000
@@ -1087,7 +1087,7 @@
gdb_stop_suppressing_tests;
- verbose "Spawning $GDB -nw $GDBFLAGS"
+ verbose -log "Spawning $GDB -nw $GDBFLAGS"
if [info exists gdb_spawn_id] {
return 0;
@@ -1097,6 +1097,8 @@
if { [which $GDB] == 0 } then {
perror "$GDB does not exist."
exit 1
+ } else {
+ verbose -log "GDB found at [which $GDB]"
}
}
set res [remote_spawn host "$GDB -nw $GDBFLAGS [host_info gdb_opts]"];
Index: lib/gdbserver-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdbserver-support.exp,v
retrieving revision 1.1
diff -u -r1.1 gdbserver-support.exp
--- lib/gdbserver-support.exp 8 Apr 2005 12:57:00 -0000 1.1
+++ lib/gdbserver-support.exp 13 Sep 2006 09:45:24 -0000
@@ -55,19 +55,19 @@
verbose "Connection failed"
}
-re "Remote MIPS debugging.*$gdb_prompt" {
- verbose "Set target to $targetname"
+ verbose "Set target to '$targetname $serialport'"
return 0
}
-re "Remote debugging using .*$serialport.*$gdb_prompt" {
- verbose "Set target to $targetname"
+ verbose "Set target to '$targetname $serialport'"
return 0
}
-re "Remote target $targetname connected to.*$gdb_prompt" {
- verbose "Set target to $targetname"
+ verbose "Set target to '$targetname $serialport'"
return 0
}
-re "Connected to.*$gdb_prompt" {
- verbose "Set target to $targetname"
+ verbose "Set target to '$targetname $serialport'"
return 0
}
-re "Ending remote.*$gdb_prompt" { }
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Extra diagnostic for tests
2006-09-13 9:52 Extra diagnostic for tests Vladimir Prus
@ 2006-09-13 10:20 ` Mark Kettenis
2006-09-13 12:24 ` Daniel Jacobowitz
2006-09-13 17:58 ` Michael Snyder
2006-09-16 11:19 ` Vladimir Prus
1 sibling, 2 replies; 7+ messages in thread
From: Mark Kettenis @ 2006-09-13 10:20 UTC (permalink / raw)
To: vladimir; +Cc: gdb-patches
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Wed, 13 Sep 2006 13:52:16 +0400
>
> Hi,
> at the moment, the dejagnu tests use PATH to find the gdb binary, and don't
> report which gdb binary is used. As result, when running runtest manually on
> one test, one can test with different gdb from the one used by 'make check'.
There must be something wrong with your setup. I have a gdb somewhere
in my PATH, but I'm damn sure the testsuite picks up the gdb in my
build tree.
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra diagnostic for tests
2006-09-13 10:20 ` Mark Kettenis
@ 2006-09-13 12:24 ` Daniel Jacobowitz
2006-09-13 17:58 ` Michael Snyder
1 sibling, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-09-13 12:24 UTC (permalink / raw)
To: Mark Kettenis; +Cc: vladimir, gdb-patches
On Wed, Sep 13, 2006 at 12:18:01PM +0200, Mark Kettenis wrote:
> > From: Vladimir Prus <vladimir@codesourcery.com>
> > Date: Wed, 13 Sep 2006 13:52:16 +0400
> >
> > Hi,
> > at the moment, the dejagnu tests use PATH to find the gdb binary, and don't
> > report which gdb binary is used. As result, when running runtest manually on
> > one test, one can test with different gdb from the one used by 'make check'.
>
> There must be something wrong with your setup. I have a gdb somewhere
> in my PATH, but I'm damn sure the testsuite picks up the gdb in my
> build tree.
It does: but I suspect Vlad is using our local testing setup, which
actually tests outside of the build directory. The check for ../gdb
should be earlier than the path search.
We actually run just the testsuite configure script in an empty
directory, and 99.9% of tests work from there. Handy when testing
prebuilt packages.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Extra diagnostic for tests
2006-09-13 10:20 ` Mark Kettenis
2006-09-13 12:24 ` Daniel Jacobowitz
@ 2006-09-13 17:58 ` Michael Snyder
1 sibling, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2006-09-13 17:58 UTC (permalink / raw)
To: Mark Kettenis, vladimir; +Cc: gdb-patches
Yeah, but it's possible to run the testsuite somewhere other than the build tree.
-----Original Message-----
From: gdb-patches-owner@sourceware.org on behalf of Mark Kettenis
Sent: Wed 9/13/2006 3:18 AM
To: vladimir@codesourcery.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Extra diagnostic for tests
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Wed, 13 Sep 2006 13:52:16 +0400
>
> Hi,
> at the moment, the dejagnu tests use PATH to find the gdb binary, and don't
> report which gdb binary is used. As result, when running runtest manually on
> one test, one can test with different gdb from the one used by 'make check'.
There must be something wrong with your setup. I have a gdb somewhere
in my PATH, but I'm damn sure the testsuite picks up the gdb in my
build tree.
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra diagnostic for tests
2006-09-13 9:52 Extra diagnostic for tests Vladimir Prus
2006-09-13 10:20 ` Mark Kettenis
@ 2006-09-16 11:19 ` Vladimir Prus
2006-09-16 14:20 ` Daniel Jacobowitz
2006-09-23 16:55 ` Mark Kettenis
1 sibling, 2 replies; 7+ messages in thread
From: Vladimir Prus @ 2006-09-16 11:19 UTC (permalink / raw)
To: gdb-patches
Vladimir Prus wrote:
>
> Hi,
> at the moment, the dejagnu tests use PATH to find the gdb binary, and
> don't report which gdb binary is used. As result, when running runtest
> manually on one test, one can test with different gdb from the one used by
> 'make check'.
>
> The attached patch makes gdb print to log file the location of gdb, and
> also makes sure invocation parameters are always printed to log file.
> While we're on it, the 'serialport' parameter to 'target' command is also
> reported.
So, what's opinion on this patch, after all?
I think the part about better reporting 'target remote' seen no objections,
OK to commit that?
Speaking of gdb PATH, I've noticed that the very last line of dejagnu output
contains the full path to gdb -- apparently I used 'Ctrl-C' too much.
Anyway, I think getting this information into log file is still desirable,
and it makes sure that .log file is sufficient to reproduce a test
failures -- console output might be no longer handy.
- Volodya
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra diagnostic for tests
2006-09-16 11:19 ` Vladimir Prus
@ 2006-09-16 14:20 ` Daniel Jacobowitz
2006-09-23 16:55 ` Mark Kettenis
1 sibling, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-09-16 14:20 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
On Sat, Sep 16, 2006 at 03:19:22PM +0400, Vladimir Prus wrote:
> So, what's opinion on this patch, after all?
The patch is OK to commit.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra diagnostic for tests
2006-09-16 11:19 ` Vladimir Prus
2006-09-16 14:20 ` Daniel Jacobowitz
@ 2006-09-23 16:55 ` Mark Kettenis
1 sibling, 0 replies; 7+ messages in thread
From: Mark Kettenis @ 2006-09-23 16:55 UTC (permalink / raw)
To: ghost; +Cc: gdb-patches
> From: Vladimir Prus <ghost@cs.msu.su>
> Date: Sat, 16 Sep 2006 15:19:22 +0400
>
> Vladimir Prus wrote:
>
> >
> > Hi,
> > at the moment, the dejagnu tests use PATH to find the gdb binary, and
> > don't report which gdb binary is used. As result, when running runtest
> > manually on one test, one can test with different gdb from the one used by
> > 'make check'.
> >
> > The attached patch makes gdb print to log file the location of gdb, and
> > also makes sure invocation parameters are always printed to log file.
> > While we're on it, the 'serialport' parameter to 'target' command is also
> > reported.
>
> So, what's opinion on this patch, after all?
I think it is unnecessary, since...
> Speaking of gdb PATH, I've noticed that the very last line of dejagnu output
> contains the full path to gdb -- apparently I used 'Ctrl-C' too much.
>
> Anyway, I think getting this information into log file is still desirable,
> and it makes sure that .log file is sufficient to reproduce a test
> failures -- console output might be no longer handy.
It is printed at the end of the run, both in gdb.sum and gdb.log.
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-09-23 16:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13 9:52 Extra diagnostic for tests Vladimir Prus
2006-09-13 10:20 ` Mark Kettenis
2006-09-13 12:24 ` Daniel Jacobowitz
2006-09-13 17:58 ` Michael Snyder
2006-09-16 11:19 ` Vladimir Prus
2006-09-16 14:20 ` Daniel Jacobowitz
2006-09-23 16:55 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox