public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/1] [gdb/testsuite] Run test-case with all host/target boards
Date: Mon,  3 Apr 2023 17:09:56 +0200	[thread overview]
Message-ID: <20230403150957.28921-1-tdevries@suse.de> (raw)

Directory gdb/testsuite/boards contains a number of host/target boards, which
run a test-case (or test-cases) in a different way.

The benefits of using these boards are:
- improving test coverage of gdb,
- making the testsuite more robust, and
- making sure the test-cases work for non-native and remote setups.

Each board is slightly different, and developers need to learn how to use each
one, what parameters to pass and how, which ones can be using in combination
with each other.  This is a threshold to start using them.

And then there quite a few, so typically only a few will be used by each
developer (I think).

This patch makes it possible to run a test-case with all the boards, using a
single invocation.  The script is designed as a make check drop-in
replacement (though in the strictest sense it's not, because it doesn't use
RUNTESTFLAGS).

An example make check use is:
...
$ cd build/gdb/testsuite
$ make check RUNTESTFLAGS=gdb.base/advance.exp
  ...
                 === gdb Summary ===

 # of expected passes            8
 gdb version  14.0.50.20230403-git -nw -nx -iex "set height 0" \
   -iex "set width 0" -data-directory ./build/gdb/data-directory
...

And an example of make-check-all.sh for the same test-case is:
...
 $  ~/gdb/src/gdb/contrib/make-check-all.sh gdb.base/advance.exp
 LOCAL:
 # of expected passes            8
 TARGET BOARD: cc-with-gdb-index
 # of expected passes            8
 TARGET BOARD: cc-with-debug-names
 # of expected passes            8
 TARGET BOARD: cc-with-dwz
 # of expected passes            8
 TARGET BOARD: cc-with-dwz-m
 # of expected passes            8
 TARGET BOARD: cc-with-gnu-debuglink
 # of expected passes            8
 TARGET BOARD: debug-types
 # of expected passes            8
 TARGET BOARD: dwarf4-gdb-index
 # of expected passes            8
 TARGET BOARD: dwarf64
 # of untested testcases         1
 TARGET BOARD: fission
 # of expected passes            8
 TARGET BOARD: fission-dwp
 # of expected passes            8
 TARGET BOARD: gold
 # of expected passes            8
 TARGET BOARD: gold-gdb-index
 # of expected passes            8
 TARGET BOARD: readnow
 # of expected passes            8
 TARGET BOARD: stabs
 # of expected passes            8
 TARGET BOARD: native-extended-gdbserver
 # of expected passes            8
 TARGET BOARD: native-gdbserver
 # of expected passes            8
 TARGET BOARD: native-stdio-gdbserver
 # of expected passes            8
 TARGET BOARD: remote-gdbserver-on-localhost
 # of expected passes            8
 TARGET BOARD: remote-stdio-gdbserver
 # of expected passes            8
 HOST BOARD: local-remote-host, TARGET BOARD: remote-gdbserver-on-localhost
 # of expected passes            8
 HOST BOARD: local-remote-host, TARGET BOARD: remote-stdio-gdbserver
 # of expected passes            8
 HOST BOARD: local-remote-host-notty, TARGET BOARD: remote-gdbserver-on-localhost
 # of expected passes            8
 HOST BOARD: local-remote-host-notty, TARGET BOARD: remote-stdio-gdbserver
 # of expected passes            8
 HOST/TARGET BOARD: local-remote-host-native
 # of expected passes            8
...

Note that the dwarf64 board doesn't work, because my system compiler is gcc
7.5.0, which doesn't support -gdwarf64.

An annoying property of the remote host/target boards is that they dump
files into the home dir.  This problem can be worked around by using the
--host-user and --target-user switches, in combination with test accounts.

Using the test accounts has the additional benefit that it triggers more strict
checking of build/host/target file manipulations.

Tom de Vries (1):
  [gdb/contrib] Add make-check-all.sh

 gdb/contrib/make-check-all.sh | 255 ++++++++++++++++++++++++++++++++++
 1 file changed, 255 insertions(+)
 create mode 100755 gdb/contrib/make-check-all.sh


base-commit: 2e411b8c68eb2b035b31d5b00d940d4be1a0928b
-- 
2.35.3


             reply	other threads:[~2023-04-03 15:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 15:09 Tom de Vries [this message]
2023-04-03 15:09 ` [PATCH 1/1] [gdb/contrib] Add make-check-all.sh Tom de Vries
2023-04-04 11:35   ` Andrew Burgess
2023-04-05  9:01     ` Tom de Vries
2023-04-18 12:43       ` Tom de Vries
2023-04-19 14:04         ` Simon Marchi
2023-04-20 11:43           ` Tom de Vries
2023-04-20 14:30             ` Simon Marchi
2023-04-21 15:41               ` Tom de Vries

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=20230403150957.28921-1-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /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).