Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hafiz Abid Qadeer <abidh@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] [testsuite] Don't use 'testfile' before 'standard_testfile'.
Date: Tue, 9 Feb 2021 18:11:48 +0000	[thread overview]
Message-ID: <20210209181148.2714175-1-abidh@codesourcery.com> (raw)

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/gdb.threads/signal-command-handle-nopass.exp    | 4 ++--
 .../gdb.threads/signal-command-multiple-signals-pending.exp   | 4 ++--
 gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp   | 4 ++--
 gdb/testsuite/gdb.threads/signal-sigtrap.exp                  | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
index d0ef5256a84..bef125c8ab4 100644
--- a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
+++ b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
@@ -18,13 +18,13 @@
 # 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
diff --git a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
index d8f6f946e0e..2d4417c6506 100644
--- a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
+++ b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
@@ -16,13 +16,13 @@
 # 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
diff --git a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
index 6ee899b34eb..c635facca2d 100644
--- a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
+++ b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
@@ -13,13 +13,13 @@
 # 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
diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.exp b/gdb/testsuite/gdb.threads/signal-sigtrap.exp
index 458bf8acd90..92488a50ac1 100644
--- a/gdb/testsuite/gdb.threads/signal-sigtrap.exp
+++ b/gdb/testsuite/gdb.threads/signal-sigtrap.exp
@@ -16,13 +16,13 @@
 # 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
 }
-- 
2.25.1


             reply	other threads:[~2021-02-09 18:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 18:11 Hafiz Abid Qadeer [this message]
2021-02-09 19:17 ` Tom Tromey

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=20210209181148.2714175-1-abidh@codesourcery.com \
    --to=abidh@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /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