]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix require dwarf2_support check in some test-cases, some more
authorTom de Vries <tdevries@suse.de>
Thu, 28 Aug 2025 09:24:42 +0000 (11:24 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 28 Aug 2025 09:24:42 +0000 (11:24 +0200)
The Linaro CI reported a regression in test-case
gdb.dwarf2/macro-source-path-clang14-dw4.exp due to recent commit 81e5a23c7b8
("[gdb/testsuite] Fix require dwarf2_support check in some test-cases").

The problem is that the "require dwarf2_support" in its new location doesn't
work because proc dwarf2_support is not defined.

I didn't notice this because I tested all gdb.dwarf2 test-cases together, and
a different test-case had already imported the proc.

Fix this by moving load_lib dwarf.exp earlier.

Tested on x86_64-linux.

gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw4.exp
gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw5.exp
gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld234-dw5.exp
gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw4.exp
gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw5.exp
gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl

index dc3826e049291deb63381ddee19d74e12b15d9b7..d4407d794b455588c029ef251dd2b74fd6a53505 100644 (file)
@@ -18,6 +18,8 @@
 # Generate binaries imitating different ways source file paths can be passed to
 # compilers.  Test printing macros from those binaries.
 
+load_lib dwarf.exp
+
 require dwarf2_support
 
 # The do_test proc comes from macro-source-path.exp.tcl.
index a3ae2ea2cafbbff609aac5448dd61b537d9e9050..23a40ba7890694cba7ea47dc299c723282232a55 100644 (file)
@@ -18,6 +18,8 @@
 # Generate binaries imitating different ways source file paths can be passed to
 # compilers.  Test printing macros from those binaries.
 
+load_lib dwarf.exp
+
 require dwarf2_support
 
 # The do_test proc comes from macro-source-path.exp.tcl.
index 79609813b52127c7f2a2796ac9aca426fe885a54..99f785718c179503db0bac61fcc5f14cf629e63a 100644 (file)
@@ -18,6 +18,8 @@
 # Generate binaries imitating different ways source file paths can be passed to
 # compilers.  Test printing macros from those binaries.
 
+load_lib dwarf.exp
+
 require dwarf2_support
 
 # The do_test proc comes from macro-source-path.exp.tcl.
index 62242453987b983891844e4d600ebfb53a742706..569b4092c70f4b9d15392b1ad11fc91d67bbc176 100644 (file)
@@ -18,6 +18,8 @@
 # Generate binaries imitating different ways source file paths can be passed to
 # compilers.  Test printing macros from those binaries.
 
+load_lib dwarf.exp
+
 require dwarf2_support
 
 # The do_test proc comes from macro-source-path.exp.tcl.
index 37b03b9f55abe59f94765621ceac89406adde425..0517d295bd1846f97d172df5aff823a22328d51e 100644 (file)
@@ -18,6 +18,8 @@
 # Generate binaries imitating different ways source file paths can be passed to
 # compilers.  Test printing macros from those binaries.
 
+load_lib dwarf.exp
+
 require dwarf2_support
 
 # The do_test proc comes from macro-source-path.exp.tcl.
index f45d1b05ab16ea57dcc71de70b70ef1d0008b603..6254286d56f62c6b109f4697d1bbd479c3cc6edd 100644 (file)
@@ -21,8 +21,6 @@
 # The entry points for this test are in the various
 # gdb.dwarf2/macro-source-path-*.exp files.
 
-load_lib dwarf.exp
-
 standard_testfile macro-source-path.c
 
 lassign [function_range main $srcdir/$subdir/$srcfile] \