diff options
author | Bob Manson <manson@cygnus> | 1997-03-06 22:32:25 +0000 |
---|---|---|
committer | Bob Manson <manson@cygnus> | 1997-03-06 22:32:25 +0000 |
commit | fa5864d5f76326ddf08eb561569b82f348fcb45c (patch) | |
tree | 6f4143546dff0ec514161c1edbae169bca160562 /gdb/testsuite/gdb.base | |
parent | 35106aae73c1a4fcfebcb83722c1c71b042a0474 (diff) | |
download | gdb-fa5864d5f76326ddf08eb561569b82f348fcb45c.zip gdb-fa5864d5f76326ddf08eb561569b82f348fcb45c.tar.gz gdb-fa5864d5f76326ddf08eb561569b82f348fcb45c.tar.bz2 |
Added and updated copyright notices to testsuite expect
scripts.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/a1-selftest.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/crossload.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/help.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/list.exp | 57 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/signals.exp | 71 |
5 files changed, 82 insertions, 60 deletions
diff --git a/gdb/testsuite/gdb.base/a1-selftest.exp b/gdb/testsuite/gdb.base/a1-selftest.exp index eac8b02..bc3893a 100644 --- a/gdb/testsuite/gdb.base/a1-selftest.exp +++ b/gdb/testsuite/gdb.base/a1-selftest.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1988, 1990, 1991, 1992, 1994 Free Software Foundation, Inc. +# Copyright (C) 1988, 1990, 1991, 1992, 1994, 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 diff --git a/gdb/testsuite/gdb.base/crossload.exp b/gdb/testsuite/gdb.base/crossload.exp index c605c85..26bb7a1 100644 --- a/gdb/testsuite/gdb.base/crossload.exp +++ b/gdb/testsuite/gdb.base/crossload.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1992 Free Software Foundation, Inc. +# Copyright (C) 1992, 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 diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp index 7ac308b..edb34b7 100644 --- a/gdb/testsuite/gdb.base/help.exp +++ b/gdb/testsuite/gdb.base/help.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1988, 1990, 1991, 1992, 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 @@ -282,7 +282,7 @@ gdb_test "help section" "Change the base address of section SECTION of the exec #test help set annotate gdb_test "help set annotate" "Set annotation_level.*\[\r\n\]+0 == normal; 1 == fullname \\(for use when running under emacs\\).*\[\r\n\]+2 == output annotated suitably for use by programs that control GDB." "help set annotate" # test help set args -gdb_test "help set args" "Set arguments to give program being debugged when it is started..*\[\r\n\]+Follow this command with any number of args, to be passed to the program." -re "Set arguments to give program being debugged when it is started..*\[\r\n\]+Follow this command with any number of args, to be passed to the program..*$gdb_prompt $" +gdb_test "help set args" "Set arguments to give program being debugged when it is started..*\[\r\n\]+Follow this command with any number of args, to be passed to the program." "Set arguments to give program being debugged when it is started..*\[\r\n\]+Follow this command with any number of args, to be passed to the program..*$gdb_prompt $" gdb_test "help set args" # test help set check "c" abbreviation gdb_test "help set c" "Set the status of the type/range checker.*\[\r\n\]+List of set check subcommands:.*\[\r\n\]+set check range -- Set range checking.*\[\r\n\]+set check type -- Set type checking.*\[\r\n\]+Type \"help set check\" followed by set check subcommand name for full documentation..*\[\r\n\]+Command name abbreviations are allowed if unambiguous." "help set check \"c\" abbreviation" @@ -372,7 +372,7 @@ gdb_test "help shell" "Execute the rest of the line as a shell command. .*\[\r\ #test help show annotate gdb_test "help show annotate" "Show annotation_level.*\[\r\n\]+0 == normal; 1 == fullname \\(for use when running under emacs\\).*\[\r\n\]+2 == output annotated suitably for use by programs that control GDB." "help show annotate" # test help show args -gdb_test "help show args" "Show arguments to give program being debugged when it is started..*\[\r\n\]+Follow this command with any number of args, to be passed to the program." -re "Show arguments to give program being debugged when it is started..*\[\r\n\]+Follow this command with any number of args, to be passed to the program..*$gdb_prompt $" +gdb_test "help show args" "Show arguments to give program being debugged when it is started..*\[\r\n\]+Follow this command with any number of args, to be passed to the program." "Show arguments to give program being debugged when it is started..*\[\r\n\]+Follow this command with any number of args, to be passed to the program..*$gdb_prompt $" gdb_test "help show args" # test help show check "c" abbreviation gdb_test "help show c" "Show the status of the type/range checker.*\[\r\n\]+List of show check subcommands:.*\[\r\n\]+show check range -- Show range checking.*\[\r\n\]+show check type -- Show type checking.*\[\r\n\]+Type \"help show check\" followed by show check subcommand name for full documentation..*\[\r\n\]+Command name abbreviations are allowed if unambiguous." "help show check \"c\" abbreviation" diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index e44ee29..88991cb 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)" } } } diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp index a362b38..f315d3c 100644 --- a/gdb/testsuite/gdb.base/signals.exp +++ b/gdb/testsuite/gdb.base/signals.exp @@ -1,3 +1,22 @@ +# Copyright (C) 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# 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. + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@prep.ai.mit.edu + if [target_info exists gdb,nosignals] { verbose "Skipping signals.exp because of nosignals." continue @@ -25,7 +44,7 @@ if [get_compiler_info ${binfile}] { } proc signal_tests_1 {} { - global prompt + global gdb_prompt if [runto_main] then { gdb_test "next" "signal \\(SIGUSR1.*" \ "next over signal (SIGALRM, handler)" @@ -50,9 +69,9 @@ proc signal_tests_1 {} { # object file format or utils. (sigh) setup_xfail "i*86-pc-linuxaout-gnu" "i*86-pc-linuxoldld-gnu" send_gdb "next\n" - expect { - -re "alarm .*$prompt $" { pass "next to 2nd alarm (1)" } - -re "Program received signal SIGTRAP.*first.*$prompt $" { + gdb_expect { + -re "alarm .*$gdb_prompt $" { pass "next to 2nd alarm (1)" } + -re "Program received signal SIGTRAP.*first.*$gdb_prompt $" { # This can happen on machines that have a trace flag # in their PS register. @@ -82,7 +101,7 @@ proc signal_tests_1 {} { fail "next to 2nd alarm (1) (probably kernel bug)" gdb_test "next" "alarm.*" "next to 2nd alarm (1)" } - -re "Program exited with code.*$prompt $" { + -re "Program exited with code.*$gdb_prompt $" { # This is apparently a bug in the UnixWare kernel (but # has not been investigated beyond the @@ -115,7 +134,7 @@ proc signal_tests_1 {} { fail "'next' behaved as 'continue (known SVR4 bug)'" return 0 } - -re ".*$prompt $" { fail "next to 2nd alarm (1)" } + -re ".*$gdb_prompt $" { fail "next to 2nd alarm (1)" } timeout { fail "next to 2nd alarm (1); (timeout)" } eof { fail "next to 2nd alarm (1); (eof)" } } @@ -129,18 +148,18 @@ proc signal_tests_1 {} { set bash_bug 0 send_gdb "next\n" setup_xfail "i*86-pc-linux-gnu" - expect { - -re "Breakpoint.*handler.*$prompt $" { + gdb_expect { + -re "Breakpoint.*handler.*$gdb_prompt $" { pass "next to handler in signals_tests_1" } - -re "Program received signal SIGEMT.*$prompt $" { + -re "Program received signal SIGEMT.*$gdb_prompt $" { # Bash versions before 1.13.5 cause this behaviour # by blocking SIGTRAP. fail "next to handler in signals_tests_1 (known problem with bash versions before 1.13.5)" set bash_bug 1 gdb_test "signal 0" "Breakpoint.*handler.*" } - -re ".*$prompt $" { fail "next to handler in signals_tests_1" } + -re ".*$gdb_prompt $" { fail "next to handler in signals_tests_1" } timeout { fail "next to handler in signals_tests_1 (timeout)" } eof { fail "next to handler in signals_tests_1 (eof)" } } @@ -161,9 +180,9 @@ proc signal_tests_1 {} { setup_xfail "i*86-*-bsd*" setup_xfail "i*86-pc-linux-gnu" send_gdb "continue\n" - expect { - -re "Breakpoint.*func1.*$prompt $" { pass "continue to func1" } - -re "Program received signal SIGTRAP.*second.*$prompt $" { + gdb_expect { + -re "Breakpoint.*func1.*$gdb_prompt $" { pass "continue to func1" } + -re "Program received signal SIGTRAP.*second.*$gdb_prompt $" { # See explanation for `next to 2nd alarm (1)' fail above. # We did step into the signal handler, hit a breakpoint @@ -175,7 +194,7 @@ proc signal_tests_1 {} { gdb_test "continue" "Breakpoint.*func1.*" \ "extra continue to func1" } - -re "Program received signal SIGTRAP.*func1 ..;.*$prompt $" { + -re "Program received signal SIGTRAP.*func1 ..;.*$gdb_prompt $" { # On the vax under Ultrix the set trace flag in the restored # context is causing the SIGTRAP, but after stepping one @@ -185,21 +204,21 @@ proc signal_tests_1 {} { gdb_test "continue" "Breakpoint.*func1.*" \ "extra continue to func1" } - -re ".*$prompt $" { fail "continue to func1" } + -re ".*$gdb_prompt $" { fail "continue to func1" } default { fail "continue to func1" } } setup_xfail "*-*-irix*" send_gdb "signal SIGUSR1\n" - expect { - -re "Breakpoint.*handler.*$prompt $" { pass "signal SIGUSR1" } - -re "Program received signal SIGUSR1.*$prompt $" { + gdb_expect { + -re "Breakpoint.*handler.*$gdb_prompt $" { pass "signal SIGUSR1" } + -re "Program received signal SIGUSR1.*$gdb_prompt $" { # This is what irix4 and irix5 do. # It would appear to be a kernel bug. fail "signal SIGUSR1" gdb_test "continue" "Breakpoint.*handler.*" "pass it SIGUSR1" } - -re ".*$prompt $" { fail "signal SIGUSR1" } + -re ".*$gdb_prompt $" { fail "signal SIGUSR1" } default { fail "signal SIGUSR1" } } @@ -216,14 +235,14 @@ proc signal_tests_1 {} { setup_xfail "*-*-*" send_gdb "continue\n" - expect { - -re "Breakpoint.*func2.*$prompt $" { pass "continue to func2" } - -re "Breakpoint.*func1.*$prompt $" { + gdb_expect { + -re "Breakpoint.*func2.*$gdb_prompt $" { pass "continue to func2" } + -re "Breakpoint.*func1.*$gdb_prompt $" { fail "continue to func2" gdb_test "continue" "Breakpoint.*func2.*" \ "extra continue to func2" } - -re ".*$prompt $" { fail "continue to func2" } + -re ".*$gdb_prompt $" { fail "continue to func2" } default { fail "continue to func2" } } @@ -319,9 +338,9 @@ signal_tests_1 # Force a resync, so we're looking at the right prompt. On SCO we # were getting out of sync (I don't understand why). send_gdb "p 1+1\n" -expect { - -re "= 2.*$prompt $" {} - -re ".*$prompt $" { perror "sync trouble in signals.exp" } +gdb_expect { + -re "= 2.*$gdb_prompt $" {} + -re ".*$gdb_prompt $" { perror "sync trouble in signals.exp" } default { perror "sync trouble in signals.exp" } } |