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_btrace_pt_tests
Date: Fri, 13 Jan 2023 20:38:35 +0000 (GMT)	[thread overview]
Message-ID: <20230113203835.3A0D73858C39@sourceware.org> (raw)

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

commit d1821835860e1f11e17ac5de5109d225a736cda0
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Jan 8 10:41:37 2023 -0700

    Rename to allow_btrace_pt_tests
    
    This changes skip_btrace_pt_tests to invert the sense, and renames it
    to allow_btrace_pt_tests.

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

diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp
index 2a8d29de8ed..222c352c368 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 !skip_btrace_pt_tests !skip_tsx_tests
+require allow_btrace_pt_tests !skip_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 4959af6b2c4..8d817dfa682 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3852,22 +3852,22 @@ gdb_caching_proc skip_btrace_tests {
 }
 
 # Run a test on the target to see if it supports btrace pt hardware.
-# Return 0 if so, 1 if it does not.  Based on 'check_vmx_hw_available'
+# Return 1 if so, 0 if it does not.  Based on 'check_vmx_hw_available'
 # from the GCC testsuite.
 
-gdb_caching_proc skip_btrace_pt_tests {
+gdb_caching_proc allow_btrace_pt_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
-    set me "skip_btrace_tests"
+    set me "allow_btrace_pt_tests"
     if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
-        verbose "$me:  target does not support btrace, returning 1" 2
-        return 1
+	verbose "$me:  target does not support btrace, returning 1" 2
+	return 0
     }
 
     # Compile a test program.
     set src { int main() { return 0; } }
     if {![gdb_simple_compile $me $src executable]} {
-        return 1
+	return 0
     }
 
     # No error message, compilation succeeded so now run it via gdb.
@@ -3877,32 +3877,32 @@ gdb_caching_proc skip_btrace_pt_tests {
     gdb_reinitialize_dir $srcdir/$subdir
     gdb_load $obj
     if ![runto_main] {
-        return 1
+	return 0
     }
     # In case of an unexpected output, we return 2 as a fail value.
-    set skip_btrace_tests 2
+    set allow_btrace_pt_tests 2
     gdb_test_multiple "record btrace pt" "check btrace pt support" {
         -re "You can't do that when your target is.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_pt_tests 0
         }
         -re "Target does not support branch tracing.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_pt_tests 0
         }
         -re "Could not enable branch tracing.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_pt_tests 0
         }
         -re "support was disabled at compile time.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_pt_tests 0
         }
         -re "^record btrace pt\r\n$gdb_prompt $" {
-            set skip_btrace_tests 0
+	    set allow_btrace_pt_tests 1
         }
     }
     gdb_exit
     remote_file build delete $obj
 
-    verbose "$me:  returning $skip_btrace_tests" 2
-    return $skip_btrace_tests
+    verbose "$me:  returning $allow_btrace_pt_tests" 2
+    return $allow_btrace_pt_tests
 }
 
 # Run a test on the target to see if it supports Aarch64 SVE hardware.

                 reply	other threads:[~2023-01-13 20:38 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=20230113203835.3A0D73858C39@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).