Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] testsuite: Fix a racy FAIL on gdb.base/multi-forks.exp
@ 2009-03-13 16:01 Jan Kratochvil
  2009-03-13 16:47 ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2009-03-13 16:01 UTC (permalink / raw)
  To: gdb-patches

Hi,

Fix a racy FAIL on gdb.base/multi-forks.exp <follow child, print pids>.

Instead of the output suppression by `close (1)' some sleep would also fix it
if close (1) is not compatible enough.


Thanks,
Jan

    
13836 done
[Switching to process 13836]

13839 done
Breakpoint 2, main () at ../.././gdb/testsuite/gdb.base/multi-forks.c:35
35        exit (0);     /* Set exit breakpoint here.  */
(gdb) 13841 done
13842 done
13835 done
13844 done
print pids
13845 done
13838 done
13846 done
13840 done
13834 done
13847 done
13843 done
13837 done
13833 done
$1 = {0, 013826 done
, 0, 0}
(gdb) FAIL: gdb.base/multi-forks.exp: follow child, print pids


gdb/testsuite/
2009-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix a racy FAIL.
	* gdb.base/multi-forks.exp (follow child, print pids): Call `close (1)'.

diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp
index ac56fb0..70c1a20 100644
--- a/gdb/testsuite/gdb.base/multi-forks.exp
+++ b/gdb/testsuite/gdb.base/multi-forks.exp
@@ -66,6 +66,10 @@ global gdb_prompt
 # The result should be that each of the 4 forks returns zero.
 
 runto_main
+
+gdb_test "call close (1)" "= 0" \
+	 "Suppress the inferior output mixing with GDB output"
+
 set exit_bp_loc [gdb_get_line_number "Set exit breakpoint here."]
 gdb_test "break $exit_bp_loc" "Breakpoint.* at .*" "Break at exit"
 gdb_test "set follow child" "" ""


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

end of thread, other threads:[~2009-03-14 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-13 16:01 [patch] testsuite: Fix a racy FAIL on gdb.base/multi-forks.exp Jan Kratochvil
2009-03-13 16:47 ` Joel Brobecker
2009-03-13 21:02   ` Jan Kratochvil
2009-03-13 23:11     ` Joel Brobecker
2009-03-14 21:45       ` Jan Kratochvil
2009-03-14 12:32   ` Eli Zaretskii

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