[testsuite] Don't use 'testfile' before 'standard_testfile'.
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Tue, 9 Feb 2021 17:11:28 +0000 (17:11 +0000)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Tue, 9 Feb 2021 20:35:21 +0000 (20:35 +0000)
While running tests on arm-none-eabi, I noticed following errors in some
gdb.threads tests.

ERROR: can't read "testfile": no such variable

These were being caused by ${testfile} being used before 'standard_testfile'
which sets it. This patch just moves standard_testfile before the use.

2021-02-09  Abid Qadeer  <abidh@codesourcery.com>

gdb/testsuite/ChangeLog:

* gdb.threads/signal-command-handle-nopass.exp: Call
'standard_testfile' before using 'testfile'.
* gdb.threads/signal-command-multiple-signals-pending.exp: Likewise.
* gdb.threads/signal-delivered-right-thread.exp: Likewise
* gdb.threads/signal-sigtrap.exp: Likewise

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
gdb/testsuite/gdb.threads/signal-sigtrap.exp

index ca011e4eb259f65d16032f4fb5a399a0dd2e5f16..e51f4d79435fbcb787734093c367a50a1cf1da84 100644 (file)
@@ -1,3 +1,11 @@
+2021-02-09  Abid Qadeer  <abidh@codesourcery.com>
+
+       * gdb.threads/signal-command-handle-nopass.exp: Call
+       'standard_testfile' before using 'testfile'.
+       * gdb.threads/signal-command-multiple-signals-pending.exp: Likewise.
+       * gdb.threads/signal-delivered-right-thread.exp: Likewise
+       * gdb.threads/signal-sigtrap.exp: Likewise
+
 2021-02-08  Luis Machado  <luis.machado@linaro.org>
 
        * gdb.base/gnu-ifunc.exp (build): Pass -Wl,z,lazy.
index d0ef5256a84ce900c8c6a40860dc968aafbf47e8..bef125c8ab425908f0f8080145d3e445eae51905 100644 (file)
 # delivered to the right thread, even if GDB has to step over a
 # breakpoint in some other thread first.
 
+standard_testfile
+
 if [target_info exists gdb,nosignals] {
     verbose "Skipping ${testfile}.exp because of nosignals."
     return -1
 }
 
-standard_testfile
-
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
         executable { debug }] != "" } {
     return -1
index d8f6f946e0e8c8a01fc36df4ba2d2c801e7c5d44..2d4417c6506f254cbb532298cea971c0b37b853b 100644 (file)
 # Test that "signal FOO" behaves correctly when we have multiple
 # threads that have stopped for a signal.
 
+standard_testfile
+
 if [target_info exists gdb,nosignals] {
     verbose "Skipping ${testfile}.exp because of nosignals."
     return -1
 }
 
-standard_testfile
-
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
         executable { debug }] != "" } {
     return -1
index 6ee899b34eb0ad6f1bf97a9289cd1c9b65341193..c635facca2d3634fbca70af72d6aec6aa16c73b4 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+standard_testfile
+
 if [target_info exists gdb,nosignals] {
     verbose "Skipping ${testfile}.exp because of nosignals."
     return -1
 }
 
-standard_testfile
-
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
         executable { debug }] != "" } {
     return -1
index 458bf8acd90d6d17808d38db857ca6ddd3df121a..92488a50ac1bb7724d38a694620cad493d276077 100644 (file)
 # Check that GDB doesn't forget to pass SIGTRAP to the program when
 # the user explicitly passes it with the signal command.
 
+standard_testfile
+
 if [target_info exists gdb,nosignals] {
     verbose "Skipping ${testfile}.exp because of nosignals."
     return -1
 }
 
-standard_testfile
-
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
     return -1
 }