This is the mail archive of the
gdb-testers@sourceware.cygnus.com
mailing list for the GDB project.
patch: fixed failures in break.exp
- To: gdb-testers at sourceware dot cygnus dot com
- Subject: patch: fixed failures in break.exp
- From: David Whedon <davidw at gordian dot com>
- Date: Sun, 20 Feb 2000 13:22:05 -0800 (PST)
Three breakages in break.exp:
FAIL: gdb.base/break.exp: break main #1
FAIL: gdb.base/break.exp: break main #2
FAIL: gdb.base/break.exp: clear main
The test themselves are not the problem, rather it is the unexpect
behavior of the 'finish' test that precedes them. I moved the three
above to a spot earlier in the file and they passed.
'finish' does not behave as the test expects it to, even though the test
is written so it won't notice. 'finish' finds the __libc_start_main
frame, but the test expects the main() to frame to be the outermost
frame. I don't know what the desired behavior actually is, so I'm not
sure where to go from here.
from gdb.log:
finish
Run till exit from #0 main (argc=1, argv=0xbfffebe4, envp=0xbfffebec) at ../../../src/gdb/testsuite/gdb.base/break.c:75
720
0x4004dcb3 in __libc_start_main (main=0x8048538 <main>, argc=1, argv=0xbfffebe4, init=0x80483a4 <_init>, fini=0x804863c <_fini>, rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbfffebdc) at ../sysdeps/generic/libc-start.c:78
78 ../sysdeps/generic/libc-start.c: No such file or directory.
Value returned is $1 = 0
(gdb) PASS: gdb.base/break.exp: finish from outermost frame disallowed
break main
"main" is not a function
(gdb) FAIL: gdb.base/break.exp: break main #1
break main
"main" is not a function
(gdb) FAIL: gdb.base/break.exp: break main #2
clear main
"main" is not a function
(gdb) FAIL: gdb.base/break.exp: clear main
here is the patch that removed these three failures, but does nothing
about the unreported failure of the finish test, which might not actually
be a failure:
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 break.exp
*** break.exp 2000/02/16 00:11:07 1.2
--- break.exp 2000/02/20 21:11:11
*************** gdb_expect {
*** 75,80 ****
--- 75,91 ----
timeout { fail "Delete all breakpoints when none
(timeout)" }
}
+ proc test_clear_command {} {
+ gdb_test "break main" "Breakpoint.*at.*" "break main #1"
+ gdb_test "break main" "Breakpoint.*at.*" "break main #2"
+
+ # We don't test that it deletes the correct breakpoints. We do
at
+ # least test that it deletes more than one breakpoint.
+ gdb_test "clear main" {Deleted breakpoints [0-9]+ [0-9]+.*}
+ }
+
+ test_clear_command
+
#
# test break at function
#
*************** if [istarget "hppa*-*-hpux*"] then {
*** 702,716 ****
#********
- proc test_clear_command {} {
- gdb_test "break main" "Breakpoint.*at.*" "break main #1"
- gdb_test "break main" "Breakpoint.*at.*" "break main #2"
-
- # We don't test that it deletes the correct breakpoints. We do
- at
- # least test that it deletes more than one breakpoint.
- gdb_test "clear main" {Deleted breakpoints [0-9]+ [0-9]+.*}
- }
-
#
# Test "next" over recursive function call.
#
--- 713,718 ----
*************** proc test_next_with_recursion {} {
*** 798,804 ****
gdb_stop_suppressing_tests;
}
- test_clear_command
test_next_with_recursion
# Reset the default arguments for VxWorks
--- 800,805 ----