Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Don't abort testrun for invalid command in test-case
Date: Fri, 12 Jun 2020 00:55:57 +0200	[thread overview]
Message-ID: <ebf25c3c-3fc4-d2ba-67e9-55581f18f840@suse.de> (raw)
In-Reply-To: <dea158ce-9ed2-fb01-9fdc-9b3171a77683@redhat.com>

On 11-06-2020 18:56, Pedro Alves wrote:
>> I don't think it's cleaner, because we run default_gdb_init, as well the
>> bit of proc runtest between ${tool}_init a ${tool}_finish with the
>> altered ::unknown.
> Well, that is code that is exercised by all testscases, it's part of the
> framework.  It's not going to ever contain calls to procedures that
> don't exist that go unnoticed for long.  The whole testsuite would
> collapse.  We can move the overriding until after default_gdb_init
> is called, even, so that even less code runs under gdb's "unknown":
> 
>     set res [default_gdb_init $test_file_name]
> 
>     # Skip dejagnu_unknown while running a testcase to prevent it from
>     # exiting and aborting the entire test run.  Save the unknown proc
>     # defined by DejaGnu, and override the unknown proc with a
>     # gdb-local version.
>     rename ::unknown ::dejagnu_unknown
>     proc unknown { args } {
> 	return [uplevel 1 ::tcl_unknown $args]
>     }
> 
>     return $res
>   }
> 

Hmm, what is the distinction between gdb_init and default_gdb_init?

All the other uses in gdb.exp of pattern foo/default_foo have an
implementation:
...
proc foo {} {
  [default_foo]
}
...
but gdb_init is much more than that. Why is that different?

The code introducing default_gdb_init mentions that gdb_init can be
overridden.  If so, then the unknown override won't be active. Or should
all gdb_init overrides copy this code?

Thanks,
- Tom


  reply	other threads:[~2020-06-11 22:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 14:35 Tom de Vries
2020-06-11 15:31 ` Pedro Alves
2020-06-11 16:25   ` Tom de Vries
2020-06-11 16:56     ` Pedro Alves
2020-06-11 22:55       ` Tom de Vries [this message]
2020-06-16 12:47         ` Pedro Alves
2020-06-17 14:14           ` Tom de Vries
2020-06-17 14:19             ` Pedro Alves
2020-06-18 10:16               ` [PATCH][gdb/testsuite] Move code from gdb_init to default_gdb_init Tom de Vries
2020-06-18 10:56                 ` Pedro Alves
2020-06-12  7:47       ` [PATCH][gdb/testsuite] Don't abort testrun for invalid command in test-case Tom de Vries
2020-06-12  8:37       ` Tom de Vries

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=ebf25c3c-3fc4-d2ba-67e9-55581f18f840@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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