public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Alan Hayward <Alan.Hayward@arm.com>
To: Tom Tromey <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	nd <nd@arm.com>
Subject: Re: [PATCH] testsuite: Record all gdb input to gdb.in
Date: Tue, 30 Apr 2019 18:02:00 -0000	[thread overview]
Message-ID: <EC6F6634-57F8-4D2B-B979-D90963347984@arm.com> (raw)
In-Reply-To: <87muk7353g.fsf@tromey.com>



> On 30 Apr 2019, at 16:06, Tom Tromey <tom@tromey.com> wrote:
> 
>>>>>> "Alan" == Alan Hayward <Alan.Hayward@arm.com> writes:
> 
> Alan> Once a test has been run, the .in file can be used to re-run the test in the
> Alan> following way:
> 
> Alan>   gdb -x outputs/gdb.store/gdb.in outputs/gdb.store/store
> 
> Alan> Note, this functionality is ALWAYS on when running a test.  I considered this
> Alan> would be more useful than making it optional.
> 
> I think it probably makes sense to delete the existing TRANSCRIPT code
> when doing this.

Ok. I hadn’t realised this was more or less doing the same thing. 

> 
> Alan> +      # First time opening.
> Alan> +      set in_file_count 0
> Alan> +      set logfile [standard_output_file gdb.in]
> 
> Does anything ever reset in_file_count?
> Or if you run a bunch of test cases, will the number just keep incrementing?

I was running -j55, which was wide enough to ensure most things were starting
fresh at 0.  I’ll add something to fix this up.

> 
> Alan> +    switch -regexp -- $type {
> 
> Why -regexp?

I’ll remove.

> 
> Alan> +    #Write to the log
> 
> Space after the "#”.

Ok.

> 
> Alan> +    puts -nonewline $in_file "$message"
> 
> It may be good for this code to catch errors, not sure though.

Not sure if you mean test case errors or file write errors.
If the former, my motivation was so that the .in file could be used with
“gdb -x gdb.in”. Anything that’s not a command will break this.

I’ve been working on some additional stuff today, including gdbserver 
replaylog and a script to easily re-run tests using the .in file and/or
replay.  I’ll throw the update to this together with that as a new series
(might not be until next week as I’ve got some vacation).

Thanks for the review.


Alan.



  reply	other threads:[~2019-04-30 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 16:08 Alan Hayward
2019-04-30 15:06 ` Tom Tromey
2019-04-30 18:02   ` Alan Hayward [this message]
2019-05-01 14:20     ` 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=EC6F6634-57F8-4D2B-B979-D90963347984@arm.com \
    --to=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.com \
    --cc=tom@tromey.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).