gdb/testsuite/
authorYao Qi <yao@codesourcery.com>
Fri, 17 Feb 2012 13:22:58 +0000 (13:22 +0000)
committerYao Qi <yao@codesourcery.com>
Fri, 17 Feb 2012 13:22:58 +0000 (13:22 +0000)
* gdb.trace/strace.exp (strace_info_marker): Test `info threads'.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/strace.exp

index ff0332d8b6ce49e287720f5fb25c220bbd44cb16..0de5fe45b98a58e003e4f8b475c2c50bcde233a6 100644 (file)
@@ -1,3 +1,7 @@
+2012-02-17  Yao Qi  <yao@codesourcery.com>
+
+       * gdb.trace/strace.exp (strace_info_marker): Test `info threads'.
+
 2012-02-16  Tom Tromey  <tromey@redhat.com>
 
        * gdb.base/inferior-died.c: Don't include stdio.h.
index 4d6ea1013765b4abeca2154c02959656c784e316..c9947dcaf140458aa8f323fca096d0956f1be8bf 100644 (file)
@@ -55,6 +55,7 @@ gdb_load_shlibs $libipa
 proc strace_info_marker { } {
     global executable
     global pf_prefix
+    global gdb_prompt
 
     set old_pf_prefix $pf_prefix
     lappend pf_prefix "info_marker"
@@ -71,6 +72,13 @@ proc strace_info_marker { } {
     gdb_test "info static-tracepoint-markers" \
        ".*ust/bar\[\t \]+n\[\t \]+.*ust/bar2\[\t \]+n\[\t \]+.*"
 
+    # List all the thread.  It is expected to get three threads without
+    # any errors.
+    gdb_test_multiple "info threads 3 2 1" "info threads" {
+       -re "3\[ \t\]+Thread .*2\[ \t\]+Thread .*1\[ \t\]+Thread .*${gdb_prompt} $" {
+           pass "info threads"
+       }
+    }
     set pf_prefix $old_pf_prefix
 }