diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-infthread.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/manythreads.exp | 3 |
3 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f6f5121..77828ab 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-01-19 Tom Tromey <tromey@redhat.com> + + * gdb.python/py-infthread.exp: Add thread tests. + 2011-01-14 Joel Brobecker <brobecker@adacore.com> * gdb.base/wchar.c, gdb.base/wchar.exp: New testcases. diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp index 7b0c589..bbec4ec 100644 --- a/gdb/testsuite/gdb.python/py-infthread.exp +++ b/gdb/testsuite/gdb.python/py-infthread.exp @@ -50,6 +50,17 @@ gdb_test "python print t0" "\\<gdb.InferiorThread object at 0x\[\[:xdigit:\]\]+> gdb_test "python print 'result =', t0.num" " = \[0-9\]+" "test Inferior.num" gdb_test "python print 'result =', t0.ptid" " = \\(\[0-9\]+, \[0-9\]+, \[0-9\]+\\)" "test InferiorThread.ptid" +gdb_py_test_silent_cmd "python name = gdb.selected_thread().name" \ + "get supplied name of current thread" 1 +gdb_py_test_silent_cmd "python gdb.selected_thread().name = 'hibob'" \ + "set name of current thread" 1 +gdb_test "python print gdb.selected_thread().name" "hibob" \ + "check name of current thread" +gdb_py_test_silent_cmd "python gdb.selected_thread().name = None" \ + "reset name of current thread" 1 +gdb_test "python print gdb.selected_thread().name == name" "True" \ + "check name of current thread again" + gdb_test "python print 'result =', t0.is_stopped ()" " = True" "test InferiorThread.is_stopped" gdb_test "python print 'result =', t0.is_running ()" " = False" "test InferiorThread.is_running" gdb_test "python print 'result =', t0.is_exited ()" " = False" "test InferiorThread.is_exited" diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp index 1bd3e8d..12a25b9 100644 --- a/gdb/testsuite/gdb.threads/manythreads.exp +++ b/gdb/testsuite/gdb.threads/manythreads.exp @@ -99,6 +99,9 @@ gdb_test_multiple $cmd $cmd { } } +gdb_test_no_output "thread name zardoz" "give a name to the thread" +gdb_test "info threads" ".*zardoz.*" "check thread name" + set message "second continue" gdb_test_multiple "continue" "second continue" { -re "error:.*$gdb_prompt $" { |