summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/complete.exp
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2020-05-11 10:27:32 -0700
committerKeith Seitz <keiths@redhat.com>2020-05-11 10:28:17 -0700
commitba3e70b008d63b13207339443ad3b9a61ab996bc (patch)
tree7cd0b0e92566f00d218613e5cb6d824b9e8a8845 /gdb/testsuite/gdb.ada/complete.exp
parent7666722fce2a26a32d9d931e9ce0fea8a7209185 (diff)
downloadbinutils-gdb-ba3e70b008d63b13207339443ad3b9a61ab996bc.tar.gz
Clean-up gdb.ada test names
This patch fixes all duplicate and tail parentheses test names. These can really hinder automated test analysis such as used by the buildbot. Before: $ cat testsuite/gdb.sum | egrep "^(PASS|FAIL|XPASS|XFAIL|KPASS|KFAIL)" \ | sort | uniq -c | sort -n | grep -v " 1 " 2 PASS: gdb.ada/attr_ref_and_charlit.exp: print s'last 2 PASS: gdb.ada/bp_on_var.exp: set breakpoint pending off 2 PASS: gdb.ada/complete.exp: complete p pck.inne 2 PASS: gdb.ada/fun_overload_menu.exp: multiple matches for f (f (1, null)) 2 PASS: gdb.ada/type_coercion.exp: p q 2 PASS: gdb.ada/unc_arr_ptr_in_var_rec.exp: print My_P_Object.Ptr when no longer null 3 PASS: gdb.ada/fun_overload_menu.exp: 1 After: <empty> For parentheses, I've audited all occurrences of trailing parentheses. Most offenders are of the form: gdb_test "p func (..)" $expected_result I've either added a unique test name or simply removed the whitespace between the function name and the argument list. gdb/testsuite/ChangeLog 2020-05-11 Keith Seitz <keiths@redhat.com> * gdb.ada/arrayparam.exp: Resolve duplicate and tail parentheses test names. * gdb.ada/arrayptr.exp: Likewise. * gdb.ada/assign_arr.exp: Likewise. * gdb.ada/attr_ref_and_charlit.exp: Likewise. * gdb.ada/bp_on_var.exp: Likewise. * gdb.ada/call_pn.exp: Likewise. * gdb.ada/complete.exp: Likewise. * gdb.ada/fun_overload_menu.exp: Likewise. * gdb.ada/funcall_param.exp: Likewise. * gdb.ada/funcall_ref.exp: Likewise. * gdb.ada/packed_array_assign.exp: Likewise. * gdb.ada/same_component_name.exp: Likewise. * gdb.ada/type_coercion.exp: Likewise. * gdb.ada/unc_arr_ptr_in_var_rec.exp: Likewise. * gdb.ada/variant_record_packed_array.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.ada/complete.exp')
-rw-r--r--gdb/testsuite/gdb.ada/complete.exp14
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp
index 35bfb98b2c4..f2149daefec 100644
--- a/gdb/testsuite/gdb.ada/complete.exp
+++ b/gdb/testsuite/gdb.ada/complete.exp
@@ -31,9 +31,13 @@ set eol "\[\r\n\]*"
# A convenience function that verifies that the "complete EXPR" command
# returns the EXPECTED_OUTPUT.
-proc test_gdb_complete { expr expected_output } {
+proc test_gdb_complete { expr expected_output {msg ""} } {
+ set cmd "complete p $expr"
+ if {$msg == ""} {
+ set msg $cmd
+ }
gdb_test "complete p $expr" \
- "$expected_output"
+ "$expected_output" $msg
}
# A convenience function that verifies that the "complete EXPR" command
@@ -60,7 +64,8 @@ test_gdb_no_completion "inner.insi"
# An incomplete nested package name, were lies a single symbol:
test_gdb_complete "pck.inne" \
- "p pck.inner.inside_variable"
+ "p pck.inner.inside_variable" \
+ "complete nested package name"
# A fully qualified symbol name, mangled...
test_gdb_complete "pck__inner__ins" \
@@ -118,7 +123,8 @@ test_gdb_complete "pck.my" \
# A fully qualified package name
test_gdb_complete "pck.inne" \
- "p pck.inner.inside_variable"
+ "p pck.inner.inside_variable" \
+ "complete fully qualified package name"
# A fully qualified package name, with a dot at the end
test_gdb_complete "pck.inner." \