From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107584 invoked by alias); 13 Aug 2019 01:46:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 107575 invoked by uid 89); 13 Aug 2019 01:46:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:sk:server-, hear X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Aug 2019 01:46:28 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 4B0E51F33E; Mon, 12 Aug 2019 21:46:26 -0400 (EDT) Subject: Re: [patch, testsuite] Fixes for gdb.python tests on remote Windows host To: Sandra Loosemore , "gdb-patches@sourceware.org" References: <59beb385-aec5-13b8-6095-3c7eb18f94be@codesourcery.com> From: Simon Marchi Message-ID: Date: Tue, 13 Aug 2019 01:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <59beb385-aec5-13b8-6095-3c7eb18f94be@codesourcery.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-08/txt/msg00258.txt.bz2 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