aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-03-08 18:11:10 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-03-12 12:18:33 +0000
commit8a4efb366fadfc8c7eff2994af863a169fe38401 (patch)
tree04206e7dbab97c956bfbb37294ba00a4cd8f106d /gdb/testsuite
parent66bb1dd9cda54130515be30ff01061bf5226544e (diff)
downloadgdb-8a4efb366fadfc8c7eff2994af863a169fe38401.zip
gdb-8a4efb366fadfc8c7eff2994af863a169fe38401.tar.gz
gdb-8a4efb366fadfc8c7eff2994af863a169fe38401.tar.bz2
gdb/testsuite: check the correct Python variable in test
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.python/lib-types.exp2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1a3d580..23135be 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2021-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
+ * gdb.python/lib-types.exp: Update the test to check the correct
+ python variable.
+
+2021-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
+
* gdb.python/py-explore-cc.exp: Extend test names to make them
unique.
diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp
index 6376dc9..fbc7499 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 $" {