Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/testsuite] Workaround timeout in default.exp
Date: Fri, 21 May 2004 06:58:00 -0000	[thread overview]
Message-ID: <vt21xlejmnh.fsf@zenia.home> (raw)
In-Reply-To: <20040521014335.GI10684@gnat.com>

Darn.  This discussion sounded familiar; it turns out I had a patch
for this written back in 2002 that I guess I never submitted.  Here it
is, adapted for the current sources; default.exp runs on AIX with this
patch.

(Your solution seems simpler.)

Sun Feb  3 19:52:31 2002  Jim Blandy  <jimb@seadog.cygnus.com>

	* gdb.base/default.exp: Distinguish the GDB prompt as it appears
	in "info set" and "show" output from the true prompt.

Index: gdb/testsuite/gdb.base/default.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/default.exp,v
retrieving revision 1.17
diff -c -p -r1.17 default.exp
*** gdb/testsuite/gdb.base/default.exp	20 Mar 2003 14:45:50 -0000	1.17
--- gdb/testsuite/gdb.base/default.exp	21 May 2004 06:48:57 -0000
*************** gdb_test "info s" "No stack." "info stac
*** 335,343 ****
  gdb_test "info stack" "No stack." "info stack"
  #test info set
  # FIXME -- needs to match the entire output
! # FIXME -- on native solaris 2.8, this test fails due to this line:
! #  prompt:  Gdb's prompt is "(gdb) ".^M
! gdb_test "info set" "confirm:  Whether to confirm potentially dangerous operations is o\[a-z\]*.(\[^\r\n\]*\[\r\n\])+history filename:  The filename in which to record the command history is (\[^\r\n\]*\[\r\n\])+listsize:  Number of source lines gdb will list by default is 10.*" "info set"
  gdb_test "info symbol" "Argument required .address.."
  #test info source
  gdb_test  "info source" "No current source file..*" "info source"
--- 335,373 ----
  gdb_test "info stack" "No stack." "info stack"
  #test info set
  # FIXME -- needs to match the entire output
! send_gdb "info set\n"
! set seen_confirm 0
! set seen_history 0
! set seen_prompt 0
! set seen_listsize 0
! gdb_expect {
!     -re ".*confirm:  Whether to confirm potentially dangerous operations is" {
! 	set seen_confirm 1
! 	exp_continue
!     }
!     -re ".*history filename:  The filename in which to record the command history is" {
! 	set seen_history 1
! 	exp_continue
!     }
!     -re ".*listsize:  Number of source lines gdb will list by default is 10" {
! 	set seen_listsize 1
! 	exp_continue
!     }
!     -re ".*prompt:  Gdb's prompt is \"${gdb_prompt}" {
! 	set seen_prompt 1
! 	exp_continue
!     }
!     -re ".*\[\r\n\]+${gdb_prompt} $" {
!     }
!     timeout {
! 	fail "info set (timeout)"
!     }
! }
! if {$seen_confirm && $seen_history && $seen_prompt && $seen_listsize} {
!     pass "info set"
! } else {
!     fail "info set"
! }
  gdb_test "info symbol" "Argument required .address.."
  #test info source
  gdb_test  "info source" "No current source file..*" "info source"
*************** gdb_test "show width" "Number of charact
*** 674,680 ****
  # This is only supported on targets which use exec.o.
  gdb_test "show write" "Writing into executable and core files is o.*" "show write"
  #test show
! gdb_test "show" "confirm:  *Whether to confirm potentially dangerous operations is on.(\[^\r\n\]*\[\r\n\])+history filename:  *The filename in which to record the command history is (\[^\r\n\]*\[\r\n\])+history save:  *Saving of the history record on exit is on.(\[^\r\n\]*\[\r\n\])+history size:  *The size of the command history is(\[^\r\n\]*\[\r\n\])+listsize:  *Number of source lines gdb will list by default is 10(\[^\r\n]*\[\r\n\])+print elements:  *Limit on string chars or array elements to print is 200..*" "show"
  #test stepi "si" abbreviation
  gdb_test  "si" "The program is not being run." "stepi \"si\" abbreviation"
  #test stepi
--- 704,758 ----
  # This is only supported on targets which use exec.o.
  gdb_test "show write" "Writing into executable and core files is o.*" "show write"
  #test show
! send_gdb "show\n"
! set seen_confirm 0
! set seen_history_filename 0
! set seen_history_save 0
! set seen_history_size 0
! set seen_listsize 0
! set seen_print_elements 0
! set seen_prompt 0
! gdb_expect {
!     -re ".*confirm:  *Whether to confirm potentially dangerous operations is" {
! 	set seen_confirm 1
! 	exp_continue
!     }
!     -re ".*history filename:  *The filename in which to record the command" {
! 	set seen_history_filename 1
! 	exp_continue
!     }
!     -re ".*history save:  *Saving of the history record on exit is" {
! 	set seen_history_save 1
! 	exp_continue
!     }
!     -re ".*history size:  *The size of the command history is" {
! 	set seen_history_size 1
! 	exp_continue
!     }
!     -re ".*listsize:  *Number of source lines gdb will list by default is" {
! 	set seen_listsize 1
! 	exp_continue
!     }
!     -re ".*print elements:  *Limit on string chars or array elements to" {
! 	set seen_print_elements 1
! 	exp_continue
!     }
!     -re "prompt:  Gdb's prompt is \"${gdb_prompt}" {
! 	set seen_prompt 1
! 	exp_continue
!     }
!     -re ".*\[\r\n\]+${gdb_prompt} $" {
!     }
!     timeout {
! 	fail "show (timeout)"
!     }
! }
! if {$seen_confirm && $seen_history_filename && $seen_history_save && $seen_history_size && $seen_listsize && $seen_print_elements && $seen_prompt} {
!     pass "show"
! } else {
!     fail "show"
! }
! 
  #test stepi "si" abbreviation
  gdb_test  "si" "The program is not being run." "stepi \"si\" abbreviation"
  #test stepi



  reply	other threads:[~2004-05-21  6:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-18 21:01 Joel Brobecker
2004-05-18 21:42 ` Daniel Jacobowitz
2004-05-20  1:48   ` Joel Brobecker
2004-05-20  2:27     ` Daniel Jacobowitz
2004-05-21  1:14       ` Joel Brobecker
2004-05-21  1:31         ` Daniel Jacobowitz
2004-05-21  1:43           ` Joel Brobecker
2004-05-21  6:58             ` Jim Blandy [this message]
2004-05-21 16:10               ` Joel Brobecker
     [not found]           ` <20040521160554.GK10684@gnat.com>
2004-05-21 16:36             ` Daniel Jacobowitz
2004-05-21 17:28               ` Joel Brobecker

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=vt21xlejmnh.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=brobecker@gnat.com \
    --cc=gdb-patches@sources.redhat.com \
    /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