Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [MI] report pass for resuming commands
@ 2008-06-28 11:18 Vladimir Prus
  2008-06-28 11:58 ` Vladimir Prus
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Prus @ 2008-06-28 11:18 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 135 bytes --]


I've noticed that the test helper routine for sending resuming commands
fails to report passes. Fixes by attached commit.

- Volodya


[-- Attachment #2: commit.diff --]
[-- Type: text/x-diff, Size: 1252 bytes --]

Index: gdb/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.1667
diff -u -p -r1.1667 ChangeLog
--- gdb/testsuite/ChangeLog	27 Jun 2008 16:42:18 -0000	1.1667
+++ gdb/testsuite/ChangeLog	28 Jun 2008 10:14:00 -0000
@@ -1,3 +1,7 @@
+2008-06-28  Vladimir Prus  <vladimir@codesourcery.com>
+
+	* lib/mi-support.exp (mi_send_resuming_command_raw): Report pass.
+
 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
 
 	* lib/gdb.exp (gdb_saved_set_unbuffered_mode_obj): New global.
Index: gdb/testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.63
diff -u -p -r1.63 mi-support.exp
--- gdb/testsuite/lib/mi-support.exp	25 Jun 2008 14:32:34 -0000	1.63
+++ gdb/testsuite/lib/mi-support.exp	28 Jun 2008 10:14:00 -0000
@@ -1398,6 +1398,7 @@ proc mi_send_resuming_command_raw {comma
     send_gdb "$command\n"
     gdb_expect {
         -re "\\^running\r\n\\*running,thread-id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {
+            pass "$test"
         }
         -re ".*${mi_gdb_prompt}" {
             fail "$test (failed to resume)"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [MI] report pass for resuming commands
  2008-06-28 11:18 [MI] report pass for resuming commands Vladimir Prus
@ 2008-06-28 11:58 ` Vladimir Prus
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Prus @ 2008-06-28 11:58 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

On Saturday 28 June 2008 14:16:04 Vladimir Prus wrote:
> 
> I've noticed that the test helper routine for sending resuming commands
> fails to report passes. Fixes by attached commit.

Doh! This patch was the most obvious patch in the world, so I've neglected
to run the tests -- which, of course, failed. Reverted thusly, with comment.

- Volodya


[-- Attachment #2: commit.diff --]
[-- Type: text/x-diff, Size: 1743 bytes --]

Index: gdb/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.1669
diff -u -p -r1.1669 ChangeLog
--- gdb/testsuite/ChangeLog	28 Jun 2008 11:15:34 -0000	1.1669
+++ gdb/testsuite/ChangeLog	28 Jun 2008 11:30:33 -0000
@@ -1,3 +1,8 @@
+2008-06-28  Vladimir Prus  <vladimir@codesourcery.com>
+
+	* lib/mi-support.exp (mi_send_resuming_command_raw): Revert
+	previous commit.  Add a comment.
+
 2008-06-28  Pedro Alves  <pedro@codesourcery.com>
 
 	* gdb.base/sigchld.c, gdb.base/sigchld.exp: New test.
Index: gdb/testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.64
diff -u -p -r1.64 mi-support.exp
--- gdb/testsuite/lib/mi-support.exp	28 Jun 2008 10:14:34 -0000	1.64
+++ gdb/testsuite/lib/mi-support.exp	28 Jun 2008 11:30:33 -0000
@@ -1398,7 +1398,15 @@ proc mi_send_resuming_command_raw {comma
     send_gdb "$command\n"
     gdb_expect {
         -re "\\^running\r\n\\*running,thread-id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {
-            pass "$test"
+            # Note that lack of 'pass' call here -- this works around limitation
+            # in DejaGNU xfail mechanism. mi-until.exp has this:
+            #
+            #     setup_kfail gdb/2104 "*-*-*"
+            #     mi_execute_to ...
+            # 
+            # and mi_execute_to uses mi_send_resuming_command.  If we use 'pass' here,
+            # it will reset kfail, so when the actual test fails, it will be flagged
+            # as real failure.
         }
         -re ".*${mi_gdb_prompt}" {
             fail "$test (failed to resume)"

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-28 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-28 11:18 [MI] report pass for resuming commands Vladimir Prus
2008-06-28 11:58 ` Vladimir Prus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox