public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] CTF Testing Changes
@ 2019-10-08  9:39 Andrew Burgess
  2019-10-08  9:39 ` [PATCH 1/2] gdb/testsuite: Introduce compiler_supports_ctf_debug guard function Andrew Burgess
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Burgess @ 2019-10-08  9:39 UTC (permalink / raw)
  To: gdb-patches; +Cc: Weimin Pan, Simon Marchi, Andrew Burgess

I was taking a look through the CTF testing and I think the following
patches would be a nice clean up.

The first adds a `compiler_supports_ctf_debug` guard function, so we
don't try to run the ctf test scripts when the compiler doesn't
support ctf debug format.  This seems to be inline with how most of
our other big features are guarded.

My second thought was that the 4 CTF tests added are all pretty much
copies of existing non-ctf tests.  I think these tests would be better
done as variations of the original test scripts rather than making
copies.  The second patch makes a start on this, deleting
ctf-cvexpr.exp and extending cvexpr.exp to cover the same cases[1].

The remaining 3 tests require a little more work as the original C
files were changed slightly, so I've not addressed these yet, but will
try to find time to look at these soon.

A final note, and something I don't have an immediate plan to address,
but Weimin might want to consider, is that we could do with a test for
CTF that doesn't rely on having a CTF compiler around, even if it is
just a very basic test.  It should be possible (I think) to create
such a test by placing the raw CTF output into a .S file, and then
linking against a .c file compiled without debug.  I think some of the
tests in gdb.arch/ are done like this.

[1] The original ctf-cvexpr.exp file didn't actually test ctf at all,
    but just compiled with the standard -g compiler flag, resulting in
    (probably) DWARF debug output.  I'm assuming this is a mistake,
    which I've fixed in this patch.

--

Andrew Burgess (2):
  gdb/testsuite: Introduce compiler_supports_ctf_debug guard function
  gdb/testsuite: Merge cvexpr.exp and ctf-cvexpr.exp

 gdb/testsuite/ChangeLog                  |  13 +
 gdb/testsuite/gdb.base/ctf-constvars.exp |  20 +-
 gdb/testsuite/gdb.base/ctf-cvexpr.exp    | 495 -------------------------------
 gdb/testsuite/gdb.base/ctf-ptype.exp     |  10 +-
 gdb/testsuite/gdb.base/ctf-whatis.exp    |  10 +-
 gdb/testsuite/gdb.base/cvexpr.exp        | 466 +++++++++++++++--------------
 gdb/testsuite/lib/gdb.exp                |  11 +
 7 files changed, 287 insertions(+), 738 deletions(-)
 delete mode 100644 gdb/testsuite/gdb.base/ctf-cvexpr.exp

-- 
2.14.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-08 21:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08  9:39 [PATCH 0/2] CTF Testing Changes Andrew Burgess
2019-10-08  9:39 ` [PATCH 1/2] gdb/testsuite: Introduce compiler_supports_ctf_debug guard function Andrew Burgess
2019-10-08  9:39 ` [PATCH 2/2] gdb/testsuite: Merge cvexpr.exp and ctf-cvexpr.exp Andrew Burgess
2019-10-08 21:04 ` [PATCH 0/2] CTF Testing Changes Weimin Pan

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).