This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] testsuite fuzzy results fixup: foll-fork.exp
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 26 Nov 2009 23:06:28 +0100
- Subject: [patch] testsuite fuzzy results fixup: foll-fork.exp
Hi,
one occasional timeout:
(gdb) PASS: gdb.base/foll-fork.exp: default show parent follow, no catchpoints
next 2
-callee: 9949
25 if (pid == 0) /* set breakpoint here */
-(gdb) PASS: gdb.base/foll-fork.exp: default parent follow, no catchpoints
+(gdb) callee: 18747
+FAIL: gdb.base/foll-fork.exp: (timeout) default parent follow, no catchpoints
Dropped the strings as there is no "callee" string expectation in
foll-fork.exp.
and with glibc-debuginfo installed one gets:
(gdb) break 39
Reading in symbols for ../nptl/sysdeps/unix/sysv/linux/fork.c...done.
Breakpoint 12 at 0x3ad22a4876: file ../nptl/sysdeps/unix/sysv/linux/fork.c, line 39.
(gdb) FAIL: gdb.base/foll-fork.exp: unpatch child, breakpoint at exit call
+
Breakpoint 12, __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/fork.c:158
158 fresetlockfiles ();
(gdb) FAIL: gdb.base/foll-fork.exp: unpatch child, unpatched parent breakpoints from child (unknown output)
Thanks,
Jan
gdb/testsuite/
2009-11-26 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/foll-fork.exp (unpatch child, breakpoint at exit call):
Force $srcfile file.
* gdb.base/foll-fork.c (callee): Comment out the printf call.
--- a/gdb/testsuite/gdb.base/foll-fork.c
+++ b/gdb/testsuite/gdb.base/foll-fork.c
@@ -9,7 +9,8 @@ void callee (i)
int i;
#endif
{
- printf("callee: %d\n", i);
+ /* Any output corrupts GDB CLI expect strings.
+ printf("callee: %d\n", i); */
}
#ifdef PROTOTYPES
--- a/gdb/testsuite/gdb.base/foll-fork.exp
+++ b/gdb/testsuite/gdb.base/foll-fork.exp
@@ -240,7 +240,8 @@ proc catch_fork_unpatch_child {} {
# Delete all breakpoints and catchpoints.
delete_breakpoints
- gdb_test "break $bp_exit" \
+ # Force $srcfile as the current GDB source can be in glibc sourcetree.
+ gdb_test "break $srcfile:$bp_exit" \
"Breakpoint .*file .*$srcfile, line .*" \
"unpatch child, breakpoint at exit call"