This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Testsuite: set sysroot when using gdbserver


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c92df149c29518f6e1d4a3174b3e29162fcd3ad6

commit c92df149c29518f6e1d4a3174b3e29162fcd3ad6
Author: Alan Hayward <alan.hayward@arm.com>
Date:   Thu Mar 28 12:33:29 2019 +0000

    Testsuite: set sysroot when using gdbserver
    
    When testing using native-gdbserver and native-extended-gdbserver, the sysroot
    is not set.  This results in a warning from GDB and files are sent via the
    remote protocol, which can be slow.
    
    On Ubuntu 18.04 (unlike most distros) the debug versions of the standard
    libraries are included by default in /usr/lib/debug/.
    
    These file reads are causing a complete native-gdbserver run on the AArch64
    buildbot slave to timeout after 2.5 hours.  This is also causing the builds
    to back up on the slave.
    
    The solution is to ensure the sysroot is set to / for all local boards.
    
    This drastically reduces the time of a test. For example, gdb.base/sigall.exp
    drops from 23 seconds to 4 seconds.
    A full native-gdbserver run on the AArch64 slave now takes 8 minutes.
    
    gdb/testsuite/ChangeLog:
    
    	* boards/local-board.exp: set sysroot to /.

Diff:
---
 gdb/testsuite/ChangeLog              | 5 +++++
 gdb/testsuite/boards/local-board.exp | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3de21c5..ba97fc3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-03-28  Alan Hayward  <alan.hayward@arm.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* boards/local-board.exp: set sysroot to /.
+
 2019-03-27  Alan Hayward  <alan.hayward@arm.com>
 
 	* gdb.base/interrupt-daemon-attach.c (main): Add alarm and sleep
diff --git a/gdb/testsuite/boards/local-board.exp b/gdb/testsuite/boards/local-board.exp
index 4150f1d..bf710f4 100644
--- a/gdb/testsuite/boards/local-board.exp
+++ b/gdb/testsuite/boards/local-board.exp
@@ -22,3 +22,6 @@ global board_info
 # Remove any target variant specifications from the name.
 set baseboard [lindex [split $board "/"] 0]
 set board_info($baseboard,isremote) 0
+
+# Set sysroot to avoid sending files via the remote protocol.
+set GDBFLAGS "${GDBFLAGS} -ex \"set sysroot /\""


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]