Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Wiederhake, Tim" <tim.wiederhake@intel.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"palves@redhat.com" <palves@redhat.com>,
	"Metzger, Markus T"	<markus.t.metzger@intel.com>
Subject: RE: [PATCH 6/7] python: Add tests for record Python bindings
Date: Fri, 28 Oct 2016 13:49:00 -0000	[thread overview]
Message-ID: <9676A094AF46E14E8265E7A3F4CCE9AF90C979@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <a14406cc50e97665c450bf04219f85be@polymtl.ca>

Hi Simon,

Thanks for the comments!

> -----Original Message-----
> From: Simon Marchi [mailto:simon.marchi@polymtl.ca]
> Sent: Thursday, October 27, 2016 6:00 PM
> To: Wiederhake, Tim <tim.wiederhake@intel.com>
> Cc: gdb-patches@sourceware.org; palves@redhat.com; Metzger, Markus T
> <markus.t.metzger@intel.com>
> Subject: Re: [PATCH 6/7] python: Add tests for record Python bindings
> 
> On 2016-10-27 02:28, Tim Wiederhake wrote:
> > +# Skip this test if btrace is disabled.
> > +
> > +if { [skip_btrace_tests] } { return -1 }
> 
> Would it be helpful to have at least some minimal tests using the "full"
> method, even if btrace is not available?

If you are recording using the "full" method and try to access the data from Python, you get a not-yet-implemented exception. All we can test in this case is that the recording method in the gdb.Record object is displayed properly, i.e. gdb.current_recording().method == "full". I could rename py-record.exp to py-record-btrace.exp and add a py-record-full.exp with that exact test in it, but I don't see too much value in that. Your opinion?

> > +with_test_prefix "no or double record" {
> > +    gdb_test "python print(gdb.current_recording())" "None"
> > +
> > +    gdb_test_no_output "python gdb.start_recording()"
> > +    gdb_test "python gdb.start_recording(\"full\")" ".*gdb\.error:
> > The process is already being recorded\..*"
> > +
> > +    gdb_test_no_output "python gdb.stop_recording()"
> > +    gdb_test "python gdb.stop_recording()" ".*gdb\.error: No record
> > target is currently active\..*"
> 
> These last two tests give the same test name (which must be unique).
> You could give a specific name to one of them.

Tim
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


  reply	other threads:[~2016-10-28 13:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27  6:29 [PATCH 0/7] Python bindings for btrace recordings Tim Wiederhake
2016-10-27  6:29 ` [PATCH 7/7] Add documentation for new instruction record Python bindings Tim Wiederhake
2016-10-27 15:02   ` Eli Zaretskii
2016-10-27 16:10   ` Simon Marchi
2016-10-27  6:29 ` [PATCH 2/7] btrace: Export btrace_decode_error function Tim Wiederhake
2016-10-27  6:29 ` [PATCH 4/7] python: Create Python bindings for record history Tim Wiederhake
2016-10-27 15:53   ` Simon Marchi
2016-10-28 14:12     ` Wiederhake, Tim
2016-10-27  6:29 ` [PATCH 5/7] python: Implement btrace " Tim Wiederhake
2016-10-27  6:29 ` [PATCH 1/7] btrace: Count gaps as one instruction explicitly Tim Wiederhake
2016-10-27  6:29 ` [PATCH 6/7] python: Add tests for record Python bindings Tim Wiederhake
2016-10-27 15:59   ` Simon Marchi
2016-10-28 13:49     ` Wiederhake, Tim [this message]
2016-10-28 17:47       ` Simon Marchi
2016-10-27  6:29 ` [PATCH 3/7] btrace: Use binary search to find instruction Tim Wiederhake
2016-10-27 14:28   ` Simon Marchi
2016-11-02 10:01     ` Wiederhake, Tim
2016-11-02 11:24       ` Simon Marchi

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=9676A094AF46E14E8265E7A3F4CCE9AF90C979@irsmsx105.ger.corp.intel.com \
    --to=tim.wiederhake@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    /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