[3/3] gdb/testsuite: fix minor things in jit tests

Message ID 5260086312a9ec7d276a432ca88126924e0f2b5d.1590397723.git.tankut.baris.aktemur@intel.com
State New
Headers show
Series
  • Handling multiple JITers
Related show

Commit Message

Christian Biesinger via Gdb-patches May 25, 2020, 9:38 a.m.
gdb/testsuite/ChangeLog:
2020-05-25  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* gdb.base/jit-elf-so.exp: Refer to the global main_loader_basename
	variable.
	* gdb.base/jit-reader-simple.exp: Fix typo ("Built" -> "Build"),
	and use the already-defined 'options' variable.
---
 gdb/testsuite/gdb.base/jit-elf-so.exp        | 2 +-
 gdb/testsuite/gdb.base/jit-reader-simple.exp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1

Comments

Simon Marchi June 14, 2020, 6:09 p.m. | #1
On 2020-05-25 5:38 a.m., Tankut Baris Aktemur via Gdb-patches wrote:
> gdb/testsuite/ChangeLog:

> 2020-05-25  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

> 

> 	* gdb.base/jit-elf-so.exp: Refer to the global main_loader_basename

> 	variable.

> 	* gdb.base/jit-reader-simple.exp: Fix typo ("Built" -> "Build"),

> 	and use the already-defined 'options' variable.

> ---

>  gdb/testsuite/gdb.base/jit-elf-so.exp        | 2 +-

>  gdb/testsuite/gdb.base/jit-reader-simple.exp | 4 ++--

>  2 files changed, 3 insertions(+), 3 deletions(-)

> 

> diff --git a/gdb/testsuite/gdb.base/jit-elf-so.exp b/gdb/testsuite/gdb.base/jit-elf-so.exp

> index 51c1d33ff9b..091fe5df812 100644

> --- a/gdb/testsuite/gdb.base/jit-elf-so.exp

> +++ b/gdb/testsuite/gdb.base/jit-elf-so.exp

> @@ -50,7 +50,7 @@ set jit_solib_srcfile ${srcdir}/${subdir}/${jit_solib_basename}.c

>  # On success, return 0.

>  # On failure, return -1.

