public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/14] Resolve all duplicate test names in gdb.python/
@ 2021-03-08 18:36 Andrew Burgess
  2021-03-08 18:36 ` [PATCH 01/14] gdb/testsuite: make test names unique in gdb.python/py-mi.exp Andrew Burgess
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:36 UTC (permalink / raw)
  To: gdb-patches

After this series there are no longer any duplicate test names in the
gdb.python/ directory.

---

Andrew Burgess (14):
  gdb/testsuite: make test names unique in gdb.python/py-mi.exp
  gdb/testsuite: make test names unique in
    gdb.python/py-format-string.exp
  gdb/testsuite: make test names unique in gdb.python/py-strfns.exp
  gdb/testsuite: make test names unique in
    gdb.python/py-finish-breakpoint.exp
  gdb/testsuite: make test names unique in gdb.python/py-explore.exp
  gdb/testsuite: make test names unique in gdb.python/py-pp-maint.exp
  gdb/testsuite: make test names unique in gdb.python/py-block.exp
  gdb/testsuite: make test names unique in gdb.python/py-prompt.exp
  gdb/testsuite: make test names unique in gdb.python/py-symtab.exp
  gdb/testsuite: remove a duplicate test
  gdb/testsuite: make test names unique in gdb.python/py-explore-cc.exp
  gdb/testsuite: check the correct Python variable in test
  gdb/testsuite: remove duplicate test from gdb.python/py-value-cc.exp
  gdb/testsuite: resolve remaining duplicate test names in
    gdb.python/*.exp

 gdb/testsuite/ChangeLog                       |  71 ++++
 gdb/testsuite/gdb.python/lib-types.exp        |   2 +-
 gdb/testsuite/gdb.python/py-bad-printers.exp  |   7 +-
 gdb/testsuite/gdb.python/py-block.exp         |  18 +-
 gdb/testsuite/gdb.python/py-events.exp        |   2 +-
 gdb/testsuite/gdb.python/py-explore-cc.exp    |   8 +-
 gdb/testsuite/gdb.python/py-explore.exp       |  58 ++--
 .../gdb.python/py-finish-breakpoint.exp       |  28 +-
 .../gdb.python/py-finish-breakpoint2.exp      |   6 +-
 gdb/testsuite/gdb.python/py-format-string.exp |  36 +-
 gdb/testsuite/gdb.python/py-frame-inline.exp  |   2 +-
 gdb/testsuite/gdb.python/py-frame.exp         |   3 +-
 gdb/testsuite/gdb.python/py-infthread.exp     |   3 +-
 gdb/testsuite/gdb.python/py-lookup-type.exp   |   2 -
 gdb/testsuite/gdb.python/py-mi.exp            | 322 +++++++++---------
 gdb/testsuite/gdb.python/py-pp-maint.exp      |  15 +-
 gdb/testsuite/gdb.python/py-prompt.exp        |  85 ++---
 gdb/testsuite/gdb.python/py-strfns.exp        |   4 +-
 gdb/testsuite/gdb.python/py-symtab.exp        |   6 +-
 gdb/testsuite/gdb.python/py-value-cc.exp      |   2 -
 20 files changed, 394 insertions(+), 286 deletions(-)

-- 
2.25.4


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

* [PATCH 01/14] gdb/testsuite: make test names unique in gdb.python/py-mi.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
@ 2021-03-08 18:36 ` Andrew Burgess
  2021-03-08 18:36 ` [PATCH 02/14] gdb/testsuite: make test names unique in gdb.python/py-format-string.exp Andrew Burgess
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:36 UTC (permalink / raw)
  To: gdb-patches

Use with_test_prefix to make the test names unique.

gdb/testsuite/ChangeLog:

	* gdb.python/py-mi.exp: Use with_test_prefix to make test names
	unique.
---
 gdb/testsuite/ChangeLog            |   5 +
 gdb/testsuite/gdb.python/py-mi.exp | 322 +++++++++++++++--------------
 2 files changed, 171 insertions(+), 156 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-mi.exp b/gdb/testsuite/gdb.python/py-mi.exp
index 608206178f8..6f0c1c65e62 100644
--- a/gdb/testsuite/gdb.python/py-mi.exp
+++ b/gdb/testsuite/gdb.python/py-mi.exp
@@ -49,26 +49,30 @@ mi_gdb_test "source ${remote_python_file}" "load python file"
 mi_continue_to_line [gdb_get_line_number {MI breakpoint here} ${srcfile}] \
   "step to breakpoint"
 
-mi_create_floating_varobj container c \
-  "create container varobj, no pretty-printing"
+with_test_prefix "varobj container" {
+    mi_create_floating_varobj container c \
+	"create container varobj, no pretty-printing"
 
-mi_list_varobj_children container {
-  { container.name name 1 string }
-  { container.len len 0 int }
-  { container.elements elements 1 "int ." }
-} "examine container children=0, no pretty-printing"
+    mi_list_varobj_children container {
+	{ container.name name 1 string }
+	{ container.len len 0 int }
+	{ container.elements elements 1 "int ." }
+    } "examine container children=0, no pretty-printing"
 
-mi_delete_varobj container "delete varobj"
+    mi_delete_varobj container "delete varobj"
+}
 
-mi_create_floating_varobj nscont nstype \
-  "create nscont varobj, no pretty-printing"
+with_test_prefix "varobj nscont" {
+    mi_create_floating_varobj nscont nstype \
+	"create nscont varobj, no pretty-printing"
 
-mi_list_varobj_children nscont {
-  { nscont.len len 0 int }
-  { nscont.elements elements 1 "int ." }
-} "examine nscont children=0, no pretty-printing"
+    mi_list_varobj_children nscont {
+	{ nscont.len len 0 int }
+	{ nscont.elements elements 1 "int ." }
+    } "examine nscont children=0, no pretty-printing"
 
-mi_delete_varobj nscont "delete varobj"
+    mi_delete_varobj nscont "delete varobj"
+}
 
 mi_gdb_test "-enable-pretty-printing" ""
 
@@ -87,119 +91,121 @@ mi_gdb_test "-var-update string" \
     "\\^done,changelist=\\\[{name=\"string\",in_scope=\"true\",type_changed=\"false\",dynamic=\"1\",has_more=\"0\"}\\\]" \
     "update string varobj after assignment"
 
-# The "elements" field of "c" is still empty, so the attribute
-# "has_more" is expected to be zero.
-mi_create_dynamic_varobj container c 0 \
-  "create container varobj"
-
-mi_list_varobj_children container {
-} "examine container children=0"
-
-mi_next "next over update 1"
-
-mi_varobj_update_dynamic container "varobj update 1" {
-    type_changed false new_num_children 1 dynamic 1 has_more 0
-} {
-} {
-    { name {container.\[0\]} exp {\[0\]} numchild 0 type int }
-}
-
-mi_next "next over update 2"
-
-mi_varobj_update_dynamic container "varobj update 2" {
-    type_changed false new_num_children 2 dynamic 1 has_more 0
-} {
-} {
-    { name {container.\[1\]} exp {\[1\]} numchild 0 type int }
+with_test_prefix "varobj container" {
+    # The "elements" field of "c" is still empty, so the attribute
+    # "has_more" is expected to be zero.
+    mi_create_dynamic_varobj container c 0 \
+	"create container varobj"
+
+    mi_list_varobj_children container {
+    } "examine container children=0"
+
+    mi_next "next over update 1"
+
+    mi_varobj_update_dynamic container "varobj update 1" {
+	type_changed false new_num_children 1 dynamic 1 has_more 0
+    } {
+    } {
+	{ name {container.\[0\]} exp {\[0\]} numchild 0 type int }
+    }
+
+    mi_next "next over update 2"
+
+    mi_varobj_update_dynamic container "varobj update 2" {
+	type_changed false new_num_children 2 dynamic 1 has_more 0
+    } {
+    } {
+	{ name {container.\[1\]} exp {\[1\]} numchild 0 type int }
+    }
+
+    mi_gdb_test "-var-set-visualizer container None" \
+	"\\^done" \
+	"clear visualizer"
+
+    mi_gdb_test "-var-update container" \
+	"\\^done,changelist=\\\[\\\]" \
+	"varobj update after clearing"
+
+    mi_gdb_test "-var-set-visualizer container gdb.default_visualizer" \
+	"\\^done" \
+	"choose default visualizer"
+
+    mi_varobj_update_dynamic container "varobj update after choosing default" {
+	type_changed false new_num_children 2 dynamic 1 has_more 0
+    } {
+    } {
+	{ name {container.\[0\]} exp {\[0\]} numchild 0 type int }
+	{ name {container.\[1\]} exp {\[1\]} numchild 0 type int }
+    }
+
+    mi_gdb_test "-var-set-visualizer container ContainerPrinter" \
+	"\\^done" \
+	"choose visualizer using expression"
+
+    mi_varobj_update_dynamic container \
+	"varobj update after choosing via expression" {
+	    type_changed false new_num_children 2 dynamic 1 has_more 0
+	} {
+	} {
+	    { name {container.\[0\]} exp {\[0\]} numchild 0 type int }
+	    { name {container.\[1\]} exp {\[1\]} numchild 0 type int }
+	}
+
+    mi_list_varobj_children_range container 1 2 2 {
+	{ {container.\[1\]} {\[1\]} 0 int }
+    } "list varobj children after selecting child range"
+
+    mi_list_varobj_children_range container -1 -1 2 {
+	{ {container.\[0\]} {\[0\]} 0 int }
+	{ {container.\[1\]} {\[1\]} 0 int }
+    } "list varobj children after resetting child range"
+
+    mi_next "next over update 3"
+
+    mi_gdb_test "-var-set-update-range container 0 1" \
+	"\\^done" \
+	"set update range"
+
+    # This should truncate the list.
+    mi_list_varobj_children container {
+	{ {container.\[0\]} {\[0\]} 0 int }
+    } "list children after setting update range"
+
+    # This should return just the items in [1,2).
+    mi_list_varobj_children_range container 1 2 2 {
+	{ {container.\[1\]} {\[1\]} 0 int }
+    } "list selected children after setting range"
+
+    # This should not be affected by the previous list-children request.
+    mi_list_varobj_children container {
+	{ {container.\[0\]} {\[0\]} 0 int }
+    } "list children after listing selected range"
+
+    mi_next "next over update 4"
+
+    # This should only show the first child, because the update range has
+    # been set.
+    mi_varobj_update_dynamic container \
+	"update after next with restricted range" {
+	    type_changed false new_num_children 1 dynamic 1 has_more 1
+	} {
+	    { name {container.\[0\]} in_scope true type_changed false has_more 0 }
+	} {
+	}
+
+    mi_gdb_test "-var-set-update-range container 3 4" \
+	"\\^done" \
+	"set update range with non-zero start"
+
+    # Elements were updated but should not be reported.
+    mi_varobj_update_dynamic container \
+	"update varobj with change outside selected range" {
+	    type_changed false new_num_children 3 dynamic 1 has_more 0
+	} {
+	} {
+	}
 }
 
-mi_gdb_test "-var-set-visualizer container None" \
-  "\\^done" \
-  "clear visualizer"
-
-mi_gdb_test "-var-update container" \
-  "\\^done,changelist=\\\[\\\]" \
-  "varobj update after clearing"
-
-mi_gdb_test "-var-set-visualizer container gdb.default_visualizer" \
-  "\\^done" \
-  "choose default visualizer"
-
-mi_varobj_update_dynamic container "varobj update after choosing default" {
-    type_changed false new_num_children 2 dynamic 1 has_more 0
-} {
-} {
-    { name {container.\[0\]} exp {\[0\]} numchild 0 type int }
-    { name {container.\[1\]} exp {\[1\]} numchild 0 type int }
-}
-
-mi_gdb_test "-var-set-visualizer container ContainerPrinter" \
-  "\\^done" \
-  "choose visualizer using expression"
-
-mi_varobj_update_dynamic container \
-  "varobj update after choosing via expression" {
-      type_changed false new_num_children 2 dynamic 1 has_more 0
-  } {
-  } {
-      { name {container.\[0\]} exp {\[0\]} numchild 0 type int }
-      { name {container.\[1\]} exp {\[1\]} numchild 0 type int }
-  }
-
-mi_list_varobj_children_range container 1 2 2 {
-    { {container.\[1\]} {\[1\]} 0 int }
-} "list varobj children after selecting child range"
-
-mi_list_varobj_children_range container -1 -1 2 {
-    { {container.\[0\]} {\[0\]} 0 int }
-    { {container.\[1\]} {\[1\]} 0 int }
-} "list varobj children after resetting child range"
-
-mi_next "next over update 3"
-
-mi_gdb_test "-var-set-update-range container 0 1" \
-  "\\^done" \
-  "set update range"
-
-# This should truncate the list.
-mi_list_varobj_children container {
-    { {container.\[0\]} {\[0\]} 0 int }
-} "list children after setting update range"
-
-# This should return just the items in [1,2).
-mi_list_varobj_children_range container 1 2 2 {
-    { {container.\[1\]} {\[1\]} 0 int }
-} "list selected children after setting range"
-
-# This should not be affected by the previous list-children request.
-mi_list_varobj_children container {
-    { {container.\[0\]} {\[0\]} 0 int }
-} "list children after listing selected range"
-
-mi_next "next over update 4"
-
-# This should only show the first child, because the update range has
-# been set.
-mi_varobj_update_dynamic container \
-  "update after next with restricted range" {
-      type_changed false new_num_children 1 dynamic 1 has_more 1
-  } {
-      { name {container.\[0\]} in_scope true type_changed false has_more 0 }
-  } {
-  }
-
-mi_gdb_test "-var-set-update-range container 3 4" \
-  "\\^done" \
-  "set update range with non-zero start"
-
-# Elements were updated but should not be reported.
-mi_varobj_update_dynamic container \
-  "update varobj with change outside selected range" {
-      type_changed false new_num_children 3 dynamic 1 has_more 0
-  } {
-  } {
-  }
-
 mi_next "next over update 5"
 
 # Regression test: examine an object that has no children, then update
@@ -255,25 +261,27 @@ mi_continue_to_line \
     [gdb_get_line_number {break to inspect struct and union} ${srcfile}] \
     "step to outer breakpoint"
 
-mi_create_dynamic_varobj nscont nstype 1 \
-  "create nstype varobj"
+with_test_prefix "varobj nscont" {
+    mi_create_dynamic_varobj nscont nstype 1 \
+	"create nstype varobj"
 
-mi_list_varobj_children nscont {
-    { {nscont.\[0\]} {\[0\]} 0 int }
-    { {nscont.\[1\]} {\[1\]} 0 int }
-} "list children after setting update range"
+    mi_list_varobj_children nscont {
+	{ {nscont.\[0\]} {\[0\]} 0 int }
+	{ {nscont.\[1\]} {\[1\]} 0 int }
+    } "list children after setting update range"
 
-mi_gdb_test "-var-set-visualizer nscont None" \
-  "\\^done" \
-  "clear visualizer"
+    mi_gdb_test "-var-set-visualizer nscont None" \
+	"\\^done" \
+	"clear visualizer"
 
-mi_gdb_test "-var-update nscont" \
-  "\\^done,changelist=\\\[\\\]" \
-  "varobj update after clearing"
+    mi_gdb_test "-var-update nscont" \
+	"\\^done,changelist=\\\[\\\]" \
+	"varobj update after clearing"
 
-mi_gdb_test "-var-set-visualizer nscont gdb.default_visualizer" \
-  "\\^done" \
-  "choose default visualizer"
+    mi_gdb_test "-var-set-visualizer nscont gdb.default_visualizer" \
+	"\\^done" \
+	"choose default visualizer"
+}
 
 mi_gdb_test "python exception_flag = True" ""
 
@@ -347,22 +355,24 @@ if {[lsearch -exact [mi_get_features] python] < 0} {
     return -1
 }
 
-mi_runto_main
-mi_continue_to_line \
-    [gdb_get_line_number {break to inspect struct and union} ${srcfile}] \
-    "step to breakpoint"
+with_test_prefix "varobj fake" {
+    mi_runto_main
+    mi_continue_to_line \
+	[gdb_get_line_number {break to inspect struct and union} ${srcfile}] \
+	"step to breakpoint"
 
-# Test python/12531.  Install visualizer on a cplus_fake_child.
-mi_create_varobj fake fake \
-  "create fake varobj"
+    # Test python/12531.  Install visualizer on a cplus_fake_child.
+    mi_create_varobj fake fake \
+	"create fake varobj"
 
-mi_list_varobj_children fake {
-    { fake.private private 1 }
-} "list children of fake"
+    mi_list_varobj_children fake {
+	{ fake.private private 1 }
+    } "list children of fake"
 
-mi_list_varobj_children fake.private {
-    { fake.private.sname sname 0 int }
-} "list children fake.private"
+    mi_list_varobj_children fake.private {
+	{ fake.private.sname sname 0 int }
+    } "list children fake.private"
 
-mi_gdb_test "-var-set-visualizer fake.private gdb.default_visualizer" \
-    "\\^done" "Install visualizer on a cplus_fake_child"
+    mi_gdb_test "-var-set-visualizer fake.private gdb.default_visualizer" \
+	"\\^done" "Install visualizer on a cplus_fake_child"
+}
-- 
2.25.4


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

* [PATCH 02/14] gdb/testsuite: make test names unique in gdb.python/py-format-string.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
  2021-03-08 18:36 ` [PATCH 01/14] gdb/testsuite: make test names unique in gdb.python/py-mi.exp Andrew Burgess
