Rename to allow_btrace_tests

This changes skip_btrace_tests to invert the sense, and renames it to
allow_btrace_tests.
This commit is contained in:
Tom Tromey
2023-01-08 10:44:15 -07:00
parent d182183586
commit 1ed844ca1e
29 changed files with 43 additions and 43 deletions

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile record_goto.c standard_testfile record_goto.c
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile record_goto.c standard_testfile record_goto.c
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests !skip_shlib_tests require allow_btrace_tests !skip_shlib_tests
standard_testfile standard_testfile

View File

@ -17,7 +17,7 @@
# Test that new threads of recorded inferiors also get recorded. # Test that new threads of recorded inferiors also get recorded.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile
if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] { if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] {

View File

@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile
if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } { if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
# start fresh - without an executable # start fresh - without an executable
gdb_exit gdb_exit

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
# We expect a specific function call history. This gets messed up with # We expect a specific function call history. This gets messed up with
# PIE on 32-bit. # PIE on 32-bit.

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
# We expect a specific function call history. This gets messed up with # We expect a specific function call history. This gets messed up with
# PIE on 32-bit. # PIE on 32-bit.

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile record_goto.c standard_testfile record_goto.c
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile .c .S standard_testfile .c .S
if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] { if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {

View File

@ -22,7 +22,7 @@
# #
# Each inferior can be recorded separately. # Each inferior can be recorded separately.
require !skip_btrace_tests require allow_btrace_tests
require !use_gdb_stub require !use_gdb_stub

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile
if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } { if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile record_goto.c standard_testfile record_goto.c
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile
if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } { if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {

View File

@ -19,7 +19,7 @@
load_lib gdbserver-support.exp load_lib gdbserver-support.exp
require !skip_btrace_tests require allow_btrace_tests
require !skip_gdbserver_tests require !skip_gdbserver_tests
standard_testfile standard_testfile

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile record_goto.c standard_testfile record_goto.c
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
# The "record goto" command jumps to a specific instruction in the execution # The "record goto" command jumps to a specific instruction in the execution
# trace. To guarantee that we always get the same execution trace, we use # trace. To guarantee that we always get the same execution trace, we use

View File

@ -21,7 +21,7 @@
# Test that we can reverse-next over the dynamic linker's symbol # Test that we can reverse-next over the dynamic linker's symbol
# lookup code. # lookup code.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile
if [prepare_for_testing "failed to prepare" $testfile $srcfile \ if [prepare_for_testing "failed to prepare" $testfile $srcfile \

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile record_goto.c standard_testfile record_goto.c
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
# This test is stepping on instruction level. To guarantee that we always # This test is stepping on instruction level. To guarantee that we always
# get the same execution trace, we use an assembly source file. # get the same execution trace, we use an assembly source file.

View File

@ -20,7 +20,7 @@
# calls. This used to cause a crash in get_frame_type. # calls. This used to cause a crash in get_frame_type.
# #
require !skip_btrace_tests require allow_btrace_tests
# This test requires the compiler to generate a tail call. To guarantee that # This test requires the compiler to generate a tail call. To guarantee that
# we always get one, we use an assembly source file. # we always get one, we use an assembly source file.

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
# This test requires the compiler to generate a tail call. To guarantee that # This test requires the compiler to generate a tail call. To guarantee that
# we always get one, we use an assembly source file. # we always get one, we use an assembly source file.

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile

View File

@ -20,7 +20,7 @@
# #
# Test that we can access the vdso memory during replay for stepping. # Test that we can access the vdso memory during replay for stepping.
require !skip_btrace_tests require allow_btrace_tests
standard_testfile standard_testfile
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { if [prepare_for_testing "failed to prepare" $testfile $srcfile] {

View File

@ -17,7 +17,7 @@
load_lib gdb-python.exp load_lib gdb-python.exp
require !skip_btrace_tests !skip_python_tests require allow_btrace_tests !skip_python_tests
standard_testfile standard_testfile

View File

@ -17,7 +17,7 @@
# Skip this test if btrace is disabled. # Skip this test if btrace is disabled.
require !skip_btrace_tests !skip_python_tests require allow_btrace_tests !skip_python_tests
load_lib gdb-python.exp load_lib gdb-python.exp

View File

@ -3801,22 +3801,22 @@ gdb_caching_proc allow_avx512fp16_tests {
return $allow_avx512fp16_tests return $allow_avx512fp16_tests
} }
# Run a test on the target to see if it supports btrace hardware. Return 0 if so, # Run a test on the target to see if it supports btrace hardware. Return 1 if so,
# 1 if it does not. Based on 'check_vmx_hw_available' from the GCC testsuite. # 0 if it does not. Based on 'check_vmx_hw_available' from the GCC testsuite.
gdb_caching_proc skip_btrace_tests { gdb_caching_proc allow_btrace_tests {
global srcdir subdir gdb_prompt inferior_exited_re global srcdir subdir gdb_prompt inferior_exited_re
set me "skip_btrace_tests" set me "allow_btrace_tests"
if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } { if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
verbose "$me: target does not support btrace, returning 1" 2 verbose "$me: target does not support btrace, returning 0" 2
return 1 return 0
} }
# Compile a test program. # Compile a test program.
set src { int main() { return 0; } } set src { int main() { return 0; } }
if {![gdb_simple_compile $me $src executable]} { if {![gdb_simple_compile $me $src executable]} {
return 1 return 0
} }
# No error message, compilation succeeded so now run it via gdb. # No error message, compilation succeeded so now run it via gdb.
@ -3826,29 +3826,29 @@ gdb_caching_proc skip_btrace_tests {
gdb_reinitialize_dir $srcdir/$subdir gdb_reinitialize_dir $srcdir/$subdir
gdb_load $obj gdb_load $obj
if ![runto_main] { if ![runto_main] {
return 1 return 0
} }
# In case of an unexpected output, we return 2 as a fail value. # In case of an unexpected output, we return 2 as a fail value.
set skip_btrace_tests 2 set allow_btrace_tests 2
gdb_test_multiple "record btrace" "check btrace support" { gdb_test_multiple "record btrace" "check btrace support" {
-re "You can't do that when your target is.*\r\n$gdb_prompt $" { -re "You can't do that when your target is.*\r\n$gdb_prompt $" {
set skip_btrace_tests 1 set allow_btrace_tests 0
} }
-re "Target does not support branch tracing.*\r\n$gdb_prompt $" { -re "Target does not support branch tracing.*\r\n$gdb_prompt $" {
set skip_btrace_tests 1 set allow_btrace_tests 0
} }
-re "Could not enable branch tracing.*\r\n$gdb_prompt $" { -re "Could not enable branch tracing.*\r\n$gdb_prompt $" {
set skip_btrace_tests 1 set allow_btrace_tests 0
} }
-re "^record btrace\r\n$gdb_prompt $" { -re "^record btrace\r\n$gdb_prompt $" {
set skip_btrace_tests 0 set allow_btrace_tests 1
} }
} }
gdb_exit gdb_exit
remote_file build delete $obj remote_file build delete $obj
verbose "$me: returning $skip_btrace_tests" 2 verbose "$me: returning $allow_btrace_tests" 2
return $skip_btrace_tests return $allow_btrace_tests
} }
# Run a test on the target to see if it supports btrace pt hardware. # Run a test on the target to see if it supports btrace pt hardware.