public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 8/8] Use require with is_remote
Date: Mon, 23 Jan 2023 20:08:43 +0000	[thread overview]
Message-ID: <89500e1e-647b-bda9-70b5-8883b5367fb8@palves.net> (raw)
In-Reply-To: <20230122215558.1931803-9-tom@tromey.com>

On 2023-01-22 9:55 p.m., Tom Tromey wrote:
> --- a/gdb/testsuite/gdb.base/fullpath-expand.exp
> +++ b/gdb/testsuite/gdb.base/fullpath-expand.exp
> @@ -15,10 +15,7 @@
>  
>  standard_testfile .c fullpath-expand-func.c
>  
> -if [is_remote host] {
> -    unsupported "compiling on a remote host does not support a filename with directory."
> -    return 0
> -}
> +require {!is_remote host}

IWBN to preserve "compiling on a remote host does not support a filename with directory."
as a comment.

> --- a/gdb/testsuite/gdb.base/gdbhistsize-history.exp
> +++ b/gdb/testsuite/gdb.base/gdbhistsize-history.exp
> @@ -21,10 +21,7 @@
>  # We cannot expect remote hosts to see environment variables set on the
>  # local machine.
>  
> -if { [is_remote host] } {
> -    unsupported "can't set environment variables on remote host"
> -    return -1
> -}
> +require {!is_remote host}

Similarly here.

> diff --git a/gdb/testsuite/gdb.base/solib-corrupted.exp b/gdb/testsuite/gdb.base/solib-corrupted.exp
> index 644c8ece11f..a2fbaa6ac40 100644
> --- a/gdb/testsuite/gdb.base/solib-corrupted.exp
> +++ b/gdb/testsuite/gdb.base/solib-corrupted.exp
> @@ -15,11 +15,7 @@
>  
>  require allow_shlib_tests
>  
> -if {[is_remote target]} {
> -    # gdbserver prints the warning message but expect is parsing only the GDB
> -    # output, not the gdbserver output.
> -    return 0
> -}
> +require {!is_remote target}

Ditto, comment should be preserved, IMO.  

There are a few more, I've not pointed at every one.

Basically, these help us understand what particular issue with is_remote boards causes
the test to be skipped.

The cases where the messages were just "doesn't work on remote host" such as:

 > -if {[is_remote host]} {
 > -    untested "does not work on remote host"
 > -    return 0
 > -}
 > +require {!is_remote host}

are useless and should not be preserved of course.

  reply	other threads:[~2023-01-23 20:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22 21:55 [PATCH 0/8] Use 'require' even more Tom Tromey
2023-01-22 21:55 ` [PATCH 1/8] Convert skip_altivec_tests to allow form Tom Tromey
2023-01-23 19:45   ` Pedro Alves
2023-01-24 19:53     ` Tom Tromey
2023-01-22 21:55 ` [PATCH 2/8] Rename skip_float_test " Tom Tromey
2023-01-22 21:55 ` [PATCH 3/8] Rename skip_power_isa_3_1_tests " Tom Tromey
2023-01-22 21:55 ` [PATCH 4/8] Rename skip_vsx_tests " Tom Tromey
2023-01-22 21:55 ` [PATCH 5/8] Use require with istarget Tom Tromey
2023-01-22 21:55 ` [PATCH 6/8] Introduce and use is_any_target Tom Tromey
2023-01-23 19:57   ` Pedro Alves
2023-01-24 19:41     ` Tom Tromey
2023-01-22 21:55 ` [PATCH 7/8] Add unsupported calls where needed Tom Tromey
2023-01-22 21:55 ` [PATCH 8/8] Use require with is_remote Tom Tromey
2023-01-23 20:08   ` Pedro Alves [this message]
2023-01-24 19:48     ` Tom Tromey
2023-01-24 19:50       ` Pedro Alves

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=89500e1e-647b-bda9-70b5-8883b5367fb8@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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).