[26/46] Use require is_aarch32_target

Message ID 20221217000818.3729389-27-tom@tromey.com
State Committed
Headers
Series Rewrite "require" test procedure and use it more often |

Commit Message

Tom Tromey Dec. 17, 2022, 12:07 a.m. UTC
  This changes some tests to use "require is_aarch32_target".
---
 gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp            | 5 +----
 gdb/testsuite/gdb.arch/arm-disp-step.exp                 | 5 +----
 gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp | 5 +----
 gdb/testsuite/gdb.arch/pr25124.exp                       | 5 +----
 gdb/testsuite/gdb.arch/thumb-bx-pc.exp                   | 5 +----
 gdb/testsuite/gdb.arch/thumb-prologue.exp                | 5 +----
 gdb/testsuite/gdb.arch/thumb-singlestep.exp              | 5 +----
 7 files changed, 7 insertions(+), 28 deletions(-)
  

Comments

Luis Machado Dec. 19, 2022, 10:46 a.m. UTC | #1
On 12/17/22 00:07, Tom Tromey wrote:
> This changes some tests to use "require is_aarch32_target".
> ---
>   gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp            | 5 +----
>   gdb/testsuite/gdb.arch/arm-disp-step.exp                 | 5 +----
>   gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp | 5 +----
>   gdb/testsuite/gdb.arch/pr25124.exp                       | 5 +----
>   gdb/testsuite/gdb.arch/thumb-bx-pc.exp                   | 5 +----
>   gdb/testsuite/gdb.arch/thumb-prologue.exp                | 5 +----
>   gdb/testsuite/gdb.arch/thumb-singlestep.exp              | 5 +----
>   7 files changed, 7 insertions(+), 28 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp b/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp
> index 34d98aec96e..37710649005 100644
> --- a/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp
> +++ b/gdb/testsuite/gdb.arch/arm-bl-branch-dest.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_aarch32_target] } {
> -    verbose "Skipping ${gdb_test_file_name}."
> -    return
> -}
> +require is_aarch32_target
>   
>   standard_testfile
>   
> diff --git a/gdb/testsuite/gdb.arch/arm-disp-step.exp b/gdb/testsuite/gdb.arch/arm-disp-step.exp
> index ec6578257b3..0eb1707bb6c 100644
> --- a/gdb/testsuite/gdb.arch/arm-disp-step.exp
> +++ b/gdb/testsuite/gdb.arch/arm-disp-step.exp
> @@ -17,10 +17,7 @@
>   
>   # Test arm displaced stepping.
>   
> -if {![is_aarch32_target]} {
> -    verbose "Skipping arm displaced stepping tests."
> -    return
> -}
> +require is_aarch32_target
>   
>   standard_testfile .S
>   
> diff --git a/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp b/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp
> index c3544b16a0b..22a2559b271 100644
> --- a/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp
> +++ b/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.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_aarch32_target] } {
> -    verbose "Skipping ${gdb_test_file_name}."
> -    return
> -}
> +require is_aarch32_target
>   
>   standard_testfile
>   
> diff --git a/gdb/testsuite/gdb.arch/pr25124.exp b/gdb/testsuite/gdb.arch/pr25124.exp
> index a68a3d1b7df..95636bd1ed8 100644
> --- a/gdb/testsuite/gdb.arch/pr25124.exp
> +++ b/gdb/testsuite/gdb.arch/pr25124.exp
> @@ -16,10 +16,7 @@
>   # Test proper disassembling of ARM thumb instructions when reloading a symbol
>   # file.
>   
> -if {![is_aarch32_target]} {
> -    verbose "Skipping ARM tests."
> -    return
> -}
> +require is_aarch32_target
>   
>   standard_testfile .S
>   
> diff --git a/gdb/testsuite/gdb.arch/thumb-bx-pc.exp b/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
> index ccc6fbfdca7..6989d79c6d6 100644
> --- a/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
> +++ b/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
> @@ -15,10 +15,7 @@
>   
>   # Test PC adjustment from Thumb-mode "bx pc" instruction.
>   
> -if {![is_aarch32_target]} {
> -    verbose "Skipping ARM tests."
> -    return
> -}
> +require is_aarch32_target
>   
>   set testfile "thumb-bx-pc"
>   set srcfile ${testfile}.S
> diff --git a/gdb/testsuite/gdb.arch/thumb-prologue.exp b/gdb/testsuite/gdb.arch/thumb-prologue.exp
> index 0cb14572345..8e83bd3c009 100644
> --- a/gdb/testsuite/gdb.arch/thumb-prologue.exp
> +++ b/gdb/testsuite/gdb.arch/thumb-prologue.exp
> @@ -15,10 +15,7 @@
>   
>   # Test ARM/Thumb prologue analyzer.
>   
> -if {![is_aarch32_target]} {
> -    verbose "Skipping ARM prologue tests."
> -    return
> -}
> +require is_aarch32_target
>   
>   standard_testfile
>   
> diff --git a/gdb/testsuite/gdb.arch/thumb-singlestep.exp b/gdb/testsuite/gdb.arch/thumb-singlestep.exp
> index 289bdf52463..c3b7999036e 100644
> --- a/gdb/testsuite/gdb.arch/thumb-singlestep.exp
> +++ b/gdb/testsuite/gdb.arch/thumb-singlestep.exp
> @@ -15,10 +15,7 @@
>   
>   # Test single-stepping into incorrectly marked Thumb routine
>   
> -if {![is_aarch32_target]} {
> -    verbose "Skipping ARM tests."
> -    return
> -}
> +require is_aarch32_target
>   
>   set testfile "thumb-singlestep"
>   set srcfile ${testfile}.S

