* FYI: fix test name in gdb-index.exp
@ 2013-08-28 14:20 Tom Tromey
2013-08-28 14:55 ` Doug Evans
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2013-08-28 14:20 UTC (permalink / raw)
To: gdb-patches
I'm checking this in.
The new gdb-index.exp test included a directory name in a test name.
This lead to spurious failures for me, because I ran the baseline tests
in a different directory.
Tom
2013-08-28 Tom Tromey <tromey@redhat.com>
* gdb.dwarf2/gdb-index.exp (add_gdb_index): Use explicit test name
when saving index.
Index: gdb.dwarf2/gdb-index.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/gdb-index.exp,v
retrieving revision 1.1
diff -u -r1.1 gdb-index.exp
--- gdb.dwarf2/gdb-index.exp 26 Aug 2013 18:43:40 -0000 1.1
+++ gdb.dwarf2/gdb-index.exp 28 Aug 2013 14:17:05 -0000
@@ -36,7 +36,8 @@
set index_file ${program}.gdb-index
verbose -log "index_file: ${index_file}"
remote_file host delete ${index_file}
- gdb_test_no_output "save gdb-index [file dirname ${index_file}]"
+ gdb_test_no_output "save gdb-index [file dirname ${index_file}]" \
+ "save gdb-index for file [file tail ${program}]"
# No point in continuing if generating the index failed.
# N.B.: There are times when gdb won't create an index, and it's not a
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: FYI: fix test name in gdb-index.exp
2013-08-28 14:20 FYI: fix test name in gdb-index.exp Tom Tromey
@ 2013-08-28 14:55 ` Doug Evans
2013-08-28 15:58 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2013-08-28 14:55 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
TIL: It's not just that test names have to be unique, but they can no
longer include build directory names because the latter can be machine
generated, and when diff'ing before/after runs it can lead to spurious
output needing investigating.
Good to know, thanks. And good thing to add to the testcase cookbook.
On Wed, Aug 28, 2013 at 7:20 AM, Tom Tromey <tromey@redhat.com> wrote:
> I'm checking this in.
>
> The new gdb-index.exp test included a directory name in a test name.
> This lead to spurious failures for me, because I ran the baseline tests
> in a different directory.
>
> Tom
>
> 2013-08-28 Tom Tromey <tromey@redhat.com>
>
> * gdb.dwarf2/gdb-index.exp (add_gdb_index): Use explicit test name
> when saving index.
>
> Index: gdb.dwarf2/gdb-index.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/gdb-index.exp,v
> retrieving revision 1.1
> diff -u -r1.1 gdb-index.exp
> --- gdb.dwarf2/gdb-index.exp 26 Aug 2013 18:43:40 -0000 1.1
> +++ gdb.dwarf2/gdb-index.exp 28 Aug 2013 14:17:05 -0000
> @@ -36,7 +36,8 @@
> set index_file ${program}.gdb-index
> verbose -log "index_file: ${index_file}"
> remote_file host delete ${index_file}
> - gdb_test_no_output "save gdb-index [file dirname ${index_file}]"
> + gdb_test_no_output "save gdb-index [file dirname ${index_file}]" \
> + "save gdb-index for file [file tail ${program}]"
>
> # No point in continuing if generating the index failed.
> # N.B.: There are times when gdb won't create an index, and it's not a
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: FYI: fix test name in gdb-index.exp
2013-08-28 14:55 ` Doug Evans
@ 2013-08-28 15:58 ` Tom Tromey
0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2013-08-28 15:58 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
Doug> TIL: It's not just that test names have to be unique, but they can no
Doug> longer include build directory names because the latter can be machine
Doug> generated, and when diff'ing before/after runs it can lead to spurious
Doug> output needing investigating.
Yeah, I think it's actually always been that way.
I've fixed a number of these over the years.
Basically anything that makes the test names differ across runs is bad.
This is hard to fix in the general case but something like the directory
name is an easy one.
Doug> Good to know, thanks. And good thing to add to the testcase cookbook.
Will do.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-28 15:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-28 14:20 FYI: fix test name in gdb-index.exp Tom Tromey
2013-08-28 14:55 ` Doug Evans
2013-08-28 15:58 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox