From: Carlos O'Donell <carlos@redhat.com>
To: kevinb@redhat.com,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 4/4] mi-sym-info.exp: Increase timeout for 114-symbol-info-functions
Date: Fri, 11 Jun 2021 12:35:48 -0400 [thread overview]
Message-ID: <ebfa1f16-cb8c-0b77-4a0e-4f01bfaa85cc@redhat.com> (raw)
> Loading libc.so's symbols increased the amount of time needed for
> 114-symbol-info-function to fetch symbols, causing a timeout during my
> testing. I enclosed the entire block with a "with_timeout_factor 4",
> which fixes the problem for me. (Using 2 also fixed it for me, but it
> might not be enough when running this test on slower machines.)
Looks good to me.
Tested on x86_64 Fedora Rawhide with new glibc.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
> gdb/testsuite/ChangeLog:
>
> * gdb.mi/mi-sym-info.exp (114-symbol-info-function test): Increase
> timeout.
> ---
> gdb/testsuite/gdb.mi/mi-sym-info.exp | 56 ++++++++++++++--------------
> 1 file changed, 29 insertions(+), 27 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp
> index 18f85182a7b..dcd6f7d9187 100644
> --- a/gdb/testsuite/gdb.mi/mi-sym-info.exp
> +++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp
> @@ -123,33 +123,35 @@ gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" {
> # (from the symbol table). There's often so much output output from
> # this command that we overflow expect's buffers, avoid this by
> # fetching the output piece by piece.
> -set testname "List all functions"
> -set cmd "114-symbol-info-functions --include-nondebug"
> -set state 0
> -gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" {
> - -re "114\\^done,symbols=\{" {
> - if { $state == 0 } { set state 1 }
> - exp_continue
> - }
> - -re "debug=\\\[${symtab_re}" {
> - if { $state == 1 } { set state 2 }
> - exp_continue
> - }
> - -re ",${symtab_re}" {
> - exp_continue
> - }
> - -re "\\\],nondebug=\\\[" {
> - if { $state == 2 } { set state 3 }
> - exp_continue
> - }
> - -re "\{address=${qstr},name=${qstr}\}," {
> - exp_continue
> - }
> - -re "\{address=${qstr},name=${qstr}\}\\\]\}\r\n${mi_gdb_prompt}$" {
> - if { $state == 3 } {
> - pass $gdb_test_name
> - } else {
> - fail $gdb_test_name
> +with_timeout_factor 4 {
> + set testname "List all functions"
> + set cmd "114-symbol-info-functions --include-nondebug"
> + set state 0
> + gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" {
> + -re "114\\^done,symbols=\{" {
> + if { $state == 0 } { set state 1 }
> + exp_continue
> + }
> + -re "debug=\\\[${symtab_re}" {
> + if { $state == 1 } { set state 2 }
> + exp_continue
> + }
> + -re ",${symtab_re}" {
> + exp_continue
> + }
> + -re "\\\],nondebug=\\\[" {
> + if { $state == 2 } { set state 3 }
> + exp_continue
> + }
> + -re "\{address=${qstr},name=${qstr}\}," {
> + exp_continue
> + }
> + -re "\{address=${qstr},name=${qstr}\}\\\]\}\r\n${mi_gdb_prompt}$" {
> + if { $state == 3 } {
> + pass $gdb_test_name
> + } else {
> + fail $gdb_test_name
> + }
OK. Confirmed this is the same code just indented with a higher timeout factor.
> }
> }
> }
> --
> 2.31.1
--
Cheers,
Carlos.
next reply other threads:[~2021-06-11 16:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 16:35 Carlos O'Donell [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-10 17:26 [PATCH 0/4] libthread_db initialization changes related to upcoming glibc-2.34 Kevin Buettner
2021-06-10 17:26 ` [PATCH 4/4] mi-sym-info.exp: Increase timeout for 114-symbol-info-functions Kevin Buettner
2021-06-11 20:11 ` Simon Marchi
2021-06-11 21:07 ` Kevin Buettner
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=ebfa1f16-cb8c-0b77-4a0e-4f01bfaa85cc@redhat.com \
--to=carlos@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).