LGTM.
  

Patch

diff --git a/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp b/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp
index 34d98aec96e..37710649005 100644
--- a/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp
+++ b/gdb/testsuite/gdb.arch/arm-bl-branch-dest.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_aarch32_target] } {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch32_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/arm-disp-step.exp b/gdb/testsuite/gdb.arch/arm-disp-step.exp
index ec6578257b3..0eb1707bb6c 100644
--- a/gdb/testsuite/gdb.arch/arm-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/arm-disp-step.exp
@@ -17,10 +17,7 @@ 
 
 # Test arm displaced stepping.
 
-if {![is_aarch32_target]} {
-    verbose "Skipping arm displaced stepping tests."
-    return
-}
+require is_aarch32_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp b/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp
index c3544b16a0b..22a2559b271 100644
--- a/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp
+++ b/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.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_aarch32_target] } {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch32_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/pr25124.exp b/gdb/testsuite/gdb.arch/pr25124.exp
index a68a3d1b7df..95636bd1ed8 100644
--- a/gdb/testsuite/gdb.arch/pr25124.exp
+++ b/gdb/testsuite/gdb.arch/pr25124.exp
@@ -16,10 +16,7 @@ 
 # Test proper disassembling of ARM thumb instructions when reloading a symbol
 # file.
 
-if {![is_aarch32_target]} {
-    verbose "Skipping ARM tests."
-    return
-}
+require is_aarch32_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/thumb-bx-pc.exp b/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
index ccc6fbfdca7..6989d79c6d6 100644
--- a/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
+++ b/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
@@ -15,10 +15,7 @@ 
 
 # Test PC adjustment from Thumb-mode "bx pc" instruction.
 
-if {![is_aarch32_target]} {
-    verbose "Skipping ARM tests."
-    return
-}
+require is_aarch32_target
 
 set testfile "thumb-bx-pc"
 set srcfile ${testfile}.S
diff --git a/gdb/testsuite/gdb.arch/thumb-prologue.exp b/gdb/testsuite/gdb.arch/thumb-prologue.exp
index 0cb14572345..8e83bd3c009 100644
--- a/gdb/testsuite/gdb.arch/thumb-prologue.exp
+++ b/gdb/testsuite/gdb.arch/thumb-prologue.exp
@@ -15,10 +15,7 @@ 
 
 # Test ARM/Thumb prologue analyzer.
 
-if {![is_aarch32_target]} {
-    verbose "Skipping ARM prologue tests."
-    return
-}
+require is_aarch32_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/thumb-singlestep.exp b/gdb/testsuite/gdb.arch/thumb-singlestep.exp
index 289bdf52463..c3b7999036e 100644
--- a/gdb/testsuite/gdb.arch/thumb-singlestep.exp
+++ b/gdb/testsuite/gdb.arch/thumb-singlestep.exp
@@ -15,10 +15,7 @@ 
 
 # Test single-stepping into incorrectly marked Thumb routine
 
-if {![is_aarch32_target]} {
-    verbose "Skipping ARM tests."
-    return
-}
+require is_aarch32_target
 
 set testfile "thumb-singlestep"
 set srcfile ${testfile}.S