[LTP] [PATCH 1/2] vma05.sh: Add workaround for gdb debuginfod question

Petr Vorel pvorel@suse.cz
Tue Sep 26 14:46:46 CEST 2023


gdb asks if $DEBUGINFOD_URLS is set and there is no 'set debuginfod enabled on|off'
config in ~/.gdbinit:

    # echo $DEBUGINFOD_URLS
    https://debuginfod.opensuse.org/

    # grep 'set debuginfod enabled' ~/.gdbinit
    grep: /root/.gdbinit: No such file or directory

    # gdb -silent -ex="thread apply all backtrace" -ex="quit" vma05_vdso ./core*
    Segmentation fault (core dumped)
    Reading symbols from vma05_vdso...
    [New LWP 6070]

    This GDB supports auto-downloading debuginfo from the following URLs:
      <https://debuginfod.opensuse.org/>
    Enable debuginfod for this session? (y or [n])

Therefore disable this question with unsetting $DEBUGINFOD_URLS.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
A candidate for pre-release fix.

Kind regards,
Petr

 testcases/kernel/mem/vma/vma05.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/mem/vma/vma05.sh b/testcases/kernel/mem/vma/vma05.sh
index 9ef6f0a23..c9e4becdb 100755
--- a/testcases/kernel/mem/vma/vma05.sh
+++ b/testcases/kernel/mem/vma/vma05.sh
@@ -30,6 +30,7 @@ setup()
 {
 	ulimit -c unlimited
 	echo "core" > /proc/sys/kernel/core_pattern
+	unset DEBUGINFOD_URLS
 }
 
 cleanup()
-- 
2.40.1



More information about the ltp mailing list