From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 37/46] Use require is_c_compiler_gcc
Date: Fri, 16 Dec 2022 17:08:09 -0700 [thread overview]
Message-ID: <20221217000818.3729389-38-tom@tromey.com> (raw)
In-Reply-To: <20221217000818.3729389-1-tom@tromey.com>
This changes some tests to use "require is_c_compiler_gcc".
---
gdb/testsuite/gdb.base/morestack.exp | 5 +----
gdb/testsuite/gdb.base/prelink.exp | 7 +------
gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp | 4 +---
| 4 +---
| 4 +---
| 4 +---
gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp | 5 +----
gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp | 5 +----
gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp | 5 +----
gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp | 5 +----
gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 5 +----
gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp | 5 +----
gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp | 5 +----
gdb/testsuite/gdb.dwarf2/dw2-ranges.exp | 5 +----
.../gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp | 5 +----
gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp | 5 +----
21 files changed, 21 insertions(+), 77 deletions(-)
diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/morestack.exp
index 31f7d1a72d0..4c17f819a14 100644
--- a/gdb/testsuite/gdb.base/morestack.exp
+++ b/gdb/testsuite/gdb.base/morestack.exp
@@ -13,10 +13,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/>.
-if {![is_c_compiler_gcc]} {
- unsupported "gcc compiler is required"
- return
-}
+require is_c_compiler_gcc
standard_testfile
diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp
index 2b2b10c1c0d..43389c1a587 100644
--- a/gdb/testsuite/gdb.base/prelink.exp
+++ b/gdb/testsuite/gdb.base/prelink.exp
@@ -19,16 +19,11 @@
# This file was written by Alexandre Oliva <aoliva@redhat.com>
-require isnative !skip_shlib_tests
+require isnative !skip_shlib_tests is_c_compiler_gcc
if { [is_remote host] } {
return
}
-if {![is_c_compiler_gcc]} {
- unsupported "gcc compiler is required"
- return -1
-}
-
load_lib prelink-support.exp
set testfile "prelink"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
index 14b72898015..44849cbae82 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -28,9 +28,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
# Reuse many of the test source files from dw2-inline-header-1.exp.
standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
--git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
index aa7807e2427..b116ffe7a3a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
@@ -56,9 +56,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
# Prepare and run the test.
proc do_test { start_label func_name tag } {
--git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index 537d61dc88d..7211b4838b0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -51,9 +51,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
dw2-inline-header.c dw2-inline-header.h
--git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index 96596d1f5f5..bca98226f05 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -40,9 +40,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
dw2-inline-header.c dw2-inline-header.h
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index f77236a6b40..0ae2a7fed18 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -29,9 +29,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index 40f4233b5bc..8f6ae870822 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -30,9 +30,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
standard_testfile -lbls.c .S \
.c .h
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index 65bc1fe23dc..1121282878f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -29,9 +29,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index f8d3c1f68a6..97f52cb2255 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -29,9 +29,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index 4d269a2d0f4..92ffc123ac1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -29,9 +29,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index 26d6998d34d..19a2cda298d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
index 0e4432845d9..9f12a21fe99 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
@@ -22,10 +22,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require is_c_compiler_gcc
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
index d03f6716d18..2b846c60817 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
@@ -22,10 +22,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require is_c_compiler_gcc
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index dec7d6a9b37..31384e0cd21 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -21,10 +21,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index 07ac5a9e52d..610ae7d1f0e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -19,10 +19,7 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
require dwarf2_support
-if ![is_c_compiler_gcc] {
- unsupported "gcc required for this test"
- return 0
-}
+require is_c_compiler_gcc
proc do_test {suffix} {
global gdb_test_file_name
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
index b528c3d73ce..afecc32fd0c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
@@ -25,10 +25,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
index 770d2977a43..b1148d45dcb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
@@ -20,10 +20,7 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
require dwarf2_support
-if ![is_c_compiler_gcc] {
- unsupported "gcc required for this test"
- return 0
-}
+require is_c_compiler_gcc
standard_testfile main.c .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
index d80d604edff..4df4d98b7b2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
@@ -21,10 +21,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c -2.c -3.c
set asmfile [standard_output_file ${testfile}.s]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index cf9c77741a2..ad667df86ee 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -31,10 +31,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index 035d4902ab4..d8da6accb77 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
require dwarf2_support
# The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require is_c_compiler_gcc
standard_testfile .c -dw.S
--
2.38.1
next prev parent reply other threads:[~2022-12-17 0:09 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 0:07 [PATCH 00/46] Rewrite "require" test procedure and use it more often Tom Tromey
2022-12-17 0:07 ` [PATCH 01/46] Don't use ensure_gdb_index with require Tom Tromey
2022-12-17 0:07 ` [PATCH 02/46] Change 'require' to accept a list of predicates Tom Tromey
2022-12-17 0:07 ` [PATCH 03/46] Use unsupported in 'require' Tom Tromey
2022-12-23 12:39 ` Aktemur, Tankut Baris
2023-01-06 1:14 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 04/46] Use require supports_reverse Tom Tromey
2022-12-17 0:07 ` [PATCH 05/46] Use require supports_process_record Tom Tromey
2022-12-17 0:07 ` [PATCH 06/46] Use require dwarf2_support Tom Tromey
2022-12-17 0:07 ` [PATCH 07/46] Use require is_x86_like_target Tom Tromey
2022-12-17 0:07 ` [PATCH 08/46] Use require skip_cplus_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 09/46] Use require skip_shlib_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 10/46] Use require skip_dlmopen_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 11/46] Use require skip_stl_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 12/46] Use require skip_rust_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 13/46] Use require skip_fortran_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 14/46] Use require skip_ada_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 15/46] Use require skip_go_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 16/46] Use require skip_d_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 17/46] Use require skip_ctf_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 18/46] Use require skip_hw_watchpoint_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 19/46] Use require skip_ifunc_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 20/46] Use require skip_aarch64_sve_tests Tom Tromey
2022-12-19 10:50 ` Luis Machado
2022-12-17 0:07 ` [PATCH 21/46] Use require skip_btrace_tests Tom Tromey
2022-12-17 1:15 ` Enze Li
2022-12-18 0:48 ` Tom Tromey
2022-12-19 5:13 ` Enze Li
2022-12-19 14:44 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 22/46] " Tom Tromey
2022-12-17 9:22 ` Metzger, Markus T
2022-12-18 17:46 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 23/46] Use require skip_avx_* Tom Tromey
2022-12-17 0:07 ` [PATCH 24/46] Use require support_displaced_stepping Tom Tromey
2022-12-17 0:07 ` [PATCH 25/46] Use require is_aarch64_target Tom Tromey
2022-12-19 10:46 ` Luis Machado
2022-12-17 0:07 ` [PATCH 26/46] Use require is_aarch32_target Tom Tromey
2022-12-19 10:46 ` Luis Machado
2022-12-17 0:07 ` [PATCH 27/46] Use require is_amd64_regs_target Tom Tromey
2022-12-17 0:08 ` [PATCH 28/46] Use require is_elf_target Tom Tromey
2022-12-17 0:08 ` [PATCH 29/46] Use require can_single_step_to_signal_handler Tom Tromey
2022-12-17 0:08 ` [PATCH 30/46] Use require supports_get_siginfo_type Tom Tromey
2022-12-17 0:08 ` [PATCH 31/46] Use require support_go_compile Tom Tromey
2022-12-17 0:08 ` [PATCH 32/46] Use require use_gdb_stub Tom Tromey
2022-12-17 0:08 ` [PATCH 33/46] Use require can_spawn_for_attach Tom Tromey
2022-12-17 0:08 ` [PATCH 34/46] Use require isnative Tom Tromey
2022-12-17 0:08 ` [PATCH 35/46] Use require skip_gdbserver_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 36/46] Use require skip_shlib_tests Tom Tromey
2022-12-17 0:08 ` Tom Tromey [this message]
2022-12-17 0:08 ` [PATCH 38/46] Use require gdb_debug_enabled Tom Tromey
2022-12-17 0:08 ` [PATCH 39/46] Use require gdb_skip_xml_test Tom Tromey
2022-12-17 0:08 ` [PATCH 40/46] Use require gdb_trace_common_supports_arch Tom Tromey
2022-12-17 0:08 ` [PATCH 41/46] Use require skip_perf_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 42/46] Use require skip_opencl_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 43/46] Use require target_can_use_run_cmd Tom Tromey
2022-12-17 0:08 ` [PATCH 44/46] Use require using_fission Tom Tromey
2022-12-17 0:08 ` [PATCH 45/46] Use require skip_debuginfod_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 46/46] Use require gnat_runtime_has_debug_info Tom Tromey
2022-12-19 10:49 ` [PATCH 00/46] Rewrite "require" test procedure and use it more often Luis Machado
2023-01-06 2:45 ` Tom Tromey
2023-01-05 1:29 ` Kevin Buettner
2023-01-06 2:47 ` Tom Tromey
2023-01-07 0:07 ` Kevin Buettner
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=20221217000818.3729389-38-tom@tromey.com \
--to=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).