@ 2021-03-08 18:36 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 03/14] gdb/testsuite: make test names unique in gdb.python/py-strfns.exp Andrew Burgess
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:36 UTC (permalink / raw)
  To: gdb-patches

Make use of `proc_with_prefix` for every test_* proc in order to make
the test names unique within this test file.

gdb/testsuite/ChangeLog:

	* gdb.python/py-format-string.exp: Use proc_with_prefix to make
	test names unique.
---
 gdb/testsuite/ChangeLog                       |  5 +++
 gdb/testsuite/gdb.python/py-format-string.exp | 36 +++++++++----------
 2 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp
index 160e9019cda..ed82ee29fc6 100644
--- a/gdb/testsuite/gdb.python/py-format-string.exp
+++ b/gdb/testsuite/gdb.python/py-format-string.exp
@@ -228,7 +228,7 @@ proc check_var_with_bool_opt {
 }
 
 # Test gdb.Value.format_string with no options.
-proc test_no_opts {} {
+proc_with_prefix test_no_opts {} {
   global current_lang
 
   check_var_with_no_opts "a_point_t"
@@ -253,7 +253,7 @@ proc test_no_opts {} {
 }
 
 # Test the raw option for gdb.Value.format_string.
-proc test_raw {} {
+proc_with_prefix test_raw {} {
   global current_lang
   global default_ref_regexp
 
@@ -290,7 +290,7 @@ proc test_raw {} {
 }
 
 # Test the pretty_arrays option for gdb.Value.format_string.
-proc test_pretty_arrays {} {
+proc_with_prefix test_pretty_arrays {} {
   global current_lang
 
   set an_array_pretty "\\{\[\r\n\]+  2,\[\r\n\]+  3,\[\r\n\]+  5\[\r\n\]+\\}"
@@ -331,7 +331,7 @@ proc test_pretty_arrays {} {
 }
 
 # Test the pretty_structs option for gdb.Value.format_string.
-proc test_pretty_structs {} {
+proc_with_prefix test_pretty_structs {} {
   global current_lang
 
   set a_struct_with_union_pretty \
@@ -376,7 +376,7 @@ proc test_pretty_structs {} {
 }
 
 # Test the array_indexes option for gdb.Value.format_string.
-proc test_array_indexes {} {
+proc_with_prefix test_array_indexes {} {
   global current_lang
 
   set an_array_with_indexes "\\{\\\[0\\\] = 2, \\\[1\\\] = 3, \\\[2\\\] = 5\\}"
@@ -419,7 +419,7 @@ proc test_array_indexes {} {
 }
 
 # Test the symbols option for gdb.Value.format_string.
-proc test_symbols {} {
+proc_with_prefix test_symbols {} {
   global undefined
   global current_lang
   global default_pointer_regexp
@@ -454,7 +454,7 @@ proc test_symbols {} {
 }
 
 # Test the unions option for gdb.Value.format_string.
-proc test_unions {} {
+proc_with_prefix test_unions {} {
   global undefined
   global current_lang
 
@@ -488,7 +488,7 @@ proc test_unions {} {
 }
 
 # Test the address option for gdb.Value.format_string.
-proc test_address {} {
+proc_with_prefix test_address {} {
   global undefined
   global current_lang
 
@@ -530,7 +530,7 @@ proc test_address {} {
 }
 
 # Test the deref_refs option for gdb.Value.format_string.
-proc test_deref_refs {} {
+proc_with_prefix test_deref_refs {} {
   global current_lang
   global default_pointer_regexp
   global default_ref_regexp
@@ -557,7 +557,7 @@ proc test_deref_refs {} {
 }
 
 # Test the actual_objects option for gdb.Value.format_string.
-proc test_actual_objects {} {
+proc_with_prefix test_actual_objects {} {
   global current_lang
 
   check_var_with_bool_opt "actual_objects" "a_point_t"
@@ -590,7 +590,7 @@ proc test_actual_objects {} {
 }
 
 # Test the static_members option for gdb.Value.format_string.
-proc test_static_members {} {
+proc_with_prefix test_static_members {} {
   global current_lang
 
   check_var_with_bool_opt "static_members" "a_point_t"
@@ -625,7 +625,7 @@ proc test_static_members {} {
 }
 
 # Test the max_elements option for gdb.Value.format_string.
-proc test_max_elements {} {
+proc_with_prefix test_max_elements {} {
   global current_lang
   global default_pointer_regexp
 
@@ -718,7 +718,7 @@ proc test_max_elements {} {
 }
 
 # Test the max_depth option for gdb.Value.format_string.
-proc test_max_depth {} {
+proc_with_prefix test_max_depth {} {
     set opts "max_depth=-1"
     with_test_prefix $opts {
 	check_format_string "a_struct_with_union" $opts
@@ -738,7 +738,7 @@ proc test_max_depth {} {
 }
 
 # Test the repeat_threshold option for gdb.Value.format_string.
-proc test_repeat_threshold {} {
+proc_with_prefix test_repeat_threshold {} {
   global current_lang
   global default_pointer_regexp
 
@@ -844,7 +844,7 @@ proc test_repeat_threshold {} {
 }
 
 # Test the format option for gdb.Value.format_string.
-proc test_format {} {
+proc_with_prefix test_format {} {
   global current_lang
   global default_pointer_regexp
 
@@ -920,7 +920,7 @@ proc test_format {} {
 }
 
 # Test mixing options.
-proc test_mixed {} {
+proc_with_prefix test_mixed {} {
   global current_lang
   global default_ref_regexp
   global default_pointer_regexp
@@ -954,7 +954,7 @@ proc test_mixed {} {
 }
 
 # Test passing invalid arguments to gdb.Value.format_string.
-proc test_invalid_args {} {
+proc_with_prefix test_invalid_args {} {
   check_format_string \
     "a_point_t" \
     "12" \
@@ -977,7 +977,7 @@ proc test_invalid_args {} {
 }
 
 # Run all the tests in common for both C and C++.
-proc test_all_common {} {
+proc_with_prefix test_all_common {} {
   # No options.
   test_no_opts
   # Single options set to True/False.
-- 
2.25.4


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

* [PATCH 03/14] gdb/testsuite: make test names unique in gdb.python/py-strfns.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
  2021-03-08 18:36 ` [PATCH 01/14] gdb/testsuite: make test names unique in gdb.python/py-mi.exp Andrew Burgess
  2021-03-08 18:36 ` [PATCH 02/14] gdb/testsuite: make test names unique in gdb.python/py-format-string.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 04/14] gdb/testsuite: make test names unique in gdb.python/py-finish-breakpoint.exp Andrew Burgess
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

Wrap some code in `with_test_prefix` to make test names unique.

gdb/testsuite/ChangeLog:

	* gdb.python/py-strfns.exp: Use with_test_prefix to make test
	names unique.
---
 gdb/testsuite/ChangeLog                | 5 +++++
 gdb/testsuite/gdb.python/py-strfns.exp | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.python/py-strfns.exp b/gdb/testsuite/gdb.python/py-strfns.exp
index d6142a6e011..4128c912b7c 100644
--- a/gdb/testsuite/gdb.python/py-strfns.exp
+++ b/gdb/testsuite/gdb.python/py-strfns.exp
@@ -88,7 +88,9 @@ proc test_strfns_core_file { } {
 	    }
 	}
 
-    test_all_strfns
+    with_test_prefix "for corefile" {
+	test_all_strfns
+    }
 }
 
 test_strfns_core_file
-- 
2.25.4


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

* [PATCH 04/14] gdb/testsuite: make test names unique in gdb.python/py-finish-breakpoint.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (2 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 03/14] gdb/testsuite: make test names unique in gdb.python/py-strfns.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 05/14] gdb/testsuite: make test names unique in gdb.python/py-explore.exp Andrew Burgess
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

Make test names unique by just adding additional text to the test
names.  As this is a Python test that repeatedly imports the Python
script I've just numbered the test names in this case rather than
trying to come up with anything better, hence we have:

  import python scripts, 1
  import python scripts, 2
  ...
  import python scripts, 6

Not great, but hopefully good enough.  Everything else has a slightly
more descriptive test name.

gdb/testsuite/ChangeLog:

	* gdb.python/py-finish-breakpoint.exp: Make test names unique.
---
 gdb/testsuite/ChangeLog                       |  4 +++
 .../gdb.python/py-finish-breakpoint.exp       | 28 ++++++++++---------
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index 5622df2a5f4..456d14b9633 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -63,7 +63,7 @@ set python_file [gdb_remote_download host \
 
 gdb_test_no_output "set confirm off" "disable confirmation"
 gdb_test "source $python_file" "Python script imported.*" \
-         "import python scripts"
+         "import python scripts, 1"
 gdb_breakpoint "increase_1"
 gdb_test "continue" "Breakpoint .*at.*" "continue to the function to finish"
 
@@ -101,7 +101,7 @@ clean_restart ${testfile}
 gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
-         "import python scripts"
+         "import python scripts, 2"
 set cond_line [gdb_get_line_number "Condition Break."]
 
 if ![runto_main] then {
@@ -116,7 +116,7 @@ gdb_test "continue" "Temporary breakpoint .*in \\.?do_nothing.*" \
 
 gdb_test "python finishBP = SimpleFinishBreakpoint(gdb.newest_frame())" \
          "SimpleFinishBreakpoint init" \
-         "set finish breakpoint"
+         "set finish breakpoint for no debug symbol test"
 gdb_test "continue" "SimpleFinishBreakpoint stop.*" "check FinishBreakpoint hit"
 gdb_test "python print (finishBP.return_value)" "None" "check return value without debug symbol"
 
@@ -128,7 +128,7 @@ clean_restart ${testfile}
 gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
-         "import python scripts"
+         "import python scripts, 3"
 
 if ![runto call_longjmp_1] then {
     perror "couldn't run to breakpoint call_longjmp"
@@ -137,7 +137,7 @@ if ![runto call_longjmp_1] then {
 
 gdb_test "python finishbp = SimpleFinishBreakpoint(gdb.newest_frame())" \
          "SimpleFinishBreakpoint init" \
-         "set finish breakpoint" 
+         "set finish breakpoint for longjmp test"
 gdb_test "break [gdb_get_line_number "after longjmp."]" "Breakpoint.* at .*" \
          "set BP after the jump"
 gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" \
@@ -154,7 +154,7 @@ clean_restart ${testfile}
 gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
-         "import python scripts"
+         "import python scripts, 4"
 
 
 if ![runto_main] then {
@@ -169,7 +169,8 @@ gdb_test "python TestBreakpoint()" "TestBreakpoint init" \
 gdb_test "continue" \
          "\"FinishBreakpoint\" cannot be set on a dummy frame.*" \
          "don't allow FinishBreakpoint on dummy frames"
-gdb_test "print i" "8" "check stopped location"
+gdb_test "print i" "8" \
+    "check stopped location for stop in dummy frame case"
 
 #
 # Test FinishBreakpoint in BP condition evaluation 
@@ -180,7 +181,7 @@ clean_restart ${testfile}
 gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
-         "import python scripts"
+         "import python scripts, 5"
 
 if ![runto_main] then {
     fail "cannot run to main."
@@ -197,7 +198,8 @@ gdb_test "continue" \
 
 gdb_test "continue" "Continuing.*" "finish condition evaluation"
 gdb_test "continue" "Breakpoint.*" "stop at conditional breakpoint"
-gdb_test "print i" "8" "check stopped location"
+gdb_test "print i" "8" \
+    "check stopped location for stop in normal frame case"
 
 #
 # Test FinishBreakpoint in explicit inferior function call
@@ -207,7 +209,7 @@ clean_restart ${testfile}
 gdb_load_shlib ${lib_sl}
 
 gdb_test "source $python_file" "Python script imported.*" \
-         "import python scripts"
+         "import python scripts, 6"
 
 if ![runto_main] then {
     fail "cannot run to main."
@@ -217,16 +219,16 @@ if ![runto_main] then {
 # return address in dummy frame
 
 gdb_test "python TestExplicitBreakpoint('increase_1')" "Breakpoint.*at.*" \
-         "prepare TestExplicitBreakpoint"
+         "prepare TestExplicitBreakpoint, return addr in dummy frame"
 gdb_test "print increase_1(&i)" \
          "\"FinishBreakpoint\" cannot be set on a dummy frame.*" \
-         "don't allow FinishBreakpoint on dummy frames"
+         "don't allow FinishBreakpoint on dummy frames, return address in dummy frame"
 
 # return address in normal frame
 
 delete_breakpoints
 gdb_test "python TestExplicitBreakpoint(\"increase_1\")" "Breakpoint.*at.*" \
-         "prepare TestExplicitBreakpoint"
+         "prepare TestExplicitBreakpoint, return addr in normal frame"
 gdb_test "print increase(&i)" \
          "SimpleFinishBreakpoint init.*SimpleFinishBreakpoint stop.*The program being debugged stopped while in a function called from GDB.*" \
          "FinishBP stop at during explicit function call"
-- 
2.25.4


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

* [PATCH 05/14] gdb/testsuite: make test names unique in gdb.python/py-explore.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (3 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 04/14] gdb/testsuite: make test names unique in gdb.python/py-finish-breakpoint.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 06/14] gdb/testsuite: make test names unique in gdb.python/py-pp-maint.exp Andrew Burgess
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

Add a with_test_prefix to make test names unique.

gdb/testsuite/ChangeLog:

	* gdb.python/py-explore.exp: Add with_test_prefix to make test
	names unique.
---
 gdb/testsuite/ChangeLog                 |  5 +++
 gdb/testsuite/gdb.python/py-explore.exp | 58 +++++++++++++------------
 2 files changed, 35 insertions(+), 28 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-explore.exp b/gdb/testsuite/gdb.python/py-explore.exp
index 6d27b5a6db8..1772dc0045b 100644
--- a/gdb/testsuite/gdb.python/py-explore.exp
+++ b/gdb/testsuite/gdb.python/py-explore.exp
@@ -446,33 +446,35 @@ gdb_test_multiple "explore type union ComplexUnion" "" {
     }
 }
 
-gdb_test_multiple "explore type cu" "" {
-    -re "'cu' is of type 'union ComplexUnion'.*[compound_type_description $CU {union}].*$CU_fields_types.*" {
-        pass "explore type union ComplexUnion"
-        gdb_test_multiple "0" "explore type union ComplexStruct field 0" {
-            -re ".*[child_compound_type_description $CU_field_0 $SS {struct/class}].*$SS_fields_types.*" {
-                pass "explore type union ComplexUnion field 0"
-                gdb_test_multiple "\0" "return to ComplexUnion from field 0" {
-                    -re ".*[compound_type_description $CU {union}].*$CU_fields_types.*" {
-                        pass "return to ComplexUnion from field 0"
-                    }
-                }
-            }
-        }
-        gdb_test_multiple "1" "explore type union ComplexUnion field 1" {
-            -re ".*[child_array_type_description $CU_field_1 $SS].*" {
-                pass "explore type union ComplexUnion field 1"
-                gdb_test_multiple "\0" "return to ComplexUnion array" {
-                    -re ".*[compound_type_description $CU {union}].*$CU_fields_types.*" {
-                        pass "return to ComplexUnion from field 1"
-                    }
-                }
-            }
-        }
-        gdb_test_multiple "\0" "return to GDB prompt from ComplexUnion type exploration" {
-            -re "$gdb_prompt" {
-                pass "return to GDB prompt from ComplexUnion type exploration"
-            }
-        }
+with_test_prefix "using 'cu'" {
+    gdb_test_multiple "explore type cu" "" {
+	-re "'cu' is of type 'union ComplexUnion'.*[compound_type_description $CU {union}].*$CU_fields_types.*" {
+	    pass "explore type union ComplexUnion"
+	    gdb_test_multiple "0" "explore type union ComplexStruct field 0" {
+		-re ".*[child_compound_type_description $CU_field_0 $SS {struct/class}].*$SS_fields_types.*" {
+		    pass "explore type union ComplexUnion field 0"
+		    gdb_test_multiple "\0" "return to ComplexUnion from field 0" {
+			-re ".*[compound_type_description $CU {union}].*$CU_fields_types.*" {
+			    pass "return to ComplexUnion from field 0"
+			}
+		    }
+		}
+	    }
+	    gdb_test_multiple "1" "explore type union ComplexUnion field 1" {
+		-re ".*[child_array_type_description $CU_field_1 $SS].*" {
+		    pass "explore type union ComplexUnion field 1"
+		    gdb_test_multiple "\0" "return to ComplexUnion array" {
+			-re ".*[compound_type_description $CU {union}].*$CU_fields_types.*" {
+			    pass "return to ComplexUnion from field 1"
+			}
+		    }
+		}
+	    }
+	    gdb_test_multiple "\0" "return to GDB prompt from ComplexUnion type exploration" {
+		-re "$gdb_prompt" {
+		    pass "return to GDB prompt from ComplexUnion type exploration"
+		}
+	    }
+	}
     }
 }
-- 
2.25.4


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

* [PATCH 06/14] gdb/testsuite: make test names unique in gdb.python/py-pp-maint.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (4 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 05/14] gdb/testsuite: make test names unique in gdb.python/py-explore.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 07/14] gdb/testsuite: make test names unique in gdb.python/py-block.exp Andrew Burgess
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

Extend the test names with additional text to make them unique.

gdb/testsuite/ChangeLog:

	* gdb.python/py-pp-maint.exp: Extend test names to make them
	unique.
---
 gdb/testsuite/ChangeLog                  |  5 +++++
 gdb/testsuite/gdb.python/py-pp-maint.exp | 15 ++++++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-pp-maint.exp b/gdb/testsuite/gdb.python/py-pp-maint.exp
index f31fae5011f..4bda85a8aed 100644
--- a/gdb/testsuite/gdb.python/py-pp-maint.exp
+++ b/gdb/testsuite/gdb.python/py-pp-maint.exp
@@ -66,13 +66,15 @@ gdb_test "disable pretty-printer" \
     "$num_pp printers disabled.*0 of $num_pp printers enabled"
 
 gdb_test "enable pretty-printer" \
-    "$num_pp printers enabled.*$num_pp of $num_pp printers enabled"
+    "$num_pp printers enabled.*$num_pp of $num_pp printers enabled" \
+    "first enable of all pretty printers"
 
 gdb_test "disable pretty-printer global" \
     "$num_pp printers disabled.*0 of $num_pp printers enabled"
 
 gdb_test "enable pretty-printer" \
-    "$num_pp printers enabled.*$num_pp of $num_pp printers enabled"
+    "$num_pp printers enabled.*$num_pp of $num_pp printers enabled" \
+    "second enable of all pretty printers"
 
 gdb_test "disable pretty-printer global lookup_function_lookup_test" \
     "1 printer disabled.*[expr $num_pp - 1] of $num_pp printers enabled"
@@ -81,10 +83,12 @@ gdb_test "disable pretty-printer global pp-test;.*" \
     "[expr $num_pp - 2] printers disabled.*1 of $num_pp printers enabled"
 
 gdb_test "info pretty-printer global .*function" \
-    {.*function_lookup_test \[disabled\].*}
+    {.*function_lookup_test \[disabled\].*} \
+    "info pretty-printer for function, pretty-printer is disabled"
 
 gdb_test "info pretty-printer .* pp-test" \
-    {.*pp-test.*struct ss \[disabled\].*}
+    {.*pp-test.*struct ss \[disabled\].*} \
+    "info pretty-printer for pp-test, pretty-printer is disabled"
 
 gdb_test "print flt" " = {x = 42, y = 43}" \
     "print flt disabled"
@@ -111,7 +115,8 @@ gdb_test "enable pretty-printer global pp-test;.*" \
     "1 printer enabled.*$num_pp of $num_pp printers enabled"
 
 gdb_test "info pretty-printer" \
-    {.*function_lookup_test.*pp-test.*struct ss.*}
+    {.*function_lookup_test.*pp-test.*struct ss.*} \
+    "info pretty-printer after re-enabling"
 
 gdb_test "print flt" " = x=<42> y=<43>" \
     "print flt re-enabled"
-- 
2.25.4


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

* [PATCH 07/14] gdb/testsuite: make test names unique in gdb.python/py-block.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (5 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 06/14] gdb/testsuite: make test names unique in gdb.python/py-pp-maint.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 08/14] gdb/testsuite: make test names unique in gdb.python/py-prompt.exp Andrew Burgess
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

Extend some test names to make them unique.

gdb/testsuite/ChangeLog:

	* gdb.python/py-block.exp: Give tests unique names.
---
 gdb/testsuite/ChangeLog               |  4 ++++
 gdb/testsuite/gdb.python/py-block.exp | 18 +++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp
index c9da474debc..fdb7c097e20 100644
--- a/gdb/testsuite/gdb.python/py-block.exp
+++ b/gdb/testsuite/gdb.python/py-block.exp
@@ -38,7 +38,8 @@ gdb_continue_to_breakpoint "Block break here."
 
 # Test initial innermost block.
 gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0
-gdb_py_test_silent_cmd "python block = frame.block()" "Get block" 0
+gdb_py_test_silent_cmd "python block = frame.block()" \
+    "Get block, initial innermost block" 0
 gdb_test "python print (block)" "<gdb.Block object at $hex>" "check block not None"
 gdb_test "python print (block.function)" "None" "first anonymous block"
 gdb_test "python print (block.start)" "${decimal}" "check start not None"
@@ -51,11 +52,14 @@ gdb_test "python print (block\[42\])" ".*TypeError: Expected a string.*" \
 
 # Test global/static blocks
 gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0
-gdb_py_test_silent_cmd "python block = frame.block()" "Get block" 0
+gdb_py_test_silent_cmd "python block = frame.block()" \
+    "Get block, frame.block" 0
 gdb_test "python print (block.is_global)" "False" "not a global block"
 gdb_test "python print (block.is_static)" "False" "not a static block"
-gdb_py_test_silent_cmd "python gblock = block.global_block" "Get block" 1
-gdb_py_test_silent_cmd "python sblock = block.static_block" "Get block" 1
+gdb_py_test_silent_cmd "python gblock = block.global_block" \
+    "Get block, global_block" 1
+gdb_py_test_silent_cmd "python sblock = block.static_block" \
+    "Get block, static_block" 1
 gdb_test "python print (gblock.is_global)" "True" "is the global block"
 gdb_test "python print (sblock.is_static)" "True" "is the static block"
 
@@ -84,9 +88,9 @@ gdb_py_test_silent_cmd "python block_iter = iter (block)" "Get Frame block" 0
 gdb_test "python print (block.is_valid())" "True" \
          "Check block validity"
 gdb_test "python print (block_iter.is_valid())" "True" \
-         "Check block validity"
+         "Check block_iter validity"
 gdb_unload
 gdb_test "python print (block.is_valid())" "False" \
-         "Check block validity"
+         "Check block validity after unload"
 gdb_test "python print (block_iter.is_valid())" "False" \
-         "Check block validity"
+         "Check block_iter validity after unload"
-- 
2.25.4


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

* [PATCH 08/14] gdb/testsuite: make test names unique in gdb.python/py-prompt.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (6 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 07/14] gdb/testsuite: make test names unique in gdb.python/py-block.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 09/14] gdb/testsuite: make test names unique in gdb.python/py-symtab.exp Andrew Burgess
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

Use with_test_prefix to make test names unique.

gdb/testsuite/ChangeLog:

	* gdb.python/py-prompt.exp: Add with_test_prefix to make test
	names unique.
---
 gdb/testsuite/ChangeLog                |  5 ++
 gdb/testsuite/gdb.python/py-prompt.exp | 85 ++++++++++++++------------
 2 files changed, 51 insertions(+), 39 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index 6eed7159b37..d030ef67168 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -52,28 +52,31 @@ global gdb_prompt
 # gdb_test expects it not to be there.
 set gdb_prompt "\[(\]Foo\[)\]"
 
-set GDBFLAGS [concat $tmp_gdbflags " -ex \"set editing on\""]
-prompt_gdb_start
-gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
-	 ".*prompt is \"$gdb_prompt \".*" \
-	 "show prompt gets the correct result"
-gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
-	 "retrieving the prompt causes no extra prompt_hook calls"
-gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
-	 "prompt_hook argument is default prompt."
-gdb_exit
-
+with_test_prefix "set editing on" {
+    set GDBFLAGS [concat $tmp_gdbflags " -ex \"set editing on\""]
+    prompt_gdb_start
+    gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
+	".*prompt is \"$gdb_prompt \".*" \
+	"show prompt gets the correct result"
+    gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
+	"retrieving the prompt causes no extra prompt_hook calls"
+    gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
+	"prompt_hook argument is default prompt."
+    gdb_exit
+}
 
-set GDBFLAGS [concat $tmp_gdbflags " -ex \"set editing off\""]
-prompt_gdb_start
-gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
-	 ".*prompt is \"$gdb_prompt \".*" \
-	 "show prompt gets the correct result 2"
-gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
-	 "retrieving the prompt causes no extra prompt_hook calls 2"
-gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
-	 "prompt_hook argument is default prompt. 2"
-gdb_exit
+with_test_prefix "set editing off" {
+    set GDBFLAGS [concat $tmp_gdbflags " -ex \"set editing off\""]
+    prompt_gdb_start
+    gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
+	".*prompt is \"$gdb_prompt \".*" \
+	"show prompt gets the correct result 2"
+    gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
+	"retrieving the prompt causes no extra prompt_hook calls 2"
+    gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
+	"prompt_hook argument is default prompt. 2"
+    gdb_exit
+}
 
 if {![can_spawn_for_attach]} {
     set GDBFLAGS $saved_gdbflags
@@ -89,15 +92,17 @@ set GDBFLAGS [concat $GDBFLAGS " -ex \"attach $testpid\""]
 set GDBFLAGS [concat $GDBFLAGS " -ex \"continue&\""]
 
 # sync_execution = 1 is_running = 1
-prompt_gdb_start
-gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
-	 ".*prompt is \"$gdb_prompt \".*" \
-	 "show prompt gets the correct result 3"
-gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
-	 "retrieving the prompt causes no extra prompt_hook calls 3"
-gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
-	 "prompt_hook argument is default prompt. 3"
-gdb_exit
+with_test_prefix "sync_execution = 1, is_running = 1" {
+    prompt_gdb_start
+    gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
+	".*prompt is \"$gdb_prompt \".*" \
+	"show prompt gets the correct result 3"
+    gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
+	"retrieving the prompt causes no extra prompt_hook calls 3"
+    gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
+	"prompt_hook argument is default prompt. 3"
+    gdb_exit
+}
 
 set GDBFLAGS [concat $tmp_gdbflags " -ex \"set pagination off\""]
 set GDBFLAGS [concat $GDBFLAGS " -ex \"set editing on\""]
@@ -105,15 +110,17 @@ set GDBFLAGS [concat $GDBFLAGS " -ex \"attach $testpid\""]
 set GDBFLAGS [concat $GDBFLAGS " -ex \"interrupt\""]
 
 # sync_execution = 1 is_running = 0
-prompt_gdb_start
-gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
-	 ".*prompt is \"$gdb_prompt \".*" \
-	 "show prompt gets the correct result 4"
-gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
-	 "retrieving the prompt causes no extra prompt_hook calls 4"
-gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
-	 "prompt_hook argument is default prompt. 4"
-gdb_exit
+with_test_prefix "sync_execution = 1, is_running = 0" {
+    prompt_gdb_start
+    gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
+	".*prompt is \"$gdb_prompt \".*" \
+	"show prompt gets the correct result 4"
+    gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
+	"retrieving the prompt causes no extra prompt_hook calls 4"
+    gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
+	"prompt_hook argument is default prompt. 4"
+    gdb_exit
+}
 
 set GDBFLAGS $saved_gdbflags
 kill_wait_spawned_process $test_spawn_id
-- 
2.25.4


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

* [PATCH 09/14] gdb/testsuite: make test names unique in gdb.python/py-symtab.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (7 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 08/14] gdb/testsuite: make test names unique in gdb.python/py-prompt.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 10/14] gdb/testsuite: remove a duplicate test Andrew Burgess
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

Extend the names of some tests to make them unique.

gdb/testsuite/ChangeLog:

	* gdb.python/py-symtab.exp: Extend test names to make them
	unique.
---
 gdb/testsuite/ChangeLog                | 5 +++++
 gdb/testsuite/gdb.python/py-symtab.exp | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
index 0256963d440..3236b63eecd 100644
--- a/gdb/testsuite/gdb.python/py-symtab.exp
+++ b/gdb/testsuite/gdb.python/py-symtab.exp
@@ -95,8 +95,10 @@ gdb_test_multiple "python print (\"simple_struct\" in static_symbols)" \
 # Test is_valid when the objfile is unloaded.  This must be the last
 # test as it unloads the object file in GDB.
 gdb_unload
-gdb_test "python print (sal.is_valid())" "False" "test sal.is_valid"
-gdb_test "python print (symtab.is_valid())" "False" "test symtab.is_valid()"
+gdb_test "python print (sal.is_valid())" "False" \
+    "test sal.is_valid after unload"
+gdb_test "python print (symtab.is_valid())" "False" \
+    "test symtab.is_valid() after unload"
 
 gdb_test_no_output "python sal = None" "test sal destructor"
 gdb_test_no_output "python symtab = None" "test symtab destructor"
-- 
2.25.4


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

* [PATCH 10/14] gdb/testsuite: remove a duplicate test
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (8 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 09/14] gdb/testsuite: make test names unique in gdb.python/py-symtab.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 11/14] gdb/testsuite: make test names unique in gdb.python/py-explore-cc.exp Andrew Burgess
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

I spotted a duplicate test name in this test script.  Turns out it's
an actual duplicate test.  Delete one copy of this test.

gdb/testsuite/ChangeLog:

	* gdb.python/py-lookup-type.exp: Remove duplicate test.
---
 gdb/testsuite/ChangeLog                     | 4 ++++
 gdb/testsuite/gdb.python/py-lookup-type.exp | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-lookup-type.exp b/gdb/testsuite/gdb.python/py-lookup-type.exp
index ee0ff6f233a..f8ce041bd62 100644
--- a/gdb/testsuite/gdb.python/py-lookup-type.exp
+++ b/gdb/testsuite/gdb.python/py-lookup-type.exp
@@ -53,6 +53,4 @@ test_lookup_type "opencl" "ushort"
 
 test_lookup_type "objective-c" "char"
 
-test_lookup_type "opencl" "ushort"
-
 test_lookup_type "pascal" "char"
-- 
2.25.4


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

* [PATCH 11/14] gdb/testsuite: make test names unique in gdb.python/py-explore-cc.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (9 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 10/14] gdb/testsuite: remove a duplicate test Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 12/14] gdb/testsuite: check the correct Python variable in test Andrew Burgess
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

Add additional text to some test names to make them unique.  In one
case, correct the test name (copy & paste error) to make it correctly
reflect what the test is doing.

gdb/testsuite/ChangeLog:

	* gdb.python/py-explore-cc.exp: Extend test names to make them
	unique.
---
 gdb/testsuite/ChangeLog                    | 5 +++++
 gdb/testsuite/gdb.python/py-explore-cc.exp | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp
index 076df669b00..49e70362c8f 100644
--- a/gdb/testsuite/gdb.python/py-explore-cc.exp
+++ b/gdb/testsuite/gdb.python/py-explore-cc.exp
@@ -66,7 +66,7 @@ gdb_test_multiple "explore b" "" {
         pass "explore b"
         gdb_test_multiple "0" "explore_base_class_A" {
             -re "The value of 'b\.A' is a struct/class of type 'A' with no fields\." {
-                pass "explore_base_class_A"
+                pass "explore_base_class_A, exploring b"
                 gdb_test_multiple "\0" "return_to_b_from_A" {
                     -re ".*$b_desc.*Enter the field number of choice:.*" {
                         pass "return_to_b_from_A"
@@ -85,7 +85,7 @@ gdb_test_multiple "explore b" "" {
                                 pass "explore_field_c_of_b"
                                 gdb_test_multiple "\0" "return_to_b_from_c" {
                                     -re "$b_desc.*Enter the field number of choice:.*" {
-                                        pass "return_to_b_from_i"
+                                        pass "return_to_b_from_c"
                                     }
                                 }
                             }
@@ -107,7 +107,7 @@ gdb_test_multiple "explore B" "" {
         pass "explore B"
         gdb_test_multiple "0" "explore_base_class_A" {
             -re "base class 'A' of 'B' is a struct/class of type 'A' with no fields\." {
-                pass "explore_base_class_A"
+                pass "explore_base_class_A, exploring B"
                 gdb_test_multiple "\0" "return_to_B" {
                     -re "$B_desc.*Enter the field number of choice:.*" {
                         pass "return_to_B"
@@ -116,7 +116,7 @@ gdb_test_multiple "explore B" "" {
                                 pass "explore_field_i_of_B"
                                 gdb_test_multiple "\0" "return_to_B_from_i" {
                                     -re "$B_desc.*Enter the field number of choice:.*" {
-                                        pass "return_to_B_from_i"
+                                        pass "return_to_B_from_i, exploring B"
                                     }
                                 }
                             }
-- 
2.25.4


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

* [PATCH 12/14] gdb/testsuite: check the correct Python variable in test
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (10 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 11/14] gdb/testsuite: make test names unique in gdb.python/py-explore-cc.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 13/14] gdb/testsuite: remove duplicate test from gdb.python/py-value-cc.exp Andrew Burgess
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

While squashing duplicate test names I spotted what looked like a copy
& paste error.  During this test a Python variable is created, and
then we call the type method on that variable.  In one case we create
a variable and then call the type method on a variable created for a
previous test.  I can see no reason why this should be what we want,
it doesn't line up with the comments in the test script, so I've
updated the test.  Note, the expected result doesn't change, just the
command issued (the test relates to stripping typedefs).

gdb/testsuite/ChangeLog:

	* gdb.python/lib-types.exp: Update the test to check the correct
	python variable.
---
 gdb/testsuite/ChangeLog                | 5 +++++
 gdb/testsuite/gdb.python/lib-types.exp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp
index 6376dc94e85..fbc74990f59 100644
--- a/gdb/testsuite/gdb.python/lib-types.exp
+++ b/gdb/testsuite/gdb.python/lib-types.exp
@@ -92,7 +92,7 @@ gdb_test_multiple "python print (str (basic_type_class1_ref_obj))" $test {
 # test nested typedef stripping
 gdb_test_no_output "python typedef_const_typedef_class1_obj = gdb.parse_and_eval ('typedef_const_typedef_class1_obj')"
 gdb_test_no_output "python basic_type_typedef_const_typedef_class1_obj = gdb.types.get_basic_type (typedef_const_typedef_class1_obj.type)"
-gdb_test "python print (str (typedef_class1_obj.type))" "typedef_class1"
+gdb_test "python print (str (typedef_const_typedef_class1_obj.type))" "typedef_class1"
 set test "nested typedef stripping"
 gdb_test_multiple "python print (str (basic_type_typedef_const_typedef_class1_obj))" $test {
     -re "\[\r\n\]+class1\[\r\n\]+$gdb_prompt $" {
-- 
2.25.4


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

* [PATCH 13/14] gdb/testsuite: remove duplicate test from gdb.python/py-value-cc.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (11 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 12/14] gdb/testsuite: check the correct Python variable in test Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-08 18:37 ` [PATCH 14/14] gdb/testsuite: resolve remaining duplicate test names in gdb.python/*.exp Andrew Burgess
  2021-03-10 14:32 ` [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Tom Tromey
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

While squashing duplicate test names I spotted an actual duplicate
test, I suspect a copy & paste error in an earlier patch.  I can see
no reason why we should need to duplicate this test, so I'm removing
one copy of it.

gdb/testsuite/ChangeLog:

	* gdb.python/py-value-cc.exp: Remove a duplicate test.
---
 gdb/testsuite/ChangeLog                  | 4 ++++
 gdb/testsuite/gdb.python/py-value-cc.exp | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp
index ba2617d8cb8..52a71363033 100644
--- a/gdb/testsuite/gdb.python/py-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-value-cc.exp
@@ -60,8 +60,6 @@ gdb_test_no_output "python uu_fields = uu.type.fields()" "init uu_fields"
 gdb_test_no_output "python x_ptr = gdb.parse_and_eval('x_ptr')" "init x_ptr"
 gdb_test_no_output "python xtd = gdb.parse_and_eval('xtd')" "init xtd"
 
-gdb_test "python print(b\[b_fields\[1\]\])" "97 'a'" "b.a via field"
-
 gdb_test "python print(b\[b_fields\[1\]\])" "97 'a'" "b.a via field"
 gdb_test "python print(b\[b_fields\[0\]\].type)" "A" \
   "type of b's base class via field"
-- 
2.25.4


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

* [PATCH 14/14] gdb/testsuite: resolve remaining duplicate test names in gdb.python/*.exp
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (12 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 13/14] gdb/testsuite: remove duplicate test from gdb.python/py-value-cc.exp Andrew Burgess
@ 2021-03-08 18:37 ` Andrew Burgess
  2021-03-10 14:32 ` [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Tom Tromey
  14 siblings, 0 replies; 16+ messages in thread
From: Andrew Burgess @ 2021-03-08 18:37 UTC (permalink / raw)
  To: gdb-patches

This commit resolves the remaining duplicate test names in the
gdb.python/ directory, there's 1 duplicate per test script.  In each
case I have just extended some test names to make them more
descriptive.

gdb/testsuite/ChangeLog:

	* gdb.python/py-bad-printers.exp: Extend test names to make them
	unique.
	* gdb.python/py-events.exp: Likewise.
	* gdb.python/py-finish-breakpoint2.exp: Likewise.
	* gdb.python/py-frame-inline.exp: Likewise.
	* gdb.python/py-frame.exp: Likewise.
	* gdb.python/py-infthread.exp: Likewise.
---
 gdb/testsuite/ChangeLog                            | 10 ++++++++++
 gdb/testsuite/gdb.python/py-bad-printers.exp       |  7 +++++--
 gdb/testsuite/gdb.python/py-events.exp             |  2 +-
 gdb/testsuite/gdb.python/py-finish-breakpoint2.exp |  6 ++++--
 gdb/testsuite/gdb.python/py-frame-inline.exp       |  2 +-
 gdb/testsuite/gdb.python/py-frame.exp              |  3 ++-
 gdb/testsuite/gdb.python/py-infthread.exp          |  3 ++-
 7 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-bad-printers.exp b/gdb/testsuite/gdb.python/py-bad-printers.exp
index d838369df8b..708f0e0c5c9 100644
--- a/gdb/testsuite/gdb.python/py-bad-printers.exp
+++ b/gdb/testsuite/gdb.python/py-bad-printers.exp
@@ -44,10 +44,13 @@ gdb_test "enable pretty-printer global bad-printers;container1" \
     "printers enabled"
 gdb_test "disable pretty-printer global bad-printers;container2" \
     "printers enabled"
-gdb_test "print c" "Result of children iterator not a tuple of two elements.*"
+gdb_test "print c" \
+    "Result of children iterator not a tuple of two elements.*" \
+    "print c, children method doesn't return a tuple"
 
 gdb_test "enable pretty-printer global bad-printers;container2" \
     "printers enabled"
 gdb_test "disable pretty-printer global bad-printers;container1" \
     "printers enabled"
-gdb_test "print c" "Bad result from children iterator.*"
+gdb_test "print c" "Bad result from children iterator.*" \
+    "print c, children method returns a malformed tuple"
diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp
index f1ea3d1de8c..e89cd8b021b 100644
--- a/gdb/testsuite/gdb.python/py-events.exp
+++ b/gdb/testsuite/gdb.python/py-events.exp
@@ -234,4 +234,4 @@ gdb_test_no_output "set variable \$x = 32" "do something"
 gdb_test "python print(count)" 2 "check for before_prompt event"
 
 gdb_test_no_output "xxz" "run a canned sequence"
-gdb_test "python print(count)" 4 "check for before_prompt event"
+gdb_test "python print(count)" 4 "check for before_prompt event again"
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
index 10c4b6e81b8..58e086ad3b4 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
@@ -48,10 +48,12 @@ gdb_breakpoint "throw_exception_1"
 gdb_test "continue" "Breakpoint .*throw_exception_1.*" "run to exception 1"
 
 gdb_test "python print (len(gdb.breakpoints()))" "3" "check BP count"
-gdb_test "python ExceptionFinishBreakpoint(gdb.newest_frame())" "init ExceptionFinishBreakpoint" "set FinishBP after the exception"
+gdb_test "python ExceptionFinishBreakpoint(gdb.newest_frame())" \
+    "init ExceptionFinishBreakpoint" "set FinishBP after the exception"
 gdb_test "continue" ".*stopped at ExceptionFinishBreakpoint.*" "check FinishBreakpoint in catch()"
 gdb_test "python print (len(gdb.breakpoints()))" "3" "check finish BP removal"
 
 gdb_test "continue" ".*Breakpoint.* throw_exception_1.*" "continue to second exception"
-gdb_test "python ExceptionFinishBreakpoint(gdb.newest_frame())" "init ExceptionFinishBreakpoint" "set FinishBP after the exception"
+gdb_test "python ExceptionFinishBreakpoint(gdb.newest_frame())" \
+    "init ExceptionFinishBreakpoint" "set FinishBP after the exception again"
 gdb_test "continue" ".*exception did not finish.*" "FinishBreakpoint with exception thrown not caught"
diff --git a/gdb/testsuite/gdb.python/py-frame-inline.exp b/gdb/testsuite/gdb.python/py-frame-inline.exp
index 9fb3016a781..211c930ce50 100644
--- a/gdb/testsuite/gdb.python/py-frame-inline.exp
+++ b/gdb/testsuite/gdb.python/py-frame-inline.exp
@@ -48,7 +48,7 @@ gdb_test "python print (gdb.selected_frame().read_var('l'))" "\r\n42"
 # the frame cache is flushed somehow after setting the limit, to force
 # frame id recomputation.
 gdb_test_no_output "set backtrace limit 1"
-gdb_continue_to_breakpoint "Block break here."
+gdb_continue_to_breakpoint "Block break here again."
 
 gdb_test "python print (gdb.newest_frame())" ".*"
 
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
index e092e279ff7..a6a5c0de726 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -83,7 +83,8 @@ gdb_test "python print ('result = %s' % (f0 != f0))" " = False" "test inequality
 gdb_test "python print ('result = %s' % f0.is_valid ())" " = True" "test Frame.is_valid"
 gdb_test "python print ('result = %s' % f0.name ())" " = f2" "test Frame.name"
 gdb_test "python print ('result = %s' % (f0.type () == gdb.NORMAL_FRAME))" " = True" "test Frame.type"
-gdb_test "python print ('result = %s' % (f0.unwind_stop_reason () == gdb.FRAME_UNWIND_NO_REASON))" " = True" "test Frame.type"
+gdb_test "python print ('result = %s' % (f0.unwind_stop_reason () == gdb.FRAME_UNWIND_NO_REASON))" \
+    " = True" "test Frame.unwind_stop_reason"
 gdb_test "python print ('result = %s' % gdb.frame_stop_reason_string (gdb.FRAME_UNWIND_INNER_ID))" " = previous frame inner to this frame \\(corrupt stack\\?\\)" "test gdb.frame_stop_reason_string"
 gdb_test "python print ('result = %s' % f0.pc ())" " = \[0-9\]+" "test Frame.pc"
 gdb_test "python print ('result = %s' % (f0.older () == f1))" " = True" "test Frame.older"
diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp
index 6f81a1c932f..aa0b802a11e 100644
--- a/gdb/testsuite/gdb.python/py-infthread.exp
+++ b/gdb/testsuite/gdb.python/py-infthread.exp
@@ -89,4 +89,5 @@ gdb_test "python print ('result = %s' % t0.is_exited ())" " = False" "test Infer
 
 gdb_test "python print ('result = %s' % t0.is_valid ())" " = True" "test InferiorThread.is_valid"
 gdb_test_no_output "kill inferior 1" "kill inferior 1"
-gdb_test "python print ('result = %s' % t0.is_valid ())" " = False" "test InferiorThread.is_valid"
+gdb_test "python print ('result = %s' % t0.is_valid ())" " = False" \
+    "test InferiorThread.is_valid after thread has been killed"
-- 
2.25.4


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

* Re: [PATCH 00/14] Resolve all duplicate test names in gdb.python/
  2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
                   ` (13 preceding siblings ...)
  2021-03-08 18:37 ` [PATCH 14/14] gdb/testsuite: resolve remaining duplicate test names in gdb.python/*.exp Andrew Burgess
@ 2021-03-10 14:32 ` Tom Tromey
  14 siblings, 0 replies; 16+ messages in thread
From: Tom Tromey @ 2021-03-10 14:32 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> After this series there are no longer any duplicate test names in the
Andrew> gdb.python/ directory.

I skimmed these and they all look pretty much like I would expect.
Unless you're worried that there is something weird in here, I say go ahead.
Thank you for doing this.

Tom

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

end of thread, other threads:[~2021-03-10 14:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 18:36 [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Andrew Burgess
2021-03-08 18:36 ` [PATCH 01/14] gdb/testsuite: make test names unique in gdb.python/py-mi.exp Andrew Burgess
2021-03-08 18:36 ` [PATCH 02/14] gdb/testsuite: make test names unique in gdb.python/py-format-string.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 03/14] gdb/testsuite: make test names unique in gdb.python/py-strfns.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 04/14] gdb/testsuite: make test names unique in gdb.python/py-finish-breakpoint.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 05/14] gdb/testsuite: make test names unique in gdb.python/py-explore.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 06/14] gdb/testsuite: make test names unique in gdb.python/py-pp-maint.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 07/14] gdb/testsuite: make test names unique in gdb.python/py-block.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 08/14] gdb/testsuite: make test names unique in gdb.python/py-prompt.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 09/14] gdb/testsuite: make test names unique in gdb.python/py-symtab.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 10/14] gdb/testsuite: remove a duplicate test Andrew Burgess
2021-03-08 18:37 ` [PATCH 11/14] gdb/testsuite: make test names unique in gdb.python/py-explore-cc.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 12/14] gdb/testsuite: check the correct Python variable in test Andrew Burgess
2021-03-08 18:37 ` [PATCH 13/14] gdb/testsuite: remove duplicate test from gdb.python/py-value-cc.exp Andrew Burgess
2021-03-08 18:37 ` [PATCH 14/14] gdb/testsuite: resolve remaining duplicate test names in gdb.python/*.exp Andrew Burgess
2021-03-10 14:32 ` [PATCH 00/14] Resolve all duplicate test names in gdb.python/ Tom Tromey

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