aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2002-07-11 00:51:37 +0000
committerJoel Brobecker <brobecker@gnat.com>2002-07-11 00:51:37 +0000
commit52d309e45fbfb679db94900849c0d88f83b15279 (patch)
tree6a89a2c4299e3cfbf20f9ba1b71c9249c552d2a4 /gdb/testsuite
parent6cce648081606e6854183af817258686e9636331 (diff)
downloadgdb-52d309e45fbfb679db94900849c0d88f83b15279.zip
gdb-52d309e45fbfb679db94900849c0d88f83b15279.tar.gz
gdb-52d309e45fbfb679db94900849c0d88f83b15279.tar.bz2
* gdb.base/attach.exp: Add patterns to match output from /proc-based
systems. Move comments in expect statements to inside the actions, so that they don't get matched against.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/attach.exp24
2 files changed, 26 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c0ba046..bdc0926 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2002-07-10 Paul N. Hilfinger <hilfingr@otisco.mckusick.com>
+
+ * gdb.base/attach.exp: Add patterns to match output from /proc-based
+ systems.
+ Move comments in expect statements to inside the actions, so that they
+ don't get matched against.
+
2002-07-10 Mark Kettenis <kettenis@gnu.org>
* gdb.base/interrupt.exp: Setup xfail for all i386 BSD's on "call
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index 2b341af..9c6bb97 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -113,6 +113,11 @@ proc do_attach_tests {} {
gdb_expect {
-re ".*Illegal process-id: abc.*$gdb_prompt $"\
{pass "attach to nonsense is prohibited"}
+ -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
+ {
+ # Response expected from /proc-based systems.
+ pass "attach to nonsense is prohibited"
+ }
-re "Attaching to.*$gdb_prompt $"\
{fail "attach to nonsense is prohibited (bogus pid allowed)"}
-re "$gdb_prompt $" {fail "attach to nonsense is prohibited"}
@@ -125,14 +130,23 @@ proc do_attach_tests {} {
#
send_gdb "attach 0\n"
gdb_expect {
- # This reponse is expected on HP-UX 10.20 (i.e., ptrace-based).
-re "Attaching to.*, process 0.*No such process.*$gdb_prompt $"\
- {pass "attach to nonexistent process is prohibited"}
- # This response is expected on HP-UX 11.0 (i.e., ttrace-based).
+ {
+ # Response expected on HP-UX 10.20 (i.e., ptrace-based).
+ pass "attach to nonexistent process is prohibited"
+ }
-re "Attaching to.*, process 0 failed.*Hint.*$gdb_prompt $"\
- {pass "attach to nonexistent process is prohibited"}
+ {
+ # Response expected on HP-UX 11.0 (i.e., ttrace-based).
+ pass "attach to nonexistent process is prohibited"
+ }
-re "Attaching to.*, process 0.*denied.*$gdb_prompt $"\
{pass "attach to nonexistent process is prohibited"}
+ -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
+ {
+ # Response expected from /proc-based systems.
+ pass "attach to nonexistent process is prohibited"
+ }
-re "$gdb_prompt $" {fail "attach to nonexistent process is prohibited"}
timeout {fail "(timeout) attach to nonexistent process is prohibited"}
}
@@ -164,7 +178,7 @@ proc do_attach_tests {} {
send_gdb "attach $testpid\n"
gdb_expect {
- -re "Attaching to program.*$binfile, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\
+ -re "Attaching to program.*`?$binfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\
{pass "attach1, after setting file"}
-re "$gdb_prompt $" {fail "attach1, after setting file"}
timeout {fail "(timeout) attach1, after setting file"}