From dbdfa66c308b3f598bc5d68e63a2068bf8fb844e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 9 Feb 2005 16:45:39 +0000 Subject: [PATCH] * maint.exp: Raise timeout to give Cygwin targeted GDBs more time for printing symbols and statistics. Add test for using relative pathnames in "maint print msymbols" test. Mark "maint info sections DATA" XFAIL on Cygwin. Remove Cygwin XFAIL mark on "help maint dump-me" and "maint dump-me" tests. --- gdb/testsuite/ChangeLog | 9 +++++++ gdb/testsuite/gdb.base/maint.exp | 54 ++++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a66e058..67ea171 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2005-02-09 Corinna Vinschen + + * maint.exp: Raise timeout to give Cygwin targeted GDBs more time + for printing symbols and statistics. + Add test for using relative pathnames in "maint print msymbols" test. + Mark "maint info sections DATA" XFAIL on Cygwin. + Remove Cygwin XFAIL mark on "help maint dump-me" and "maint dump-me" + tests. + 2005-02-09 Andreas Schwab Committed by Andrew Cagney diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 53d5825..679f90f 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -187,6 +187,13 @@ gdb_expect { timeout { fail "(timeout) maint demangle" } } +# The timeout value is raised, because printing all the symbols and +# statistical information about Cygwin and Windows libraries takes a lot +# of time. +if [istarget "*-*-cygwin*"] { + set oldtimeout $timeout + set timeout [expr $timeout + 500] +} send_gdb "maint print statistics\n" gdb_expect { @@ -316,6 +323,42 @@ gdb_expect { timeout { fail "(timeout) maint print msymbols" } } +# Check that maint print msymbols allows relative pathnames +set mydir [pwd] +gdb_test "cd ${objdir}" "Working directory ${objdir}\..*" +gdb_test_multiple "maint print msymbols msymbols_output2 ${subdir}/${testfile}" "maint print msymbols" { + -re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" { + gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" { + -re "msymbols_output2\r\n$gdb_prompt $" { + gdb_test_multiple "shell grep factorial msymbols_output2" "maint print msymbols" { + -re "\\\[ *$decimal\\\] T\[ \t\]+$hex factorial.*$gdb_prompt $" { + pass "maint print msymbols" + } + -re ".*$gdb_prompt $" { + fail "maint print msymbols" + } + timeout { + fail "(timeout) maint print msymbols" + } + } + gdb_test "shell rm -f msymbols_output2" "" + } + -re ".*$gdb_prompt $" { + fail "maint print msymbols" + } + timeout { + fail "(timeout) maint print msymbols" + } + } + } + -re ".*$gdb_prompt $" { + fail "maint print msymbols" + } + timeout { + fail "(timeout) maint print msymbols" + } +} +gdb_test "cd ${mydir}" "Working directory ${mydir}\..*" send_gdb "maint print symbols\n" gdb_expect { @@ -421,6 +464,10 @@ gdb_expect { # Test for new option: DATA section flag # If your text section is tagged DATA, xfail this test. +# +# The "maint info sections DATA" test is marked for XFAIL on Cygwin, +# because Windows has text sections marked DATA. +setup_xfail "*-*-*cygwin*" send_gdb "maint info sections DATA\n" gdb_expect { -re ".* .text .*$gdb_prompt $" { fail "maint info sections DATA" } @@ -511,10 +558,6 @@ gdb_expect { timeout { fail "(timeout) help maint demangle" } } -# dump-me is disabled ifdef _WIN32. -if [ishost *cygwin*] { - setup_xfail "*-*-*" -} send_gdb "help maint dump-me\n" gdb_expect { -re "Get fatal error; make debugger dump its core\\.\r\nGDB sets its handling of SIGQUIT back to SIG_DFL and then sends\r\nitself a SIGQUIT signal\\..*$gdb_prompt $"\ @@ -652,9 +695,6 @@ gdb_expect { #set oldtimeout $timeout #set timeout [expr $timeout + 300] -if [ishost *cygwin*] { - setup_xfail "*-*-*" -} send_gdb "maint dump-me\n" gdb_expect { -re "Should GDB dump core.*\\(y or n\\) $"\ -- 2.7.4