diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-11-05 06:22:00 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-11-05 07:07:25 +0800 |
commit | 8ae4a838bc0f5796369d982330acacf7a8fa7eab (patch) | |
tree | b466af347bbb667e69ae2f7c0cfc4b4fe61f8cc5 | |
parent | 35425d025b46a384fa89c4d06bd7c128d09e3009 (diff) | |
download | gcc-8ae4a838bc0f5796369d982330acacf7a8fa7eab.zip gcc-8ae4a838bc0f5796369d982330acacf7a8fa7eab.tar.gz gcc-8ae4a838bc0f5796369d982330acacf7a8fa7eab.tar.bz2 |
simulate-thread tests: Silence gdb debuginfod warning
When gdb defaults to use debuginfod, gdb warns simulate-thread tests:
spawn gdb -nx -nw -batch -x /export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.gdb ./atomic-load-int.exe
Breakpoint 1 at 0x4005cc: file /export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c, line 97.
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.fedoraproject.org/>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
Silence gdb warning by setting DEBUGINFOD_URLS to "" and restore it if
it exists.
PR testsuite/117300
* g++.dg/simulate-thread/simulate-thread.exp: Set DEBUGINFOD_URLS
to "" and restore it if it exists.
* gcc.dg/simulate-thread/simulate-thread.exp: Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r-- | gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp index 35a111c..ad428c1 100644 --- a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp +++ b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp @@ -30,10 +30,19 @@ set-torture-options [list \ { -O3 -g -std=c++11 } \ { -Os -g } ] +if [info exists ::env(DEBUGINFOD_URLS)] { + set orig_debuginfod_urls "$::env(DEBUGINFOD_URLS)" + setenv DEBUGINFOD_URLS "" +} + if [gdb-exists] { gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" "" gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/simulate-thread/*.c]] "" "" } +if [info exists ::env(DEBUGINFOD_URLS)] { + setenv DEBUGINFOD_URLS "$orig_debuginfod_urls" +} + torture-finish dg-finish diff --git a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp index 8983cc7..7a8178f 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp +++ b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp @@ -32,10 +32,19 @@ set-torture-options [list \ { -O2 -g } \ { -O3 -g } ] +if [info exists ::env(DEBUGINFOD_URLS)] { + set orig_debuginfod_urls "$::env(DEBUGINFOD_URLS)" + setenv DEBUGINFOD_URLS "" +} + if [gdb-exists] { gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "" "" gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/simulate-thread/*.c]] "" "" } +if [info exists ::env(DEBUGINFOD_URLS)] { + setenv DEBUGINFOD_URLS "$orig_debuginfod_urls" +} + torture-finish dg-finish |