From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19679 invoked by alias); 13 Aug 2019 02:31:36 -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 19458 invoked by uid 89); 13 Aug 2019 02:31:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=H*M:37f0 X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Aug 2019 02:31:26 +0000 IronPort-SDR: rUSgH5wW5DzEKOOkl3Ym7yKZkBrtyUCSqiPJRBt2yf7+azGf0Q2py9DnNZvBTZ1T338gJPYH+8 aMtPRGi+q2v4PD9XNLem2cATJSDb8R3USoy2KMtYB9eqeQrjSmqm0Myd4AU3hMF/AtGZQaUvvy fY8oioXwRPmSwEeJwZTdL4JQivusYceNN4fj8xaqsci2KrWjEozhJT4QtsMPyvjOQAAEYtdYDy ItbpuC7o5YuDqPJo4RxSqcM6tPaUcQS0WTjbR8P+MWmmdFyTU04oBbeod5xQpInTTVEPRWU5db FJU= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 12 Aug 2019 18:31:24 -0800 IronPort-SDR: MAbD7E/c3alc5hoG3R/hQtx5XtKvtvAa8geDMQImuyqqyw4hSKlFv9P5NiZheB49wgGQcooKc3 iQ3Fe5he8803QTpmjFYvn3OPX0OCv2jnZHocgOteJRXsEICXqPH9AWmgxJ6bDFi/COmUNJf6Hx BLSuBryCdbwxVhZZLpRdtWXNMCQoyXRN1pNbpwQrAer6LyMK5LqJyyoOc0b/xkJE5ZgcYkJiqX lpHgOsyDq8263hBbI1gYO3Do5iuWnVSCyZb0EvtKR9jjXh6fXmAqIDg2tp0PoxSwdatNQeq10I GgQ= Subject: Re: [patch, testsuite] Fixes for gdb.python tests on remote Windows host To: Simon Marchi , "gdb-patches@sourceware.org" References: <59beb385-aec5-13b8-6095-3c7eb18f94be@codesourcery.com> From: Sandra Loosemore Message-ID: <4f8bea28-6386-9558-37f0-900171482d67@codesourcery.com> Date: Tue, 13 Aug 2019 02:31: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: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-Path: sandra@codesourcery.com X-SW-Source: 2019-08/txt/msg00260.txt.bz2 On 8/12/19 7:46 PM, Simon Marchi wrote: > 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 Ooops! I need to do something to make Emacs go into tcl mode automatically for .exp files. > >> + >> +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? Yes. On Windows host, the output I'm seeing for this test that it's trying to match is: (gdb) info auto-load python-scripts Loaded Script Yes py-section-script.py full name: \\long\windows\path\to\py-section-script.py Yes gdb.inlined-script (gdb) This matches the first "fail" pattern as well as the "pass" pattern, so the ordering is important. From the comment on this test, it's clear this output is intended to be a "pass", so that one should go first. -Sandra