This changes some tests to use "require !skip_shlib_tests".
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
load_lib "ada.exp"
# This test can't be run on targets lacking shared library support
# or for non-ELF targets.
-if { [skip_shlib_tests] || ![is_elf_target] } {
- return 0
-}
+require !skip_shlib_tests is_elf_target
# Library file names and flags:
set lib_basename ${::gdb_test_file_name}-lib
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return -1
-}
+require !skip_shlib_tests
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
-if {[skip_shlib_tests]} {
- return -1
-}
+require !skip_shlib_tests
set executable ctxobj-m
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
set libfile "dprintf-pendshr"
# also happens to exercise an issue with displaced stepping on amd64
# when libdso1 is mapped at an address greater than 0xffffffff.
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile .c
# in the source of the shlib, and "list" should display the source where
# the program stopped.
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
standard_testfile .c -shlib.c
set shlib_path [standard_output_file ${testfile}-lib.so]
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile gcore-relro-main.c
set libfile gcore-relro-lib
# a shared library (PR gdb/1555, was PR shlib/1280, shlib/1237).
# Tested on ppc-yellowdog-linux (Yellow Dog Linux 3.0 3.2.2-2a)
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile gdb1555-main.c gdb1555.c
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
if {[skip_ifunc_tests]} {
return 0
# when the target doesn't support hw breakpoints doesn't silently
# error out without informing the user.
-if {[skip_shlib_tests]} {
- return -1
-}
+require !skip_shlib_tests
set main_src hbreak-in-shr-unsupported.c
set lib_src hbreak-in-shr-unsupported-shr.c
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
# Test 'info sources' when the test file makes use of a shared
# library.
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
set is_remote_target [is_remote target]
# Additionally, check that GDB cau use 'dump binary memory' to write
# out the in-memory JIT files.
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return -1
-}
+require !skip_shlib_tests
load_lib jit-elf-helpers.exp
# Test fork handling of an inferior that has JIT-ed objfiles.
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return -1
-}
+require !skip_shlib_tests
load_lib jit-elf-helpers.exp
# The same tests as in jit.exp, but loading JITer itself from a shared
# library.
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return -1
-}
+require !skip_shlib_tests
load_lib jit-elf-helpers.exp
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return -1
-}
+require !skip_shlib_tests
load_lib jit-elf-helpers.exp
# For completeness, also test when the JIT descriptor does not change
# address between runs.
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return -1
-}
+require !skip_shlib_tests
standard_testfile
return -1;
}
-if {[skip_shlib_tests]} {
- return -1
-}
+require !skip_shlib_tests
if { ![isnative] } {
return -1
# static function named "foo" exists in the shared library. Tests
# both with and without debug info.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile msym-bp-shl-main.c msym-bp-shl-main-2.c msym-bp-shl-lib.c
set srcfile ${srcdir}/${subdir}/${srcfile}
# test running programs
#
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile .c
set libfile "pendshr"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
-if {[skip_shlib_tests]} {
- return -1
-}
+require !skip_shlib_tests
proc test {hidden dlopen version_id_main lang} {
global srcdir subdir
# Test the "print symbol-loading" option.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile print-symbol-loading-main.c
set libfile print-symbol-loading-lib
#prop lib shr2.sl
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
if { [is_remote host] } {
gdb_remote_download host $srcdir/$subdir/ss.h
# them gets relocated at load-time. Check that gdb gets the right
# values for the debugging and minimal symbols.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
#
# This file uses shreloc.c, shreloc1.c and shreloc2.c
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return -1
-}
+require !skip_shlib_tests
standard_testfile .c -lib.c
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile .c
set libfile "solib1"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
if {[is_remote target]} {
# gdbserver prints the warning message but expect is parsing only the GDB
# Test connecting and disconnecting at shared library events.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
set gdbserver_reconnect_p 1
if { [info proc gdb_reconnect] == "" } {
# (and thus aren't affected by shared library unloading) are not
# disabled prematurely.
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
# This test is currently not supported for stub targets, because it uses the
# start command (through gdb_start_cmd). In theory, it could be changed to
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
-if [skip_shlib_tests] {
- return
-}
+require !skip_shlib_tests
# The testcase assumes the target can access the OBJDIR.
if [is_remote target] {
# difference appears to be caused by prelink, adjusting expectations
# In such case both disk libraries will be loaded at VMAs starting at zero.
-if [skip_shlib_tests] {
- return 0
-}
+require !skip_shlib_tests
if {![can_spawn_for_attach]} {
return 0
# Contributed by Markus Deuling <deuling@de.ibm.com>.
#
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
# Library file.
set libname "solib-symbol-lib"
# 1) GDB does not segfault when stepping
# 2) The stack frame is printed
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
# Library 2
set lib2name "solib-vanish-lib2"
# than one shared library, when one of the implementations is a "weak"
# symbol. GDB should set a breakpoint at the first copy it finds.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
# These targets have shared libraries, but weak symbols are not meaningful.
if {([istarget *-*-mingw*]
return 0
}
-if [skip_shlib_tests] {
- return 0
-}
+require !skip_shlib_tests
set target_size TARGET_UNKNOWN
if {[is_lp64_target]} {
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile .c symtab-search-order-1.c symtab-search-order-shlib-1.c
set srcfile $srcdir/$subdir/$srcfile
# Test resolving of an opaque type from the loaded shared library.
-if {[skip_shlib_tests]} {
- return -1
-}
+require !skip_shlib_tests
standard_testfile type-opaque-main.c
# test running programs
#
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
set testfile "unload"
set libfile "unloadshr"
#
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
set testfile "watchpoint-solib"
set libfile "watchpoint-solib-shr"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if { [skip_btrace_tests] } {
- unsupported "target does not support record-btrace"
- return -1
-}
-
-if { [skip_shlib_tests] } {
- unsupported "target does not support shared library tests"
- return -1
-}
+require !skip_btrace_tests !skip_shlib_tests
standard_testfile
# Shared library tests.
-if {[skip_shlib_tests]} {
- untested "skipping shlib tests"
- return;
-}
+require !skip_shlib_tests
set libbin [standard_output_file ${testfile}-shlib.so]
set binfile [standard_output_file ${testfile}-shlib]
# on the libstc++.so DSO (which is how GDB was built and revealed the
# bug), and vice versa.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
# STATIC_BIN indicates whether to build the main binary with
# -static-libgcc/-static-libstdc++. STATIC_LIB is the same, but for
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile .cc infcall-dlopen-lib.cc
set libfile [standard_output_file ${testfile}.so]
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-if {[skip_shlib_tests]} {
- return 0
-}
+require dwarf2_support !skip_shlib_tests
standard_testfile .c -shlib.c -dw.S
# which is then used by a shared object.
# This test can't be run on targets lacking shared library support.
-if [skip_shlib_tests] {
- return 0
-}
+require !skip_shlib_tests
load_lib dwarf.exp
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
load_lib mi-support.exp
#
load_lib mi-support.exp
-if {[skip_shlib_tests]} {
- return -1
-}
+require !skip_shlib_tests
standard_testfile mi-catch-load.c
load_lib mi-support.exp
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile mi-dprintf-pending.c
# test running programs
#
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile mi-pending.c
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return -1
-}
+require !skip_shlib_tests
gdb_exit
if [mi_gdb_start] {
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-if { [skip_shlib_tests] } {
- return 0
-}
+require !skip_shlib_tests
standard_testfile .c -lib.c
set shlib_path [standard_output_file ${testfile}-lib.so]
standard_testfile
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
# Library file.
set libname "${testfile}-lib"
load_lib gdb-python.exp
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return -1
-}
+require !skip_shlib_tests
if {[get_compiler_info]} {
warning "Could not get compiler info"
# This file is part of the GDB testsuite. It tests the mechanism
# exposing values to Python.
-if {[skip_shlib_tests]} {
- untested "skipping shared library tests"
- return 0
-}
+require !skip_shlib_tests
load_lib gdb-python.exp
load_lib gdb-python.exp
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
# We test for skip_shlib_tests in this test because without a main
# exec file we only have the exec target loaded if shared libraries
# are present.
-if {[skip_gdbserver_tests] || [skip_shlib_tests]} {
- return
-}
+require !skip_gdbserver_tests !skip_shlib_tests
standard_testfile server.c
if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
load_lib gdbserver-support.exp
load_lib prelink-support.exp
-if {[skip_gdbserver_tests] || [skip_shlib_tests]} {
- return
-}
+require !skip_gdbserver_tests !skip_shlib_tests
standard_testfile solib-list-main.c
set srclibfile ${testfile}-lib.c
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {![isnative] || ![istarget *-linux*] || [skip_shlib_tests]} {
+require isnative !skip_shlib_tests
+if {![istarget *-linux*]} {
return 0
}
load_lib "trace-support.exp"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
if ![gdb_trace_common_supports_arch] {
unsupported "no trace-common.h support for arch"
load_lib "trace-support.exp"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
set executable $testfile
load_lib "trace-support.exp"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
set executable $testfile
load_lib trace-support.exp
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
if ![gdb_trace_common_supports_arch] {
unsupported "no trace-common.h support for arch"
return -1
load_lib "trace-support.exp"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
if ![gdb_trace_common_supports_arch] {
unsupported "no trace-common.h support for arch"
range_stepping_with_tracepoint "trace"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
load_lib "trace-support.exp"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
set executable $testfile
break_trace_same_addr_6 "trace" "enable" "trace" "disable"
break_trace_same_addr_6 "trace" "disable" "trace" "enable"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
load_lib "trace-support.exp"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
set executable $testfile
load_lib "trace-support.exp"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
standard_testfile
set executable $testfile
step_over_tracepoint "trace"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
load_lib "trace-support.exp"
-if {[skip_shlib_tests]} {
- return 0
-}
+require !skip_shlib_tests
# Do not run if gdbsever debug is enabled - the output file is many Gb.
if [gdbserver_debug_enabled] {