[21/46] Use require skip_btrace_tests

Message ID 20221217000818.3729389-22-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 skip_btrace_tests" and
"require skip_tsx_tests".
---
 gdb/testsuite/gdb.btrace/tsx.exp | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
  

Comments

Enze Li Dec. 17, 2022, 1:15 a.m. UTC | #1
Hi Tom,

Just one nit.  skip_btrace_tests -> skip_btrace_pt_tests in the subject.

On Fri, Dec 16 2022 at 05:07:53 PM -0700, Tom Tromey wrote:

> This changes some tests to use "require skip_btrace_tests" and
> "require skip_tsx_tests".

Likewise here.

Thanks,
Enze

> ---
>  gdb/testsuite/gdb.btrace/tsx.exp | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp
> index c055b0ae409..81b71b1fef9 100644
> --- a/gdb/testsuite/gdb.btrace/tsx.exp
> +++ b/gdb/testsuite/gdb.btrace/tsx.exp
> @@ -15,15 +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/>.
>  
> -if { [skip_btrace_pt_tests] } {
> -    unsupported "target does not support PT"
> -    return -1
> -}
> -
> -if { [skip_tsx_tests] } {
> -    unsupported "target does not support TSX"
> -    return -1
> -}
> +require !skip_btrace_pt_tests !skip_tsx_tests
>  
>  standard_testfile .c x86-tsx.S
>  if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
  
Tom Tromey Dec. 18, 2022, 12:48 a.m. UTC | #2
Enze> Just one nit.  skip_btrace_tests -> skip_btrace_pt_tests in the subject.

Thanks, I fixed this.

Tom
  
Enze Li Dec. 19, 2022, 5:13 a.m. UTC | #3
On Sat, Dec 17 2022 at 05:48:50 PM -0700, Tom Tromey wrote:

> Enze> Just one nit.  skip_btrace_tests -> skip_btrace_pt_tests in the subject.
>
> Thanks, I fixed this.
>
> Tom

I'm a little forgetful.  I created a pull request to your branch
"rewrite-require" a few days ago.  And, I dunno what's going on with
Github, it messed thing up.  I recreated one (#42), is that ok?

Best Regards,
Enze
  
Tom Tromey Dec. 19, 2022, 2:44 p.m. UTC | #4
>>>>> "Enze" == Enze Li <enze.li@hotmail.com> writes:

Enze> I'm a little forgetful.  I created a pull request to your branch
Enze> "rewrite-require" a few days ago.  And, I dunno what's going on with
Enze> Github, it messed thing up.  I recreated one (#42), is that ok?

I don't mind or anything, but I also don't look at issues or pull
requests there.  That repository is more just a spot for me to store
patches.

Tom
  

Patch

diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp
index c055b0ae409..81b71b1fef9 100644
--- a/gdb/testsuite/gdb.btrace/tsx.exp
+++ b/gdb/testsuite/gdb.btrace/tsx.exp
@@ -15,15 +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/>.
 
-if { [skip_btrace_pt_tests] } {
-    unsupported "target does not support PT"
-    return -1
-}
-
-if { [skip_tsx_tests] } {
-    unsupported "target does not support TSX"
-    return -1
-}
+require !skip_btrace_pt_tests !skip_tsx_tests
 
 standard_testfile .c x86-tsx.S
 if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {