public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: give binaries distinct names in Ada tests
@ 2022-07-19 17:14 Simon Marchi
  2022-07-22 19:16 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-07-19 17:14 UTC (permalink / raw)
  To: gdb-patches

Some Ada tests repeat their test sequence with different gnat-encodings,
typically "all" and "minimal".  However, they give the same name to both
binaries, meaning the second run overwrites the binary of the first run.
This makes it difficult and confusing when trying to reproduce problems
manually with the test artifacts.  Change those tests to use unique
names for each pass.

Change-Id: Iaa3c9f041241249a7d67392e785c31aa189dcc88
---
 gdb/testsuite/gdb.ada/O2_float_param.exp              | 4 ++--
 gdb/testsuite/gdb.ada/access_to_unbounded_array.exp   | 4 ++--
 gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp          | 6 +++---
 gdb/testsuite/gdb.ada/array_of_symbolic_length.exp    | 4 ++--
 gdb/testsuite/gdb.ada/array_of_variable_length.exp    | 4 ++--
 gdb/testsuite/gdb.ada/array_of_variant.exp            | 4 ++--
 gdb/testsuite/gdb.ada/array_ptr_renaming.exp          | 4 ++--
 gdb/testsuite/gdb.ada/arrayparam.exp                  | 4 ++--
 gdb/testsuite/gdb.ada/arrayptr.exp                    | 6 +++---
 gdb/testsuite/gdb.ada/big_packed_array.exp            | 4 ++--
 gdb/testsuite/gdb.ada/enum_idx_packed.exp             | 4 ++--
 gdb/testsuite/gdb.ada/fixed_cmp.exp                   | 4 ++--
 gdb/testsuite/gdb.ada/fixed_points.exp                | 4 ++--
 gdb/testsuite/gdb.ada/frame_arg_lang.exp              | 4 ++--
 gdb/testsuite/gdb.ada/funcall_ref.exp                 | 4 ++--
 gdb/testsuite/gdb.ada/mi_string_access.exp            | 4 ++--
 gdb/testsuite/gdb.ada/mi_var_array.exp                | 4 ++--
 gdb/testsuite/gdb.ada/mi_var_union.exp                | 4 ++--
 gdb/testsuite/gdb.ada/mi_variant.exp                  | 4 ++--
 gdb/testsuite/gdb.ada/mod_from_name.exp               | 6 +++---
 gdb/testsuite/gdb.ada/multiarray.exp                  | 4 ++--
 gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp      | 4 ++--
 gdb/testsuite/gdb.ada/packed_array.exp                | 4 ++--
 gdb/testsuite/gdb.ada/packed_record.exp               | 4 ++--
 gdb/testsuite/gdb.ada/packed_tagged.exp               | 4 ++--
 gdb/testsuite/gdb.ada/pckd_arr_ren.exp                | 4 ++--
 gdb/testsuite/gdb.ada/rec_ptype.exp                   | 4 ++--
 gdb/testsuite/gdb.ada/same_component_name.exp         | 4 ++--
 gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp            | 4 ++--
 gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp      | 4 ++--
 gdb/testsuite/gdb.ada/unchecked_union.exp             | 4 ++--
 gdb/testsuite/gdb.ada/var_rec_arr.exp                 | 4 ++--
 gdb/testsuite/gdb.ada/variant.exp                     | 4 ++--
 gdb/testsuite/gdb.ada/variant_record_packed_array.exp | 4 ++--
 34 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/O2_float_param.exp b/gdb/testsuite/gdb.ada/O2_float_param.exp
index b1ccb626d85e..0c2969e0c4f8 100644
--- a/gdb/testsuite/gdb.ada/O2_float_param.exp
+++ b/gdb/testsuite/gdb.ada/O2_float_param.exp
@@ -24,11 +24,11 @@ foreach_with_prefix scenario {all minimal} {
 		   optimize=-O2 \
 		   additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     runto "increment"
 
diff --git a/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp b/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
index 240917bafd9e..46715edaf482 100644
--- a/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
+++ b/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp b/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
index fe2742e68591..f2c9451e0a9f 100644
--- a/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
+++ b/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
@@ -22,15 +22,15 @@ standard_ada_testfile foo_q418_043
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo_q418_043.adb]
     if ![runto "foo_q418_043.adb:$bp_location" ] then {
-	perror "Couldn't run ${testfile}"
+	perror "Couldn't run ${testfile}-${scenario}"
 	return
     }
 
diff --git a/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp b/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
index 29faf749ee6f..a94bdd7f71fa 100644
--- a/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
+++ b/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/array_of_variable_length.exp b/gdb/testsuite/gdb.ada/array_of_variable_length.exp
index 72a57fc33d2a..5547b7f1af66 100644
--- a/gdb/testsuite/gdb.ada/array_of_variable_length.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variable_length.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/array_of_variant.exp b/gdb/testsuite/gdb.ada/array_of_variant.exp
index 606974ced839..3d0bc672c18c 100644
--- a/gdb/testsuite/gdb.ada/array_of_variant.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variant.exp
@@ -43,11 +43,11 @@ proc gdb_test_with_xfail { cmd re re_xfail msg } {
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "START" ${testdir}/p.adb]
     runto "p.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/array_ptr_renaming.exp b/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
index cd192fc950e0..9832cdd360e1 100644
--- a/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
+++ b/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/arrayparam.exp b/gdb/testsuite/gdb.ada/arrayparam.exp
index ff3def2d9fe5..3c6f59b662fa 100644
--- a/gdb/testsuite/gdb.ada/arrayparam.exp
+++ b/gdb/testsuite/gdb.ada/arrayparam.exp
@@ -25,11 +25,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp
index c3fb5f3d647a..6f9e2cd51a3d 100644
--- a/gdb/testsuite/gdb.ada/arrayptr.exp
+++ b/gdb/testsuite/gdb.ada/arrayptr.exp
@@ -22,15 +22,15 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
     if ![runto "foo.adb:$bp_location" ] then {
-	perror "Couldn't run ${testfile}"
+	perror "Couldn't run ${testfile}-${scenario}"
 	return
     }
 
diff --git a/gdb/testsuite/gdb.ada/big_packed_array.exp b/gdb/testsuite/gdb.ada/big_packed_array.exp
index e82892a420c4..cc500463e370 100644
--- a/gdb/testsuite/gdb.ada/big_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/big_packed_array.exp
@@ -24,11 +24,11 @@ set old_gcc [expr [test_compiler_info {gcc-[0-8]-*}]]
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_ra24_010.adb]
     runto "foo_ra24_010.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/enum_idx_packed.exp b/gdb/testsuite/gdb.ada/enum_idx_packed.exp
index f69f13ee8e40..e827da5367b5 100644
--- a/gdb/testsuite/gdb.ada/enum_idx_packed.exp
+++ b/gdb/testsuite/gdb.ada/enum_idx_packed.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     # GNAT 9 and 10 are known to fail.
     if {$scenario == "minimal" && ([test_compiler_info {gcc-9-*}] \
diff --git a/gdb/testsuite/gdb.ada/fixed_cmp.exp b/gdb/testsuite/gdb.ada/fixed_cmp.exp
index a4091e256e57..5b7a061ffbd4 100644
--- a/gdb/testsuite/gdb.ada/fixed_cmp.exp
+++ b/gdb/testsuite/gdb.ada/fixed_cmp.exp
@@ -22,11 +22,11 @@ standard_ada_testfile fixed
 foreach_with_prefix gnat_encodings {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$gnat_encodings]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != "" } {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${gnat_encodings}" executable $flags] != "" } {
       return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${gnat_encodings}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/fixed.adb]
     runto "fixed.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp
index fbf2fdc19265..8f32ec71742d 100644
--- a/gdb/testsuite/gdb.ada/fixed_points.exp
+++ b/gdb/testsuite/gdb.ada/fixed_points.exp
@@ -21,11 +21,11 @@ standard_ada_testfile fixed_points
 
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "Set breakpoint here" ${testdir}/fixed_points.adb]
     runto "fixed_points.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/frame_arg_lang.exp b/gdb/testsuite/gdb.ada/frame_arg_lang.exp
index dcfc613ce1a8..dab46c91db4e 100644
--- a/gdb/testsuite/gdb.ada/frame_arg_lang.exp
+++ b/gdb/testsuite/gdb.ada/frame_arg_lang.exp
@@ -33,11 +33,11 @@ foreach_with_prefix scenario {all minimal} {
 		   additional_flags=-margs \
 		   additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.c]
     runto "foo.c:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/funcall_ref.exp b/gdb/testsuite/gdb.ada/funcall_ref.exp
index f727b71b4607..c783806d30d7 100644
--- a/gdb/testsuite/gdb.ada/funcall_ref.exp
+++ b/gdb/testsuite/gdb.ada/funcall_ref.exp
@@ -25,11 +25,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/mi_string_access.exp b/gdb/testsuite/gdb.ada/mi_string_access.exp
index b98a9ddef172..82fc6b66c33f 100644
--- a/gdb/testsuite/gdb.ada/mi_string_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_string_access.exp
@@ -25,11 +25,11 @@ set MIFLAGS "-i=mi"
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    mi_clean_restart $binfile
+    mi_clean_restart $binfile-$scenario
 
     if {[mi_runto_main] < 0} {
 	return 0
diff --git a/gdb/testsuite/gdb.ada/mi_var_array.exp b/gdb/testsuite/gdb.ada/mi_var_array.exp
index 2cdcf660a28a..a0904855222a 100644
--- a/gdb/testsuite/gdb.ada/mi_var_array.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_array.exp
@@ -28,11 +28,11 @@ foreach_with_prefix scenario {none all minimal} {
 	lappend flags additional_flags=-fgnat-encodings=$scenario
     }
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != "" } {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != "" } {
 	return -1
     }
 
-    mi_clean_restart $binfile
+    mi_clean_restart $binfile-$scenario
 
     if {[mi_runto_main] < 0} {
 	return 0
diff --git a/gdb/testsuite/gdb.ada/mi_var_union.exp b/gdb/testsuite/gdb.ada/mi_var_union.exp
index aa8bd531fc24..7a254d16c211 100644
--- a/gdb/testsuite/gdb.ada/mi_var_union.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_union.exp
@@ -30,11 +30,11 @@ foreach_with_prefix scenario {none all minimal} {
 	lappend flags additional_flags=-fgnat-encodings=$scenario
     }
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != "" } {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != "" } {
 	return -1
     }
 
-    mi_clean_restart $binfile
+    mi_clean_restart $binfile-$scenario
 
     if {[mi_runto_main] < 0} {
 	return 0
diff --git a/gdb/testsuite/gdb.ada/mi_variant.exp b/gdb/testsuite/gdb.ada/mi_variant.exp
index 7e33fdc2dc92..e745819b8823 100644
--- a/gdb/testsuite/gdb.ada/mi_variant.exp
+++ b/gdb/testsuite/gdb.ada/mi_variant.exp
@@ -29,11 +29,11 @@ foreach_with_prefix scenario {none all minimal} {
 	lappend flags additional_flags=-fgnat-encodings=$scenario
     }
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    mi_clean_restart $binfile
+    mi_clean_restart $binfile-$scenario
 
     if {[mi_runto_main] < 0} {
 	return 0
diff --git a/gdb/testsuite/gdb.ada/mod_from_name.exp b/gdb/testsuite/gdb.ada/mod_from_name.exp
index bff1e09335e6..009e32d4dd1b 100644
--- a/gdb/testsuite/gdb.ada/mod_from_name.exp
+++ b/gdb/testsuite/gdb.ada/mod_from_name.exp
@@ -22,15 +22,15 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb]
     if ![runto "foo.adb:$bp_location" ] then {
-	perror "Couldn't run ${testfile}"
+	perror "Couldn't run ${testfile}-${scenario}"
 	return
     } 
 
diff --git a/gdb/testsuite/gdb.ada/multiarray.exp b/gdb/testsuite/gdb.ada/multiarray.exp
index bac16f2eee50..5a8e1eaff4a6 100644
--- a/gdb/testsuite/gdb.ada/multiarray.exp
+++ b/gdb/testsuite/gdb.ada/multiarray.exp
@@ -22,11 +22,11 @@ standard_ada_testfile p
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable {debug}] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "START" ${testdir}/p.adb]
     runto "p.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
index db1b3b32aa5b..4bdb4decaaf2 100644
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
@@ -24,11 +24,11 @@ foreach_with_prefix scenario {all minimal} {
 		   optimize=-O2 \
 		   additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     gdb_breakpoint "foo_o224_021.child1.child2"
 
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
index 1c049b483ea8..eb857f7e5641 100644
--- a/gdb/testsuite/gdb.ada/packed_array.exp
+++ b/gdb/testsuite/gdb.ada/packed_array.exp
@@ -22,11 +22,11 @@ standard_ada_testfile pa
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/pa.adb]
     runto "pa.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/packed_record.exp b/gdb/testsuite/gdb.ada/packed_record.exp
index c319a348ed1a..d872907809fd 100644
--- a/gdb/testsuite/gdb.ada/packed_record.exp
+++ b/gdb/testsuite/gdb.ada/packed_record.exp
@@ -22,11 +22,11 @@ standard_ada_testfile pr
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/pr.adb]
     runto "pr.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/packed_tagged.exp b/gdb/testsuite/gdb.ada/packed_tagged.exp
index ab05172cd9dc..bef491a54e98 100644
--- a/gdb/testsuite/gdb.ada/packed_tagged.exp
+++ b/gdb/testsuite/gdb.ada/packed_tagged.exp
@@ -28,11 +28,11 @@ foreach_with_prefix scenario {all minimal} {
 	lappend flags additional_flags=-fgnat-encodings=$scenario
     }
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/comp_bug.adb]
     runto "comp_bug.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/pckd_arr_ren.exp b/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
index 5dac5e13dafd..c02983857be6 100644
--- a/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
+++ b/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/rec_ptype.exp b/gdb/testsuite/gdb.ada/rec_ptype.exp
index 0128b230e48c..dfeb41e689a5 100644
--- a/gdb/testsuite/gdb.ada/rec_ptype.exp
+++ b/gdb/testsuite/gdb.ada/rec_ptype.exp
@@ -25,11 +25,11 @@ standard_ada_testfile main
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/main.adb]
     runto "main.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/same_component_name.exp b/gdb/testsuite/gdb.ada/same_component_name.exp
index 345b2c83023b..e07d49db3b44 100644
--- a/gdb/testsuite/gdb.ada/same_component_name.exp
+++ b/gdb/testsuite/gdb.ada/same_component_name.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != "" } {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != "" } {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_top_location [gdb_get_line_number "BREAK_TOP" ${testdir}/pck.adb]
     set bp_middle_location [gdb_get_line_number "BREAK_MIDDLE" ${testdir}/pck.adb]
diff --git a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
index d3e4a52a4c66..e8c468e65b34 100644
--- a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
+++ b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
index 79ae3449a333..a11a90ed32c3 100644
--- a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
+++ b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP1" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/unchecked_union.exp b/gdb/testsuite/gdb.ada/unchecked_union.exp
index 6a9caf229cd8..a1ba4f420c7f 100644
--- a/gdb/testsuite/gdb.ada/unchecked_union.exp
+++ b/gdb/testsuite/gdb.ada/unchecked_union.exp
@@ -57,11 +57,11 @@ foreach_with_prefix scenario {none all minimal} {
 	lappend flags additional_flags=-fgnat-encodings=$scenario
     }
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "BREAK" ${testdir}/unchecked_union.adb]
     runto "unchecked_union.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/var_rec_arr.exp b/gdb/testsuite/gdb.ada/var_rec_arr.exp
index 3e5a25e19a9d..030f63048cba 100644
--- a/gdb/testsuite/gdb.ada/var_rec_arr.exp
+++ b/gdb/testsuite/gdb.ada/var_rec_arr.exp
@@ -25,11 +25,11 @@ standard_ada_testfile foo_na09_042
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_na09_042.adb]
     runto "foo_na09_042.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/variant.exp b/gdb/testsuite/gdb.ada/variant.exp
index 9a1f1f0974c0..828f7c3a0303 100644
--- a/gdb/testsuite/gdb.ada/variant.exp
+++ b/gdb/testsuite/gdb.ada/variant.exp
@@ -26,11 +26,11 @@ foreach_with_prefix scenario {none all minimal} {
 	lappend flags additional_flags=-fgnat-encodings=$scenario
     }
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "STOP" ${testdir}/pkg.adb]
     runto "pkg.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
index da86ccc629b2..b611b6fedfc9 100644
--- a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
@@ -22,11 +22,11 @@ standard_ada_testfile foo
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
-    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+    if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
 	return -1
     }
 
-    clean_restart ${testfile}
+    clean_restart ${testfile}-${scenario}
 
     set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb]
     runto "foo.adb:$bp_location"

base-commit: f638657759f5b9b4eb31a1aa6b9fe6e6fb01f4a0
-- 
2.36.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/testsuite: give binaries distinct names in Ada tests
  2022-07-19 17:14 [PATCH] gdb/testsuite: give binaries distinct names in Ada tests Simon Marchi
@ 2022-07-22 19:16 ` Tom Tromey
  2022-07-22 19:43   ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2022-07-22 19:16 UTC (permalink / raw)
  To: Simon Marchi via Gdb-patches

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> Some Ada tests repeat their test sequence with different gnat-encodings,
Simon> typically "all" and "minimal".  However, they give the same name to both
Simon> binaries, meaning the second run overwrites the binary of the first run.
Simon> This makes it difficult and confusing when trying to reproduce problems
Simon> manually with the test artifacts.  Change those tests to use unique
Simon> names for each pass.

Seems like a good idea.  Thank you for doing this.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/testsuite: give binaries distinct names in Ada tests
  2022-07-22 19:16 ` Tom Tromey
@ 2022-07-22 19:43   ` Simon Marchi
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2022-07-22 19:43 UTC (permalink / raw)
  To: Tom Tromey, Simon Marchi via Gdb-patches



On 2022-07-22 15:16, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> Some Ada tests repeat their test sequence with different gnat-encodings,
> Simon> typically "all" and "minimal".  However, they give the same name to both
> Simon> binaries, meaning the second run overwrites the binary of the first run.
> Simon> This makes it difficult and confusing when trying to reproduce problems
> Simon> manually with the test artifacts.  Change those tests to use unique
> Simon> names for each pass.
> 
> Seems like a good idea.  Thank you for doing this.
> 
> Tom

Thanks, pushed.

Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-22 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 17:14 [PATCH] gdb/testsuite: give binaries distinct names in Ada tests Simon Marchi
2022-07-22 19:16 ` Tom Tromey
2022-07-22 19:43   ` Simon Marchi

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).