[v2,00/79] Rewrite "require" test procedure and use it more often

Message ID 20230112030052.3306113-1-tom@tromey.com
Headers
Series Rewrite "require" test procedure and use it more often |

Message

Tom Tromey Jan. 12, 2023, 2:59 a.m. UTC
  Here's v2 of the series to change "require".

v1 was here:

    https://sourceware.org/pipermail/gdb-patches/2022-December/194843.html

... with some reviews in January.

This version addresses the "double negative" issue by renaming all
"skip_" procs that are used in "require" to be "allow_" procs instead.

While doing this, I tackled a couple other minor things.

I changed the checks for Python and Guile to check the output of "gdb
--configuration".  This lets these checks be done without a running
gdb, which IMO is a nicer way for them to work.  Then I added --config
output so that this same change could be done for the TUI.

I found one minor bug while working on this -- a hidden dependency,
see patch 49.

Regression tested on x86-64 Fedora 36.  This is the sort of patch that
has to be regression tested after each rebase, because other patches
may introduce new uses of the removed procs.  Also it perhaps should
be tested on other platforms.

While working on this, I got annoyed by load_lib being needed
everywhere.  I have another patch to introduce the use of Tcl
autoloading, but this proves to be tricky due to the code that saves
and restores global variables.  It can be done -- and I think it's
worth doing -- but this series is already too long.

Tom
  

Comments

Kevin Buettner Jan. 12, 2023, 4:45 a.m. UTC | #1
I've looked at each patch in this series, but only skimmed the ones
with obviously mechanical changes.  I did look more closely at the
parts  (in later patches) which changed testsuite/lib/gdb.exp.

In addition to the nits that I found regarding the "Use require skip_..."
commits, the same nits apply to the "Use require use_gdb_stub" and
"Use require gdb_debug_enable" commits.  E.g. for the "Use require
use_gdb_stub" commit, the message says:

    This changes some tests to use "require use_gdb_stub".

...but the actual require statements are all of the form:

    require !use_gdb_stub

I like the use of "gdb --configuration" for determining whether GDB
has certain features (e.g. tui, guile, python).

Aside from the nits mentioned above, LGTM.

Kevin
  
Tom Tromey Jan. 13, 2023, 3:51 a.m. UTC | #2
>>>>> "Kevin" == Kevin Buettner <kevinb@redhat.com> writes:

Kevin> In addition to the nits that I found regarding the "Use require skip_..."
Kevin> commits, the same nits apply to the "Use require use_gdb_stub" and
Kevin> "Use require gdb_debug_enable" commits.

I fixed up all these commit messages.
I'll push it sometime soon.

Tom
  
Tom Tromey Jan. 13, 2023, 8:18 p.m. UTC | #3
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> Regression tested on x86-64 Fedora 36.  This is the sort of patch that
Tom> has to be regression tested after each rebase, because other patches
Tom> may introduce new uses of the removed procs.  Also it perhaps should
Tom> be tested on other platforms.

I dropped the final patch, rebased this, and re-regression tested it.
I'm checking it in now.

thanks,
Tom