This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/2] CTF Testing Changes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]