[testsuite bugreport] gdb.base/jit.exp has false PASSes, probably [Re: [PATCH 2/3] Make gdb.base/jit.exp binaries unique]
Jan Kratochvil
jan.kratochvil@redhat.com
Tue Sep 27 17:46:00 GMT 2016
On Wed, 23 Mar 2016 14:29:51 +0100, Pedro Alves wrote:
> This testcase compiles the same program and library differently
> multiple times using the same file names. Make them unique, to make
> it easier to debug test problems.
>
> gdb/testsuite/ChangeLog:
> 2016-03-23 Pedro Alves <palves@redhat.com>
>
> PR gdb/19858
> * gdb.base/jit.exp (compile_jit_test): Add intro comment. Add
> BINSUFFIX parameter, and handle it.
> (top level): Adjust calls compile_jit_test.
commit 40dea8cbf6b40f159bdfab4f3d8ec9010c293e84
Author: Pedro Alves <palves@redhat.com>
Date: Thu Mar 31 19:28:47 2016 +0100
Make gdb.base/jit.exp binaries unique
Message-Id: <1458739792-9864-3-git-send-email-palves@redhat.com>
This change is wrong as it sets variable $binfile to the new filename but the
variable $binfile is never used. Therefore the testcase still uses the
unsuffixed binary even for testcases where a suffixed binary should be used.
The proper fix - to use the new $binfile value - is OK for this commit (it has
no effect on the testfile results). But the later patch
commit 64cdf930d9ed85e93ae55adbc20b0f9848ef863b
Author: Pedro Alves <palves@redhat.com>
Date: Thu Mar 31 19:28:47 2016 +0100
Add regression test for PR gdb/19858 (JIT code registration on attach)
depends on this testfile deficiency and so with the proper use of suffixed
$binfile it starts to FAIL.
Jan
-------------- next part --------------
diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp
index 3e12301..d2c4605 100644
--- a/gdb/testsuite/gdb.base/jit.exp
+++ b/gdb/testsuite/gdb.base/jit.exp
@@ -68,9 +68,9 @@ proc compile_jit_test {testname binsuffix options} {
proc one_jit_test {count match_str} {
with_test_prefix "one_jit_test-$count" {
- global verbose testfile solib_binfile_target solib_binfile_test_msg
+ global verbose binfile solib_binfile_target solib_binfile_test_msg
- clean_restart $testfile
+ clean_restart [file tail $binfile]
# This is just to help debugging when things fail
if {$verbose > 0} {
-------------- next part --------------
diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp
index 3e12301..568fb50 100644
--- a/gdb/testsuite/gdb.base/jit.exp
+++ b/gdb/testsuite/gdb.base/jit.exp
@@ -42,6 +42,7 @@ proc compile_jit_test {testname binsuffix options} {
untested $testname
return -1
}
+ set binfile foo${binfile}bar
set solib_testfile "jit-solib"
set solib_srcfile "${srcdir}/${subdir}/${solib_testfile}.c"
More information about the Gdb-patches
mailing list