From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA/testsuite] Reset the timeout duration at the start of each testcase.
Date: Fri, 05 Feb 2010 07:22:00 -0000 [thread overview]
Message-ID: <20100205072223.GB4335@adacore.com> (raw)
In-Reply-To: <20100204181621.GB27544@caradoc.them.org>
> > Just something that occured to me: What if I changed the implementation
> > to just store $timeout at the time gdb.exp is evaluated?
[...]
> Here's another trick that will make it less confusing about
> initialization order. How about we info exists to set
> default_test_timeout from gdb_init, if we haven't yet?
>
> I know I've worked with board files that loaded gdb.exp themselves.
In the end, I no longer think that this is such a good idea. I found
several issues, mostly related to the order in which various .exp files
are being loaded. The order is:
1. site.exp
2. various dejagnu .exp files. In my case:
Found /usr/share/dejagnu/site.exp
Loading /usr/share/dejagnu/utils.exp
Loading /usr/share/dejagnu/framework.exp
Loading /usr/share/dejagnu/debugger.exp
Loading /usr/share/dejagnu/remote.exp
Loading /usr/share/dejagnu/telnet.exp
Loading /usr/share/dejagnu/rlogin.exp
Loading /usr/share/dejagnu/kermit.exp
Loading /usr/share/dejagnu/tip.exp
Loading /usr/share/dejagnu/rsh.exp
Loading /usr/share/dejagnu/ftp.exp
Loading /usr/share/dejagnu/target.exp
Loading /usr/share/dejagnu/targetdb.exp
Loading /usr/share/dejagnu/libgloss.exp
3. [runtest.exp sets the timeout to 10]
4. target is unix =>
(a) dejagnu's unix.exp files
(b) gdb/testsuite/config/unix.exp
After that, it starts evaluating the testcases themselves.
This implies:
- Setting default_test_timeout from within gdb_init does not work,
because this function is called after runtest.exp has reset
the timeout back to 10 seconds (this is done after site.exp
is loaded).
- Also, even if we set the value of default_test_timeout earlier,
during lib/gdb.exp loading (as opposed to during the first call
to gdb_init), we still have another .exp file that resets the
timeout from under our site.exp: gdb/testsuite/config/unix.exp.
# Set a default timeout to be used for the tests under UNIX, rather than
# accepting whatever default dejagnu gives us (apparently 10 seconds).
# When running the tests over NFS, under somewhat heavy load, 10 seconds
# does not seem to be enough. Try starting with 60.
set timeout 60
verbose "Timeout is now $timeout seconds" 2
load_lib gdb.exp
I managed to make it work, by removing the set timeout in config/unix.exp.
But in the end, I think that's too fragile, and it also prevents us from
defining our own general timeout - let's say we don't like the default
timeout of 10 seconds and we want the default to be 30 seconds (I think
60s is way too much). With this second scheme, I couldn't see a way to do
that. For this to be possible, we'd need to have control over a .exp
file that gets sourced before site.exp. Of course, we could simply add
a line in the generated site.exp to set the GDB timeout default, but that
still leaves us with a fairly fragile scheme, IMO (and any breakage would
probably go unnoticed).
So I suggest we stay with the initial patch: A new global named
default_test_timeout that the user can set in site.exp.
--
Joel
next prev parent reply other threads:[~2010-02-05 7:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-28 21:53 RFC: Fix testsuite timeout clobbers Daniel Jacobowitz
2010-01-29 4:00 ` Joel Brobecker
2010-01-29 15:37 ` Daniel Jacobowitz
2010-02-04 6:08 ` [RFA/testsuite] Reset the timeout duration at the start of each testcase Joel Brobecker
2010-02-04 15:54 ` Tom Tromey
2010-02-04 16:00 ` Daniel Jacobowitz
2010-02-04 17:43 ` Joel Brobecker
2010-02-04 18:16 ` Daniel Jacobowitz
2010-02-05 7:22 ` Joel Brobecker [this message]
2010-02-05 17:33 ` Daniel Jacobowitz
2010-02-08 11:36 ` Joel Brobecker
2010-02-04 6:13 ` RFC: Fix testsuite timeout clobbers Joel Brobecker
2010-01-29 16:49 ` Tom Tromey
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=20100205072223.GB4335@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