diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/list.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/list.exp | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index e44ee29096e..88991cb01e0 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-gdb@prep.ai.mit.edu @@ -174,34 +174,35 @@ proc test_list_filename_and_number {} { -re "1\[ \t\]+#include \"list0.h\".*5\[ \t\]+int x;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list list0.c:1" ; return } - timeout { fail "list list0.c:1 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list list0.c:1" ; gdb_suppress_tests } + timeout { fail "list list0.c:1 (timeout)" ; gdb_suppress_tests } } send_gdb "list list0.c:10\n" gdb_expect { -re "5\[ \t\]+int x;.*14\[ \t\]+foo .x\[+)\]+;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list list.c:10" ; return } - timeout { fail "list list.c:10 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list list.c:10" ; gdb_suppress_tests } + timeout { fail "list list.c:10 (timeout)" ; gdb_suppress_tests } } send_gdb "list list1.c:1\n" gdb_expect { -re "1\[ \t\]+void.*5\[ \t\]+printf \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list list1.c:1" ; return } - timeout { fail "list list1.c:1 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list list1.c:1" ; gdb_suppress_tests } + timeout { fail "list list1.c:1 (timeout)" ; gdb_suppress_tests } } send_gdb "list list1.c:12\n" gdb_expect { -re "7\[ \t\]+long_line \[(\]+.*\[)\]+;.*14\[ \t\]+\}\r\n.*$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list list1.c:12" ; return } - timeout { fail "list list1.c:12 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list list1.c:12" ; gdb_suppress_tests } + timeout { fail "list list1.c:12 (timeout)" ; gdb_suppress_tests } } pass "list filename:number ($testcnt tests)" + gdb_stop_suppressing_tests; } # @@ -237,32 +238,33 @@ proc test_list_forward {} { send_gdb "list list0.c:10\n" gdb_expect { -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list list0.c:10" ; return } - timeout { fail "list list0.c:10 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list list0.c:10" ; gdb_suppress_tests } + timeout { fail "list list0.c:10 (timeout)" ; gdb_suppress_tests } } send_gdb "list\n" gdb_expect { -re "15\[ \t\]+foo \[(\]+.*\[)\]+;.*24\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list 15-24" ; return } - timeout { fail "list 15-24 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list 15-24" ; gdb_suppress_tests } + timeout { fail "list 15-24 (timeout)" ; gdb_suppress_tests } } send_gdb "list\n" gdb_expect { -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list 25-34" ; return } - timeout { fail "list 25-34 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list 25-34" ; gdb_suppress_tests } + timeout { fail "list 25-34 (timeout)" ; gdb_suppress_tests } } send_gdb "list\n" gdb_expect { -re "35\[ \t\]+foo \[(\]+.*\[)\]+;.*42\[ \t\]+\}\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list 35-42" ; return } - timeout { fail "list 35-42 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list 35-42" ; gdb_suppress_tests } + timeout { fail "list 35-42 (timeout)" ; gdb_suppress_tests } } pass "successive list commands to page forward ($testcnt tests)" + gdb_stop_suppressing_tests; } proc test_list_backwards {} { @@ -273,32 +275,33 @@ proc test_list_backwards {} { send_gdb "list list0.c:33\n" gdb_expect { -re "28\[ \t\]+foo \[(\]+.*\[)\]+;.*37\[ \t\]+\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list list0.c:33" ; return } - timeout { fail "list list0.c:33 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list list0.c:33" ; gdb_suppress_tests } + timeout { fail "list list0.c:33 (timeout)" ; gdb_suppress_tests } } send_gdb "list -\n" gdb_expect { -re "18\[ \t\]+foo \[(\]+.*\[)\]+;.*27\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list 18-27" ; return } - timeout { fail "list 18-27 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list 18-27" ; gdb_suppress_tests } + timeout { fail "list 18-27 (timeout)" ; gdb_suppress_tests } } send_gdb "list -\n" gdb_expect { -re "8\[ \t\]+breakpoint\[(\]\[)\];.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list 8-17" ; return } - timeout { fail "list 8-17 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list 8-17" ; gdb_suppress_tests } + timeout { fail "list 8-17 (timeout)" ; gdb_suppress_tests } } send_gdb "list -\n" gdb_expect { -re "1\[ \t\]+#include .*7\[ \t\]+set_debug_traps\[(\]\[)\]+;\r\n$gdb_prompt $" { incr testcnt } - -re ".*$gdb_prompt $" { fail "list 1-7" ; return } - timeout { fail "list 1-7 (timeout)" ; return } + -re ".*$gdb_prompt $" { fail "list 1-7" ; gdb_suppress_tests } + timeout { fail "list 1-7 (timeout)" ; gdb_suppress_tests } } pass "$testcnt successive \"list -\" commands to page backwards" + gdb_stop_suppressing_tests; } # @@ -486,7 +489,7 @@ if [target_info exists gdb_stub] { gdb_expect { -re "main.* at .*$gdb_prompt $" {} -re ".*in .*start.*$gdb_prompt $" {} - timeout { fail "single step at breakpoint() (timeout)" ; return 0 } + timeout { fail "single step at breakpoint() (timeout)" } } } |