From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 75CA63857406 for ; Sun, 6 Jun 2021 13:54:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 75CA63857406 X-ASG-Debug-ID: 1622987658-0c856e67e213d35a0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id xKWksazQudE4uyqC (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 06 Jun 2021 09:54:18 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by smtp.ebox.ca (Postfix) with ESMTP id 18FA8441B21; Sun, 6 Jun 2021 09:54:18 -0400 (EDT) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.157.6 X-Barracuda-Effective-Source-IP: 192-222-157-6.qc.cable.ebox.net[192.222.157.6] X-Barracuda-Apparent-Source-IP: 192.222.157.6 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed] gdb/testsuite: set sysroot in gdb.server/stop-reply-no-thread-multi.exp Date: Sun, 6 Jun 2021 09:54:17 -0400 X-ASG-Orig-Subj: [pushed] gdb/testsuite: set sysroot in gdb.server/stop-reply-no-thread-multi.exp Message-Id: <20210606135417.636809-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1622987658 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 2405 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.90463 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-17.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_QUARANTINE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2021 13:54:30 -0000 From: Simon Marchi I get some random timeouts in this test due to big debug info taking a lot of time to read through gdbserver. When host and target are on the same machine, clear the sysroot parameter so that GDB reads the files from the local file system, as we already do in many tests. I agree with what Pedro says here: https://sourceware.org/pipermail/gdb-patches/2019-March/156568.html that if this is bad for us, it's also bad for users, so we should be fixing the slowness instead. But so far nobody seems to be working on it, and the testsuite timeouts are getting in the way, so I think this "set sysroot" is a net positive for now. Without this patch, the test takes over 2 minutes to run (most of it "downloading" libc debug info), with it it takes 10 seconds. gdb/testsuite/ChangeLog: * gdb.server/stop-reply-no-thread-multi.exp: Clear sysroot when host and target are local. Change-Id: Ieb6304f0e56b4575af450913de4210c667c6bf7b --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0bd3d1cb8ffc..d51b60c09c5d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-06-06 Simon Marchi + + * gdb.server/stop-reply-no-thread-multi.exp: Clear sysroot when + host and target are local. + 2021-06-05 Hannes Domani * gdb.python/py-symbol.exp: Fix tests for Python 3. diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp index 50cf10fe3134..b3ded0e5ab56 100644 --- a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp @@ -48,6 +48,13 @@ proc run_test { target_non_stop disable_feature } { save_vars { GDBFLAGS } { append GDBFLAGS " -ex \"maint set target-non-stop $target_non_stop\"" + + # If GDB and GDBserver are both running locally, set the sysroot to avoid + # reading files via the remote protocol. + if { ![is_remote host] && ![is_remote target] } { + set GDBFLAGS "$GDBFLAGS -ex \"set sysroot\"" + } + clean_restart ${binfile} } -- 2.31.1