aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2005-03-08 10:12:21 +0000
committerNathan Sidwell <nathan@codesourcery.com>2005-03-08 10:12:21 +0000
commit5f579bc5f9ba6cc5a444fa49f25fbfa5274bd37b (patch)
tree13ccd824256103c6ec363449479728d615f11917 /gdb/testsuite
parent549678dac212a054bd13d400abef7d67348c036b (diff)
downloadgdb-5f579bc5f9ba6cc5a444fa49f25fbfa5274bd37b.zip
gdb-5f579bc5f9ba6cc5a444fa49f25fbfa5274bd37b.tar.gz
gdb-5f579bc5f9ba6cc5a444fa49f25fbfa5274bd37b.tar.bz2
* gdb.base/sigbpt.exp: Disable if gdb,nosignals.
* gdb.base/signull.exp: Disable if gdb,nosignals. * gdb.cp/bs15503.exp: Disable if skip_cplus_tests * gdb.cp/exception.exp: Disable if skip_cplus_tests. * gdb.mi/mi-console.exp: Disable hello test if gdb,noinferiorio. * gdb.mi/mi2-console.exp: Likewise. * gdb.trace/collection.exp (run_trace_experiment): Consume the continue output at start. (gdb_collect_locals_test): Robustify regexp. * gdb.trace/passc-dyn.exp: Fix comment typo. * gdb.trace/tfind.exp: Don't enable optimization. Remove stray ']'.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog14
-rw-r--r--gdb/testsuite/gdb.base/sigbpt.exp5
-rw-r--r--gdb/testsuite/gdb.base/signull.exp5
-rw-r--r--gdb/testsuite/gdb.cp/bs15503.exp2
-rw-r--r--gdb/testsuite/gdb.cp/exception.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-console.exp32
-rw-r--r--gdb/testsuite/gdb.mi/mi2-console.exp36
-rw-r--r--gdb/testsuite/gdb.trace/collection.exp15
-rw-r--r--gdb/testsuite/gdb.trace/passc-dyn.exp2
-rw-r--r--gdb/testsuite/gdb.trace/tfind.exp8
10 files changed, 80 insertions, 41 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c9f4ecb..ace5929 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,17 @@
+2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gdb.base/sigbpt.exp: Disable if gdb,nosignals.
+ * gdb.base/signull.exp: Disable if gdb,nosignals.
+ * gdb.cp/bs15503.exp: Disable if skip_cplus_tests
+ * gdb.cp/exception.exp: Disable if skip_cplus_tests.
+ * gdb.mi/mi-console.exp: Disable hello test if gdb,noinferiorio.
+ * gdb.mi/mi2-console.exp: Likewise.
+ * gdb.trace/collection.exp (run_trace_experiment): Consume the
+ continue output at start.
+ (gdb_collect_locals_test): Robustify regexp.
+ * gdb.trace/passc-dyn.exp: Fix comment typo.
+ * gdb.trace/tfind.exp: Don't enable optimization. Remove stray ']'.
+
2005-03-08 Corinna Vinschen <vinschen@redhat.com>
* gdb.asm/asm-source.exp: Add iq2000 case.
diff --git a/gdb/testsuite/gdb.base/sigbpt.exp b/gdb/testsuite/gdb.base/sigbpt.exp
index 61625b5..45630ab 100644
--- a/gdb/testsuite/gdb.base/sigbpt.exp
+++ b/gdb/testsuite/gdb.base/sigbpt.exp
@@ -29,6 +29,11 @@
# instruction. Since the kernel problems can be "fixed" using
# software single-step this is KFAILed rather than XFAILed.
+if [target_info exists gdb,nosignals] {
+ verbose "Skipping signals.exp because of nosignals."
+ continue
+}
+
if $tracelevel {
strace $tracelevel
}
diff --git a/gdb/testsuite/gdb.base/signull.exp b/gdb/testsuite/gdb.base/signull.exp
index 59b1a56..5d4f0f1 100644
--- a/gdb/testsuite/gdb.base/signull.exp
+++ b/gdb/testsuite/gdb.base/signull.exp
@@ -28,6 +28,11 @@
# This also tests backtrace/gdb1476.
+if [target_info exists gdb,nosignals] {
+ verbose "Skipping signals.exp because of nosignals."
+ continue
+}
+
if $tracelevel {
strace $tracelevel
}
diff --git a/gdb/testsuite/gdb.cp/bs15503.exp b/gdb/testsuite/gdb.cp/bs15503.exp
index 9b6095b..fe60639 100644
--- a/gdb/testsuite/gdb.cp/bs15503.exp
+++ b/gdb/testsuite/gdb.cp/bs15503.exp
@@ -22,6 +22,8 @@ if $tracelevel {
strace $tracelevel
}
+if { [skip_cplus_tests] } { continue }
+
set testfile "bs15503"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
diff --git a/gdb/testsuite/gdb.cp/exception.exp b/gdb/testsuite/gdb.cp/exception.exp
index 3193091..7c7cd0c 100644
--- a/gdb/testsuite/gdb.cp/exception.exp
+++ b/gdb/testsuite/gdb.cp/exception.exp
@@ -42,6 +42,8 @@ if $tracelevel then {
strace $tracelevel
}
+if { [skip_cplus_tests] } { continue }
+
set testfile "exception"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
index 9986b5e..07a4f7c 100644
--- a/gdb/testsuite/gdb.mi/mi-console.exp
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
@@ -64,23 +64,25 @@ gdb_expect {
}
}
-gdb_expect {
- -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
- pass "Hello message"
- }
- -re "Hello" {
+if { ![target_info exists gdb,noinferiorio]} {
+ gdb_expect {
+ -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
+ pass "Hello message"
+ }
+ -re "Hello" {
- # Probably a native system where GDB doesn't have direct
- # control over the inferior console.
- # For this to work, GDB would need to run the inferior process
- # under a PTY and then use the even-loops ability to wait on
- # multiple event sources to channel the output back through the
- # MI.
+ # Probably a native system where GDB doesn't have direct #
+ # control over the inferior console. # For this to work,
+ # GDB would need to run the inferior process # under a PTY
+ # and then use the even-loops ability to wait on #
+ # multiple event sources to channel the output back
+ # through the # MI.
- kfail "gdb/623" "Hello message"
- }
- timeout {
- fail "Hello message (timeout)"
+ kfail "gdb/623" "Hello message"
+ }
+ timeout {
+ fail "Hello message (timeout)"
+ }
}
}
diff --git a/gdb/testsuite/gdb.mi/mi2-console.exp b/gdb/testsuite/gdb.mi/mi2-console.exp
index dba80c9..9d75d18 100644
--- a/gdb/testsuite/gdb.mi/mi2-console.exp
+++ b/gdb/testsuite/gdb.mi/mi2-console.exp
@@ -64,26 +64,28 @@ gdb_expect {
}
}
-gdb_expect {
- -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
- pass "Hello message"
- }
- -re "Hello" {
-
- # Probably a native system where GDB doesn't have direct
- # control over the inferior console.
- # For this to work, GDB would need to run the inferior process
- # under a PTY and then use the even-loops ability to wait on
- # multiple event sources to channel the output back through the
- # MI.
+if { ![target_info exists gdb,noinferiorio] } {
+ gdb_expect {
+ -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
+ pass "Hello message"
+ }
+ -re "Hello" {
+
+ # Probably a native system where GDB doesn't have direct #
+ # control over the inferior console. # For this to work,
+ # GDB would need to run the inferior process # under a PTY
+ # and then use the even-loops ability to wait on #
+ # multiple event sources to channel the output back
+ # through the # MI.
- kfail "gdb/623" "Hello message"
- }
- timeout {
- fail "Hello message (timeout)"
+ kfail "gdb/623" "Hello message"
+ }
+ timeout {
+ fail "Hello message (timeout)"
+ }
}
}
-
+
gdb_expect {
-re "47\\*stopped.*$mi_gdb_prompt$" {
pass "Finished step over hello"
diff --git a/gdb/testsuite/gdb.trace/collection.exp b/gdb/testsuite/gdb.trace/collection.exp
index a6ac5d8..61fddd8 100644
--- a/gdb/testsuite/gdb.trace/collection.exp
+++ b/gdb/testsuite/gdb.trace/collection.exp
@@ -79,7 +79,18 @@ proc test_register { reg test_id } {
}
proc run_trace_experiment { msg test_func } {
- gdb_run_cmd
+ global gdb_prompt
+ gdb_run_cmd
+ gdb_expect {
+ -re ".*Breakpoint \[0-9\]+, begin .*$gdb_prompt $" {
+ }
+ -re ".*$gdb_prompt $" {
+ fail "collect $msg: advance to go"
+ }
+ timeout {
+ fail "collect $msg: advance to go (timeout)"
+ }
+ }
gdb_test "tstart" \
"\[\r\n\]+" \
"collect $msg: start trace experiment"
@@ -280,7 +291,7 @@ proc gdb_collect_locals_test { func mylocs msg } {
run_trace_experiment $msg $func
gdb_test "print locc" \
- "\\$\[0-9\]+ = 11 '.013'$cr" \
+ "\\$\[0-9\]+ = 11 '.\[a-z0-7\]+'$cr" \
"collect $msg: collected local char"
gdb_test "print loci" \
"\\$\[0-9\]+ = 12$cr" \
diff --git a/gdb/testsuite/gdb.trace/passc-dyn.exp b/gdb/testsuite/gdb.trace/passc-dyn.exp
index d0c27ea..fc096c8 100644
--- a/gdb/testsuite/gdb.trace/passc-dyn.exp
+++ b/gdb/testsuite/gdb.trace/passc-dyn.exp
@@ -66,7 +66,7 @@ gdb_reinitialize_dir $srcdir/$subdir
# We generously give ourselves one "pass" if we successfully
# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not supporst trace"
+ pass "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp
index 9507351..e11bb7f 100644
--- a/gdb/testsuite/gdb.trace/tfind.exp
+++ b/gdb/testsuite/gdb.trace/tfind.exp
@@ -54,12 +54,8 @@ if [istarget "m68k-*-elf"] then {
set srcfile ${testfile}.c
set binfile $objdir/$subdir/$testfile
- # Why does this test require '-O1' level optimization? (In
- # general, the optimization level should be left under the control
- # of the test framework (target_list and so on), so if we don't
- # have to override it in individual tests like this, we shouldn't.)
if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
- executable {debug additional_flags=-w optimize=-O1}] != "" } {
+ executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_load $binfile
@@ -303,7 +299,7 @@ gdb_tfind_test "8.13: tracepoint <no arg>" "tracepoint" \
"\$tracepoint" "$tdp1";
gdb_test "printf \"x \%d x\\n\", \$trace_frame == \$save_frame" \
"x 0 x" \
- "8.13: tracepoint <no arg>, tracepoint number unchanged"]
+ "8.13: tracepoint <no arg>, tracepoint number unchanged"
# 1.12 set tracepoint in prologue
#