This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] Fix info spu mailbox command

Daniel Jacobowitz schrieb:
gdb_test_multiple is newer and most of the testsuite is very old,
that's why gdb_expect is used.  gdb_test_multiple is much better
because it handles standard cases, like an unexpected prompt, without
having to wait for a timeout.

Attached is a version using gdb_test_multiple. Ok ?

 Markus Deuling
 GNU Toolchain for Linux on Cell BE

diff -urpN src/gdb/testsuite/gdb.arch/spu-info.exp dev/gdb/testsuite/gdb.arch/spu-info.exp
--- src/gdb/testsuite/gdb.arch/spu-info.exp	2008-01-01 23:53:18.000000000 +0100
+++ dev/gdb/testsuite/gdb.arch/spu-info.exp	2008-03-19 18:52:48.000000000 +0100
@@ -200,9 +200,14 @@ gdb_test "finish" "" "finish"
 # Mailbox Test
 # 'info spu mailbox' should be empty.
 c_to "Marker Mbox"
-gdb_test "info spu mailbox" \
-	 "SPU Outbound Mailbox.*0xc0000000.*SPU Outbound Interrupt Mailbox.*0xc0000000.*" \
-	 "info spu mailbox"
+set msg "info spu mailbox"
+gdb_test_multiple "info spu mailbox " $msg {
+  -re "SPU Outbound Mailbox.*0x00000000.*SPU Outbound Interrupt Mailbox.*0x00000000.*$gdb_prompt $" \
+    { pass $msg }
+  default {
+    xfail $msg
+  }
 # 'info spu mailbox' should now contain data.
 c_to "Marker MboxEnd"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]