From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch] testsuite: Fix a racy FAIL on gdb.base/multi-forks.exp
Date: Fri, 13 Mar 2009 16:01:00 -0000 [thread overview]
Message-ID: <20090313152723.GA13673@host0.dyn.jankratochvil.net> (raw)
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" "" ""
next reply other threads:[~2009-03-13 15:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 16:01 Jan Kratochvil [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090313152723.GA13673@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox