Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/testsuite] Increase expect buffer size (related to GPLv3)
Date: Thu, 23 Aug 2007 19:55:00 -0000	[thread overview]
Message-ID: <20070823195624.GC6056@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

Hello,

After switching "info copying/warranty" to GPLv3, the testsuite showed
one regression (expected), and two ERRORs because of expect buffer
overflow. The overflow comes from the fact that the GPLv3 terms are
much longer than the terms in GPLv2.

I think the attached patch is the appropriate change, but perhaps
there is a way to change the buffer size locally for the test or
the testcase, instead of expanding it globally for all testcases.
I really don't think that growing the buffer to 30kb (from 20kb)
is a big deal, but perhaps it has some effects that I haven't noticed
(like performance hits)... Hence the RFA rather than committing it
using the obvious rule.

2007-08-23  Joel Brobecker  <brobecker@adacore.com>

        * lib/gdb.exp (default_gdb_init): Increase expect buffer size
        to 30000 (from 20000).

Tested on x86-linux. No regression.
OK to apply?

Thanks,
-- 
Joel

[-- Attachment #2: lib-gdb.diff --]
[-- Type: text/plain, Size: 945 bytes --]

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.85
diff -u -p -r1.85 gdb.exp
--- lib/gdb.exp	23 Aug 2007 18:14:19 -0000	1.85
+++ lib/gdb.exp	23 Aug 2007 19:51:59 -0000
@@ -2085,9 +2085,10 @@ proc default_gdb_init { args } {
     # with the appropriate multilib option.
     set gdb_wrapper_initialized 0
     
-    # Uh, this is lame. Really, really, really lame. But there's this *one*
-    # testcase that will fail in random places if we don't increase this.
-    match_max -d 20000
+    # Unlike most tests, we have a small number of tests that generate
+    # a very large amount of output.  We therefore increase the expect
+    # buffer size to be able to contain the entire test output.
+    match_max -d 30000
 
     # We want to add the name of the TCL testcase to the PASS/FAIL messages.
     if { [llength $args] > 0 } {

             reply	other threads:[~2007-08-23 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23 19:55 Joel Brobecker [this message]
2007-08-23 20:08 ` Daniel Jacobowitz
2007-08-23 20:12   ` 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=20070823195624.GC6056@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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