This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

[PATCH 2/4] binutils/testsuite: Prevent debuginfod server from querying itself


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


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