public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Rename to allow_tsx_tests
Date: Fri, 13 Jan 2023 20:40:11 +0000 (GMT)	[thread overview]
Message-ID: <20230113204011.A59A23857438@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1cf897dec9466eed3d63f3b0c42257f41eb55fcc

commit 1cf897dec9466eed3d63f3b0c42257f41eb55fcc
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Jan 8 11:48:57 2023 -0700

    Rename to allow_tsx_tests
    
    This changes skip_tsx_tests to invert the sense, and renames it to
    allow_tsx_tests.

Diff:
---
 gdb/testsuite/gdb.btrace/tsx.exp |  2 +-
 gdb/testsuite/lib/gdb.exp        | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp
index 222c352c368..b56fd2858e0 100644
--- a/gdb/testsuite/gdb.btrace/tsx.exp
+++ b/gdb/testsuite/gdb.btrace/tsx.exp
@@ -15,7 +15,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-require allow_btrace_pt_tests !skip_tsx_tests
+require allow_btrace_pt_tests allow_tsx_tests
 
 standard_testfile .c x86-tsx.S
 if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index c989d9e0b1f..94dccf8a6a1 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3649,13 +3649,13 @@ gdb_caching_proc skip_vsx_tests {
     return $skip_vsx_tests
 }
 
-# Run a test on the target to see if it supports TSX hardware.  Return 0 if so,
-# 1 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
+# Run a test on the target to see if it supports TSX hardware.  Return 1 if so,
+# 0 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
 
-gdb_caching_proc skip_tsx_tests {
+gdb_caching_proc allow_tsx_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
-    set me "skip_tsx_tests"
+    set me "allow_tsx_tests"
 
     # Compile a test program.
     set src {
@@ -3667,7 +3667,7 @@ gdb_caching_proc skip_tsx_tests {
         }
     }
     if {![gdb_simple_compile $me $src executable]} {
-        return 1
+	return 0
     }
 
     # No error message, compilation succeeded so now run it via gdb.
@@ -3680,22 +3680,22 @@ gdb_caching_proc skip_tsx_tests {
     gdb_expect {
         -re ".*Illegal instruction.*${gdb_prompt} $" {
             verbose -log "$me:  TSX hardware not detected."
-            set skip_tsx_tests 1
+	    set allow_tsx_tests 0
         }
         -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
             verbose -log "$me:  TSX hardware detected."
-            set skip_tsx_tests 0
+	    set allow_tsx_tests 1
         }
         default {
             warning "\n$me:  default case taken."
-            set skip_tsx_tests 1
+	    set allow_tsx_tests 0
         }
     }
     gdb_exit
     remote_file build delete $obj
 
-    verbose "$me:  returning $skip_tsx_tests" 2
-    return $skip_tsx_tests
+    verbose "$me:  returning $allow_tsx_tests" 2
+    return $allow_tsx_tests
 }
 
 # Run a test on the target to see if it supports avx512bf16.  Return 1 if so,

                 reply	other threads:[~2023-01-13 20:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230113204011.A59A23857438@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).