public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 2/4] binutils/testsuite: Prevent debuginfod server from querying itself
@ 2020-01-17  3:32 Aaron Merey
  0 siblings, 0 replies; only message in thread
From: Aaron Merey @ 2020-01-17  3:32 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 2 bytes --]



[-- Attachment #2: 0002-binutils-testsuite-Prevent-debuginfod-server-from-qu.patch --]
[-- Type: text/x-patch, Size: 1339 bytes --]

binutils/testsuite: Prevent debuginfod server from querying itself.

Set DEBUGINFOD_URLS after the server has started. Prevents it
from querying itself in cases where it is not able to find a
debug file (though this should not happen).

	* binutils/testsuite/binutils-all/debuginfod.exp:
	Start server before setting environment variable.
---
 binutils/testsuite/binutils-all/debuginfod.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/binutils/testsuite/binutils-all/debuginfod.exp b/binutils/testsuite/binutils-all/debuginfod.exp
index d73073ef17..200224f75b 100644
--- a/binutils/testsuite/binutils-all/debuginfod.exp
+++ b/binutils/testsuite/binutils-all/debuginfod.exp
@@ -78,7 +78,7 @@ set port [exec sh -c "while true; do PORT=`expr '(' \$RANDOM % 1000 ')' + 9000`;
 # Specify the directory that files retrieved from the server are written to.
 set cache [file join [pwd] "tmpdir/.debuginfod_cache"]
 
-setenv DEBUGINFOD_URLS http://127.0.0.1:$port
+setenv DEBUGINFOD_URLS ""
 setenv DEBUGINFOD_TIMEOUT 30
 setenv DEBUGINFOD_CACHE_PATH $cache
 
@@ -140,6 +140,8 @@ if { !$ready } {
     return
 }
 
+setenv DEBUGINFOD_URLS http://127.0.0.1:$port
+
 # Test whether prog can fetch separate debuginfo using debuginfod
 # if it's configured to do so.
 proc test_fetch_debuglink { prog progargs } {
-- 
2.23.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-17  3:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17  3:32 [PATCH 2/4] binutils/testsuite: Prevent debuginfod server from querying itself Aaron Merey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).