aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>2006-05-18 19:34:01 +0000
committerFred Fish <fnf@specifix.com>2006-05-18 19:34:01 +0000
commit154189a4a5a03eb0fde31a820453d9cc1324f8c9 (patch)
tree794f427ca4762366828d8363c760848e15acb2bc /gdb
parentbd2bc00f1f0ab567cfb785622f66f134e5709989 (diff)
downloadgdb-154189a4a5a03eb0fde31a820453d9cc1324f8c9.zip
gdb-154189a4a5a03eb0fde31a820453d9cc1324f8c9.tar.gz
gdb-154189a4a5a03eb0fde31a820453d9cc1324f8c9.tar.bz2
Reviewed and approved by Daniel Jacobowitz <drow@false.org>
2006-05-18 Fred Fish <fnf@specifix.com> * gdb.base/a2-run.exp: Allow part of test to run when args aren't required. Check for spurious output after program exits normally.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/a2-run.exp25
2 files changed, 23 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ff8b5cf..c64f6b5 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-18 Fred Fish <fnf@specifix.com>
+
+ * gdb.base/a2-run.exp: Allow part of test to run when args aren't
+ required. Check for spurious output after program exits normally.
+
2006-05-17 Fred Fish <fnf@specifix.com>
* gdb.base/relocate.exp: Use gdb_file_cmd rather than
diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp
index fbc7044..5a6137d 100644
--- a/gdb/testsuite/gdb.base/a2-run.exp
+++ b/gdb/testsuite/gdb.base/a2-run.exp
@@ -20,13 +20,6 @@
# This file was written by Rob Savoye. (rob@cygnus.com)
-# These tests don't work for targets can't take arguments...
-
-if [target_info exists noargs] then {
- verbose "Skipping a2-run.exp because of noargs."
- return
-}
-
# Can't do this test without stdio support.
if [gdb_skip_stdio_test "a2run.exp"] {
return
@@ -77,11 +70,21 @@ if [istarget "*-*-vxworks*"] then {
gdb_expect -re "$gdb_prompt $" {}
} else {
gdb_expect {
+ -re ".*usage: factorial <number>.*Program exited with code 01\.\r\n$gdb_prompt $" {
+ pass "run \"$testfile\" with no args"
+ pass "no spurious messages at program exit"
+ }
-re ".*usage: factorial <number>.*Program exited with code 01.*$gdb_prompt $" {
pass "run \"$testfile\" with no args"
+ fail "no spurious messages at program exit"
+ }
+ -re ".*usage: factorial <number>.* EXIT code 1.*Program exited normally\.\r\n$gdb_prompt $" {
+ pass "run \"$testfile\" with no args (exit wrapper)"
+ pass "no spurious messages at program exit"
}
-re ".*usage: factorial <number>.* EXIT code 1.*Program exited normally.*$gdb_prompt $" {
pass "run \"$testfile\" with no args (exit wrapper)"
+ fail "no spurious messages at program exit"
}
-re ".*$gdb_prompt $" {
fail "run \"$testfile\" with no args"
@@ -92,6 +95,14 @@ if [istarget "*-*-vxworks*"] then {
}
}
}
+
+# The remaining tests don't work for targets can't take arguments...
+
+if [target_info exists noargs] then {
+ verbose "Skipping rest of a2-run.exp because of noargs."
+ return
+}
+
# Now run with some arguments
if [istarget "*-*-vxworks*"] then {
send_gdb "run vxmain \"5\"\n"