From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Cc: Yichao Yu <yyc1992@gmail.com>
Subject: [PATCH 2/3] Make gdb.base/jit.exp binaries unique
Date: Wed, 23 Mar 2016 13:30:00 -0000 [thread overview]
Message-ID: <1458739792-9864-3-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1458739792-9864-1-git-send-email-palves@redhat.com>
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.
---
gdb/testsuite/gdb.base/jit.exp | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp
index b51b878..3e12301 100644
--- a/gdb/testsuite/gdb.base/jit.exp
+++ b/gdb/testsuite/gdb.base/jit.exp
@@ -24,18 +24,19 @@ if {[get_compiler_info]} {
return 1
}
-#
-# test running programs
-#
+# Compile the testcase program and library. BINSUFFIX is the suffix
+# to append to the program and library filenames, to make them unique
+# between invocations. OPTIONS is passed to gdb_compile when
+# compiling the program.
-proc compile_jit_test {testname options} {
+proc compile_jit_test {testname binsuffix options} {
global testfile srcfile binfile srcdir subdir
global solib_testfile solib_srcfile solib_binfile solib_binfile_test_msg
global solib_binfile_target
set testfile jit-main
set srcfile ${testfile}.c
- set binfile [standard_output_file $testfile]
+ set binfile [standard_output_file $testfile$binsuffix]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [concat debug $options]] != "" } {
untested $testname
@@ -44,8 +45,8 @@ proc compile_jit_test {testname options} {
set solib_testfile "jit-solib"
set solib_srcfile "${srcdir}/${subdir}/${solib_testfile}.c"
- set solib_binfile [standard_output_file ${solib_testfile}.so]
- set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}.so"
+ set solib_binfile [standard_output_file ${solib_testfile}$binsuffix.so]
+ set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}$binsuffix.so"
# Note: compiling without debug info: the library goes through
# symbol renaming by munging on its symbol table, and that
@@ -109,7 +110,7 @@ proc one_jit_test {count match_str} {
}
}
-if {[compile_jit_test jit.exp {}] < 0} {
+if {[compile_jit_test jit.exp "" {}] < 0} {
return
}
one_jit_test 1 "${hex} jit_function_0000"
@@ -117,7 +118,7 @@ one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001"
with_test_prefix PIE {
if {[compile_jit_test "jit.exp PIE tests" \
- {additional_flags=-fPIE ldflags=-pie}] < 0} {
+ "-pie" {additional_flags=-fPIE ldflags=-pie}] < 0} {
return
}
--
2.5.5
next prev parent reply other threads:[~2016-03-23 13:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 13:30 [PATCH 0/3] Fix PR gdb/19858: GDB doesn't register the JIT libraries on attach Pedro Alves
2016-03-23 13:30 ` [PATCH 3/3] Add regression test for PR gdb/19858 (JIT code registration on attach) Pedro Alves
2016-03-24 9:15 ` Yao Qi
2016-03-23 13:30 ` [PATCH 1/3] Fix PR gdb/19858: GDB doesn't register the JIT libraries on attach Pedro Alves
2016-03-24 8:59 ` Yao Qi
2016-03-23 13:30 ` Pedro Alves [this message]
2016-03-24 9:01 ` [PATCH 2/3] Make gdb.base/jit.exp binaries unique Yao Qi
2016-09-27 17:46 ` [testsuite bugreport] gdb.base/jit.exp has false PASSes, probably [Re: [PATCH 2/3] Make gdb.base/jit.exp binaries unique] Jan Kratochvil
2016-03-31 18:47 ` [PATCH 0/3] Fix PR gdb/19858: GDB doesn't register the JIT libraries on attach Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458739792-9864-3-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yyc1992@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).