Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Sandra Loosemore <sandra@codesourcery.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch, testsuite] Fixes for gdb.python tests on remote Windows host
Date: Tue, 13 Aug 2019 01:46:00 -0000	[thread overview]
Message-ID: <d53e4a2f-5422-449b-3e9b-46d679fe6a9c@simark.ca> (raw)
In-Reply-To: <59beb385-aec5-13b8-6095-3c7eb18f94be@codesourcery.com>

On 2019-08-12 6:20 p.m., Sandra Loosemore wrote:
> The attached patch fixes a bunch of FAILs and ERRORs I've seen in 
> gdb.python tests running on remote Windows host.  As noted in the commit 
> message, the fixes are mostly obvious and repetitive;  e.g., remember to 
> copy the .py script to the remote host before trying to source it. 
> Since this is a pretty big patch, though, I wasn't sure the whole thing 
> qualifies as "obvious", and wanted to give folks a chance to object 
> before I check it in.  So I propose to push it to trunk in a week if I 
> don't hear any objection or review (or promise to review) meanwhile.
> 
> -Sandra

Hi Sandra,

Windows and remote host testing are two aspects that are really not tested upstream,
so thanks a lot for doing this.  I ran the gdb.python testsuite locally on Linux and
didn't see any change in the results, which is good.

Just two nits on my side:

> diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
> index c4a6974..0ab1519 100644
> --- a/gdb/testsuite/gdb.python/py-section-script.exp
> +++ b/gdb/testsuite/gdb.python/py-section-script.exp
> @@ -77,22 +77,35 @@ gdb_exit
>  gdb_start
>  gdb_reinitialize_dir $srcdir/$subdir
>
> -gdb_test_no_output "set auto-load safe-path ${remote_python_file}:${binfile}" \
> +# Get the name of the binfile on the host; on a remote host this means
> +# stripping off any directory prefix.
> +if [is_remote host] {
> +  set remote_binfile [file tail ${binfile}]
> +} else {
> +  set remote_binfile ${binfile}
> +}

4 spaces indentation

> +
> +if [ishost *-*-mingw*] {
> +    set remote_pathsep ";"
> +} else {
> +    set remote_pathsep ":"
> +}
> +gdb_test_no_output "set auto-load safe-path ${remote_python_file}${remote_pathsep}${remote_binfile}" \
>      "set auto-load safe-path"
>  gdb_load ${binfile}
>
>  # Verify gdb loaded each script and they appear once in the list.
>  set test_name "verify scripts loaded"
>  gdb_test_multiple "info auto-load python-scripts" "$test_name" {
> +    -re "Yes.*${testfile}.py.*Yes.*inlined-script.*$gdb_prompt $" {
> +	pass "$test_name"
> +    }
>      -re "${testfile}.py.*${testfile}.py.*$gdb_prompt $" {
>  	fail "$test_name"
>      }
>      -re "inlined-script.*inlined-script.*$gdb_prompt $" {
>  	fail "$test_name"
>      }
> -    -re "Yes.*${testfile}.py.*Yes.*inlined-script.*$gdb_prompt $" {
> -	pass "$test_name"
> -    }

Is this last change necessary?

Simon


  parent reply	other threads:[~2019-08-13  1:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 22:20 Sandra Loosemore
2019-08-13  1:35 ` Christian Biesinger via gdb-patches
2019-08-13  2:18   ` Sandra Loosemore
2019-08-13  2:54     ` Simon Marchi
2019-08-13  3:01       ` Christian Biesinger via gdb-patches
2019-08-13 16:32       ` Sandra Loosemore
2019-08-13  1:46 ` Simon Marchi [this message]
2019-08-13  2:31   ` Sandra Loosemore
2019-08-13  2:39     ` Simon Marchi

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=d53e4a2f-5422-449b-3e9b-46d679fe6a9c@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=sandra@codesourcery.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