>  proc compile_jit_dlmain {options} {

> -    global main_loader_srcfile main_loader_binfile

> +    global main_loader_srcfile main_loader_binfile main_loader_basename

>      set options [concat $options debug]

>  

>      if { [gdb_compile ${main_loader_srcfile} ${main_loader_binfile} \

> diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp

> index 930c59c0124..d8a54a37ce7 100644

> --- a/gdb/testsuite/gdb.base/jit-reader-simple.exp

> +++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp

> @@ -77,12 +77,12 @@ if {[build_shared_jit] == -1} {

>      return

>  }

>  

> -# Built the program that loads the JIT library.

> +# Build the program that loads the JIT library.

>  set srcfile_dl $testfile-dl.c

>  set binfile_dl $binfile-dl

>  set options [list debug shlib=${binfile_lib}]

>  if {[gdb_compile ${srcdir}/${subdir}/${srcfile_dl} $binfile_dl executable \

> -	 [list debug shlib=$binfile_lib]] == -1 } {

> +	 $options] == -1 } {

>      untested "failed to compile"

>      return -1

>  }

> -- 

> 2.17.1

> 


This LGTM, and it seems it could be pushed on its own?

Simon
Christian Biesinger via Gdb-patches June 15, 2020, 7:15 a.m. | #2
On Sunday, June 14, 2020 8:10 PM, Simon Marchi wrote:
> On 2020-05-25 5:38 a.m., Tankut Baris Aktemur via Gdb-patches wrote:

> > gdb/testsuite/ChangeLog:

> > 2020-05-25  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

> >

> > 	* gdb.base/jit-elf-so.exp: Refer to the global main_loader_basename

> > 	variable.

> > 	* gdb.base/jit-reader-simple.exp: Fix typo ("Built" -> "Build"),

> > 	and use the already-defined 'options' variable.

> > ---

> >  gdb/testsuite/gdb.base/jit-elf-so.exp        | 2 +-

> >  gdb/testsuite/gdb.base/jit-reader-simple.exp | 4 ++--

> >  2 files changed, 3 insertions(+), 3 deletions(-)

> >

> > diff --git a/gdb/testsuite/gdb.base/jit-elf-so.exp b/gdb/testsuite/gdb.base/jit-elf-so.exp

> > index 51c1d33ff9b..091fe5df812 100644

> > --- a/gdb/testsuite/gdb.base/jit-elf-so.exp

> > +++ b/gdb/testsuite/gdb.base/jit-elf-so.exp

> > @@ -50,7 +50,7 @@ set jit_solib_srcfile ${srcdir}/${subdir}/${jit_solib_basename}.c

> >  # On success, return 0.

> >  # On failure, return -1.

> >  proc compile_jit_dlmain {options} {

> > -    global main_loader_srcfile main_loader_binfile

> > +    global main_loader_srcfile main_loader_binfile main_loader_basename

> >      set options [concat $options debug]

> >

> >      if { [gdb_compile ${main_loader_srcfile} ${main_loader_binfile} \

> > diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp

> > index 930c59c0124..d8a54a37ce7 100644

> > --- a/gdb/testsuite/gdb.base/jit-reader-simple.exp

> > +++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp

> > @@ -77,12 +77,12 @@ if {[build_shared_jit] == -1} {

> >      return

> >  }

> >

> > -# Built the program that loads the JIT library.

> > +# Build the program that loads the JIT library.

> >  set srcfile_dl $testfile-dl.c

> >  set binfile_dl $binfile-dl

> >  set options [list debug shlib=${binfile_lib}]

> >  if {[gdb_compile ${srcdir}/${subdir}/${srcfile_dl} $binfile_dl executable \

> > -	 [list debug shlib=$binfile_lib]] == -1 } {

> > +	 $options] == -1 } {

> >      untested "failed to compile"

> >      return -1

> >  }

> > --

> > 2.17.1

> >

> 

> This LGTM, and it seems it could be pushed on its own?

> 

> Simon


Yes, it's independent from the other patches.  I pushed it and will not
include in the v2 of the series.

Thanks.
-Baris


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Patch

diff --git a/gdb/testsuite/gdb.base/jit-elf-so.exp b/gdb/testsuite/gdb.base/jit-elf-so.exp
index 51c1d33ff9b..091fe5df812 100644
--- a/gdb/testsuite/gdb.base/jit-elf-so.exp
+++ b/gdb/testsuite/gdb.base/jit-elf-so.exp
@@ -50,7 +50,7 @@  set jit_solib_srcfile ${srcdir}/${subdir}/${jit_solib_basename}.c
 # On success, return 0.
 # On failure, return -1.
 proc compile_jit_dlmain {options} {
-    global main_loader_srcfile main_loader_binfile
+    global main_loader_srcfile main_loader_binfile main_loader_basename
     set options [concat $options debug]
 
     if { [gdb_compile ${main_loader_srcfile} ${main_loader_binfile} \
diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp
index 930c59c0124..d8a54a37ce7 100644
--- a/gdb/testsuite/gdb.base/jit-reader-simple.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp
@@ -77,12 +77,12 @@  if {[build_shared_jit] == -1} {
     return
 }
 
-# Built the program that loads the JIT library.
+# Build the program that loads the JIT library.
 set srcfile_dl $testfile-dl.c
 set binfile_dl $binfile-dl
 set options [list debug shlib=${binfile_lib}]
 if {[gdb_compile ${srcdir}/${subdir}/${srcfile_dl} $binfile_dl executable \
-	 [list debug shlib=$binfile_lib]] == -1 } {
+	 $options] == -1 } {
     untested "failed to compile"
     return -1
 }