This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
fix a couple MI tests in async mode
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 20 May 2011 18:42:15 +0100
- Subject: fix a couple MI tests in async mode
Running the gdb.mi/ tests in async mode shows a few
regressions compared to sync mode. Of those:
PASS: gdb.mi/mi-simplerun.exp: exec-finish
+FAIL: gdb.mi/mi-simplerun.exp: continue to end (failed to resume)
PASS: gdb.mi/mi2-simplerun.exp: exec-finish
+FAIL: gdb.mi/mi2-simplerun.exp: continue to end (failed to resume)
diffing gdb.log shows:
PASS: gdb.mi/mi-simplerun.exp: exec-finish
-exec-continue
^running
*running,thread-id="all"
-(gdb)
callme
+(gdb)
callme
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
*stopped,reason="exited-normally"
-(gdb)
+FAIL: gdb.mi/mi-simplerun.exp: continue to end (failed to resume)
PASS: gdb.mi/mi-simplerun.exp: continue to end
and other variations. Sometimes the tests passes, it's racy.
This is inferior output ("callme") mixed in with MI
output. Problem is in async mode, where the output will
appear vs where the prompt will appear vs the notifications
is undeterministic, which makes it quite hard to handle
inferior output mixed in...
Instead of trying to be clever about this, I noticed
that _nothing_ in the MI testsuite actually cares
about the "callme" string, so we can just delete
the printf, and think about this problem if we
ever need it. Sane frontends will run MI and inferior
output on different channels, so we don't really need
to test this.
Tested on x86_64-linux, sync and async, and applied.
--
Pedro Alves
2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
* gdb.mi/basics.c: Don't include stdio.h or unistd.h.
(callme): Remove printf call.
---
gdb/testsuite/gdb.mi/basics.c | 4 ----
1 file changed, 4 deletions(-)
Index: src/gdb/testsuite/gdb.mi/basics.c
===================================================================
--- src.orig/gdb/testsuite/gdb.mi/basics.c 2011-05-20 17:51:55.858819002 +0100
+++ src/gdb/testsuite/gdb.mi/basics.c 2011-05-20 18:26:51.408819004 +0100
@@ -21,9 +21,6 @@ Free Software Foundation, Inc.
* on function calls. Useful to test printing frames, stepping, etc.
*/
-#include <stdio.h>
-#include <unistd.h>
-
int callee4 (void)
{
int A=1;
@@ -50,7 +47,6 @@ callee1 (int intarg, char *strarg, doubl
void callme (int i)
{
- printf ("callme\n");
}
int return_1 ()