This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] testsuite: more skips for printf dependencies
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [RFA] testsuite: more skips for printf dependencies
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Mon, 16 Oct 2000 16:36:21 -0700 (PDT)
The following tests will not pass without support for printf.
2000-10-16 Michael Snyder <msnyder@cleaver.cygnus.com>
* gdb.base/sizeof.exp (check_sizeof): Skip if no printf support.
* gdb.base/varargs.exp: Skip entire test if no printf support.
* gdb.base/ending-run.exp (Step to return): Skip if no printf supt.
* gdb.base/shlib-call.exp: Skip several tests if no printf support.
Index: sizeof.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/sizeof.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 sizeof.exp
*** sizeof.exp 2000/07/13 05:03:57 1.1
--- sizeof.exp 2000/10/16 23:35:13
*************** set sizeof_long_double [get_sizeof "long
*** 92,97 ****
--- 92,102 ----
proc check_sizeof { type size } {
global gdb_prompt
+
+ if [gdb_skip_stdio_test "check sizeof $type == $size"] {
+ return;
+ }
+
set pat [string_to_regexp ${type}]
send_gdb "next\n"
gdb_expect {
Index: varargs.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/varargs.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 varargs.exp
*** varargs.exp 1999/06/25 23:58:09 1.4
--- varargs.exp 2000/10/16 23:35:13
*************** send_gdb "set print sevenbit-strings\n"
*** 69,74 ****
--- 69,78 ----
send_gdb "set print address off\n" ; gdb_expect -re "$gdb_prompt $"
send_gdb "set width 0\n" ; gdb_expect -re "$gdb_prompt $"
+ if [gdb_skip_stdio_test "varargs.exp"] {
+ # Nothing in this module is testable without printf.
+ return;
+ }
if ![runto_main] then {
perror "couldn't run to breakpoint"
Index: ending-run.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/ending-run.exp,v
retrieving revision 1.11
diff -c -3 -p -r1.11 ending-run.exp
*** ending-run.exp 2000/05/01 04:46:49 1.11
--- ending-run.exp 2000/10/16 23:35:13
*************** gdb_expect {
*** 129,135 ****
# is output from the program.
#
gdb_test "cont" ".*Breakpoint.*31.*"
! gdb_test "next" ".*1 2 7 14 23 34 47 62 79 Goodbye!.*32.*" "Step to return"
set old_timeout $timeout
set timeout 50
--- 129,141 ----
# is output from the program.
#
gdb_test "cont" ".*Breakpoint.*31.*"
!
! if ![gdb_skip_stdio_test "Step to return"] {
! gdb_test "next" ".*1 2 7 14 23 34 47 62 79 Goodbye!.*32.*" \
! "Step to return"
! } else {
! gdb_test "next" "" ""
! }
set old_timeout $timeout
set timeout 50
Index: shlib-call.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/shlib-call.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 shlib-call.exp
*** shlib-call.exp 1999/11/03 16:32:43 1.4
--- shlib-call.exp 2000/10/16 23:35:13
*************** gdb_expect {
*** 139,152 ****
#step -over
! send_gdb "next\n"
! gdb_expect {
! -re ".*address of sgs is $hex.*g = shr2\\(g\\).*$gdb_prompt $" {
! pass "next over shr1" }
! -re ".*$gdb_prompt $" { fail "next over shr1" }
! timeout { fail "next over shr1 (timeout)" }
! }
#print g
send_gdb "print g\n"
gdb_expect {
--- 139,158 ----
#step -over
! if ![gdb_skip_stdio_test "next over shr1"] {
! send_gdb "next\n"
! gdb_expect {
! -re ".*address of sgs is $hex.*g = shr2\\(g\\).*$gdb_prompt $" {
! pass "next over shr1"
! }
! -re ".*$gdb_prompt $" { fail "next over shr1" }
! timeout { fail "next over shr1 (timeout)" }
! }
! } else {
! gdb_test "next" "" ""
! }
+
#print g
send_gdb "print g\n"
gdb_expect {
*************** gdb_expect {
*** 157,177 ****
}
#print shr1(1)
! send_gdb "print shr1(1)\n"
! gdb_expect {
! -re ".*address of sgs is $hex.*\[0-9\]* = 2.*$gdb_prompt $" {
! pass "print shr1(1)" }
! -re ".*$gdb_prompt $" { fail "print shr1(1)" }
! timeout { fail "(timeout) print shr1(1)" }
}
#print shr1(g)
! send_gdb "print shr1(g)\n"
! gdb_expect {
! -re ".*address of sgs is $hex.*\[0-9\]* = 4.*$gdb_prompt $" {
! pass "print shr1(g)" }
! -re ".*$gdb_prompt $" { fail "print shr1(g)" }
! timeout { fail "(timeout) print shr1(g)" }
}
#break shr2
--- 163,189 ----
}
#print shr1(1)
! if ![gdb_skip_stdio_test "print shr1(1)"] {
! send_gdb "print shr1(1)\n"
! gdb_expect {
! -re ".*address of sgs is $hex.*\[0-9\]* = 2.*$gdb_prompt $" {
! pass "print shr1(1)"
! }
! -re ".*$gdb_prompt $" { fail "print shr1(1)" }
! timeout { fail "(timeout) print shr1(1)" }
! }
}
#print shr1(g)
! if ![gdb_skip_stdio_test "print shr1(g)"] {
! send_gdb "print shr1(g)\n"
! gdb_expect {
! -re ".*address of sgs is $hex.*\[0-9\]* = 4.*$gdb_prompt $" {
! pass "print shr1(g)"
! }
! -re ".*$gdb_prompt $" { fail "print shr1(g)" }
! timeout { fail "(timeout) print shr1(g)" }
! }
}
#break shr2
*************** gdb_test "break shr2" \
*** 180,198 ****
"Breakpoint.*file.*shr2.c, line.*" \
"breakpoint function shr2"
! gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, shr2 \\(.*\\) at.*shr2\\.c:7.*7.*return 2.x;" \
! "run until breakpoint set at a function"
#print shr1(1)
! send_gdb "print shr1(1)\n"
! gdb_expect {
! -re ".*address of sgs is $hex.*\[0-9\]* = 2.*$gdb_prompt $" {
! pass "print shr1(1)"
! }
! -re ".*$gdb_prompt $" { fail "print shr1(1)" }
! timeout { fail "(timeout) print shr1(1)" }
! }
#print mainshr1(1)
send_gdb "print mainshr1(1)\n"
--- 192,213 ----
"Breakpoint.*file.*shr2.c, line.*" \
"breakpoint function shr2"
! gdb_test "continue" \
! "Continuing\\..*Breakpoint \[0-9\]+, shr2 \\(.*\\) at.*shr2\\.c:7.*7.*return 2.x;" \
! "run until breakpoint set at a function"
#print shr1(1)
! if ![gdb_skip_stdio_test "print shr1(1) 2nd time"] {
! send_gdb "print shr1(1)\n"
! gdb_expect {
! -re ".*address of sgs is $hex.*\[0-9\]* = 2.*$gdb_prompt $" {
! pass "print shr1(1) 2nd time"
! }
! -re ".*$gdb_prompt $" { fail "print shr1(1) 2nd time" }
! timeout { fail "(timeout) print shr1(1) 2nd time" }
! }
! }
#print mainshr1(1)
send_gdb "print mainshr1(1)\n"