All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v4 35/42] test: Rename all linker lists to have a ut_ prefix
Date: Thu, 4 Mar 2021 23:09:29 -0500	[thread overview]
Message-ID: <CAPnjgZ3Rbk=WYQsj1jcWGL6iOXnDw=3gBd5HQQoZ6gtm0Oe6_g@mail.gmail.com> (raw)
In-Reply-To: <f5fa767b-7c51-d6b5-ce19-fe3b1bc01bd3@gmx.de>

Hi Heinrich,

On Thu, 4 Mar 2021 at 10:28, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 3/4/21 2:51 PM, Simon Glass wrote:
> > At present each test suite has its own portion of the linker_list section
> > of the image, but other lists are interspersed. This makes it hard to
> > enumerate all the available tests without knowing the suites that each one
> > is in.
> >
> > Place all tests together in a single contiguous list by giving them
> > common prefix not used elsewhere in U-Boot. This makes it possible to find
> > the start and end of all tests.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > (no changes since v3)
> >
> > Changes in v3:
> > - Update the pytest collector as well
> >
> >   include/test/test.h | 8 ++++----
> >   test/py/conftest.py | 2 +-
> >   2 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/include/test/test.h b/include/test/test.h
> > index b16c9135f2c..3330dcc72d3 100644
> > --- a/include/test/test.h
> > +++ b/include/test/test.h
> > @@ -86,18 +86,18 @@ struct unit_test {
> >    * @_suite: name of the test suite concatenated with "_test"
> >    */
> >   #define UNIT_TEST(_name, _flags, _suite)                            \
> > -     ll_entry_declare(struct unit_test, _name, _suite) = {           \
> > +     ll_entry_declare(struct unit_test, _name, ut_ ## _suite) = {    \
> >               .file = __FILE__,                                       \
> >               .name = #_name,                                         \
> >               .flags = _flags,                                        \
> >               .func = _name,                                          \
> >       }
> >
> > -/* Get the start of a list of unit tests for a particular category */
> > +/* Get the start of a list of unit tests for a particular suite */
> >   #define UNIT_TEST_SUITE_START(_suite) \
> > -     ll_entry_start(struct unit_test, _suite)
> > +     ll_entry_start(struct unit_test, ut_ ## _suite)
> >   #define UNIT_TEST_SUITE_COUNT(_suite) \
> > -     ll_entry_count(struct unit_test, _suite)
> > +     ll_entry_count(struct unit_test, ut_ ## _suite)
> >
> >   /* Sizes for devres tests */
> >   enum {
> > diff --git a/test/py/conftest.py b/test/py/conftest.py
> > index 9bfd9263455..1b909cde9d3 100644
> > --- a/test/py/conftest.py
> > +++ b/test/py/conftest.py
> > @@ -226,7 +226,7 @@ def pytest_configure(config):
> >           import u_boot_console_exec_attach
> >           console = u_boot_console_exec_attach.ConsoleExecAttach(log, ubconfig)
> >
> > -re_ut_test_list = re.compile(r'_u_boot_list_2_(.*)_test_2_\1_test_(.*)\s*$')
> > +re_ut_test_list = re.compile(r'_u_boot_list_2_ut_(.*)_test_2_\1_test_(.*)\s*$')
>
>
> We should try to minimize the size of the U-Boot binary. Why do we need
> a list that contain both "_ut_" and "_test_"? A single "_ut_" should be
> enough to generate a unique section name.

Possibly you are right. But that is not the subject of this patch.

I think after this series (and applying the patch to select tests with
wildcards) we might be able to do some renaming, since most things are
in macros.

Regards,
Simon

  reply	other threads:[~2021-03-05  4:09 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 13:50 [PATCH v4 00/42] test: Refactor tests to have a single test runner Simon Glass
2021-03-04 13:50 ` [PATCH v4 01/42] dm: core: Fix allocation of empty of-platdata Simon Glass
2021-03-04 13:50 ` [PATCH v4 02/42] doc: Tidy up testing section Simon Glass
2021-03-04 15:32   ` Heinrich Schuchardt
2021-03-04 13:50 ` [PATCH v4 03/42] doc: Document make tcheck Simon Glass
2021-03-04 13:50 ` [PATCH v4 04/42] sandbox: Drop the 'starting...' message unless testing Simon Glass
2021-03-04 15:38   ` Heinrich Schuchardt
2021-03-04 13:50 ` [PATCH v4 05/42] test: Re-enable test_ofplatdata Simon Glass
2021-03-04 13:50 ` [PATCH v4 06/42] doc: Explain how to run tests without pytest Simon Glass
2021-03-04 16:13   ` Heinrich Schuchardt
2021-03-07 22:49     ` Simon Glass
2021-03-04 13:50 ` [PATCH v4 07/42] doc: Document how sandbox_spl_tests are run Simon Glass
2021-03-04 13:50 ` [PATCH v4 08/42] test: Correct setexpr test prefix Simon Glass
2021-03-04 13:50 ` [PATCH v4 09/42] test: Mark all driver model tests with a flag Simon Glass
2021-03-04 13:50 ` [PATCH v4 10/42] test: Rename test-main.c to test-dm.c Simon Glass
2021-03-04 13:50 ` [PATCH v4 11/42] test: Add an overall test runner Simon Glass
2021-03-04 13:50 ` [PATCH v4 12/42] test: Create pre/post-run functions Simon Glass
2021-03-04 13:50 ` [PATCH v4 13/42] test: Call test_pre/post_run() from driver model tests Simon Glass
2021-03-04 13:50 ` [PATCH v4 14/42] test: Move dm_extended_scan() to test_pre_run() Simon Glass
2021-03-04 13:50 ` [PATCH v4 15/42] test: Move do_autoprobe() " Simon Glass
2021-03-04 13:50 ` [PATCH v4 16/42] test: Move dm_scan_plat() " Simon Glass
2021-03-04 13:50 ` [PATCH v4 17/42] test: Drop mallinfo() work-around Simon Glass
2021-03-04 13:50 ` [PATCH v4 18/42] test: Move console silencing to test_pre_run() Simon Glass
2021-03-04 13:50 ` [PATCH v4 19/42] test: Move delay skipping " Simon Glass
2021-03-04 13:50 ` [PATCH v4 20/42] test: Handle driver model reinit in test_pre_run() Simon Glass
2021-03-04 13:50 ` [PATCH v4 21/42] test: Drop struct dm_test_state Simon Glass
2021-03-04 13:50 ` [PATCH v4 22/42] test: Move dm_test_init() into test-main.c Simon Glass
2021-03-04 13:50 ` [PATCH v4 23/42] test: Move dm_test_destroy() " Simon Glass
2021-03-04 13:51 ` [PATCH v4 24/42] test: Move test running into a separate function Simon Glass
2021-03-04 13:51 ` [PATCH v4 25/42] test: Use ut_run_test() to run driver model tests Simon Glass
2021-03-04 13:51 ` [PATCH v4 26/42] test: Drop dm_do_test() Simon Glass
2021-03-04 13:51 ` [PATCH v4 27/42] test: Add ut_run_test_live_flat() to run tests twice Simon Glass
2021-03-04 13:51 ` [PATCH v4 28/42] test: Use a local variable for test state Simon Glass
2021-03-04 13:51 ` [PATCH v4 29/42] test: Run driver-model tests using ut_run_list() Simon Glass
2021-03-04 13:51 ` [PATCH v4 30/42] test: Use return values in dm_test_run() Simon Glass
2021-03-04 13:51 ` [PATCH v4 31/42] test: Move the devicetree check into ut_run_list() Simon Glass
2021-03-04 13:51 ` [PATCH v4 32/42] test: Move restoring of driver model state to ut_run_list() Simon Glass
2021-03-04 13:51 ` [PATCH v4 33/42] test: log: Rename log main test file to log_ut.c Simon Glass
2021-03-04 17:18   ` Heinrich Schuchardt
2021-03-04 13:51 ` [PATCH v4 34/42] test: Add a macros for finding tests in linker_lists Simon Glass
2021-03-04 13:51 ` [PATCH v4 35/42] test: Rename all linker lists to have a ut_ prefix Simon Glass
2021-03-04 15:28   ` Heinrich Schuchardt
2021-03-05  4:09     ` Simon Glass [this message]
2021-03-04 13:51 ` [PATCH v4 36/42] test: Allow SPL to run any available test Simon Glass
2021-03-04 13:51 ` [PATCH v4 37/42] sandbox: Update os_find_u_boot() to find the .img file Simon Glass
2021-03-04 13:51 ` [PATCH v4 38/42] spl: Convert spl_fit to work with sandbox Simon Glass
2021-03-04 13:51 ` [PATCH v4 39/42] doc: Move coccinelle into its own section Simon Glass
2021-03-04 17:23   ` Heinrich Schuchardt
2021-03-07 22:18     ` Simon Glass
2021-03-04 13:51 ` [PATCH v4 40/42] spl: test: Add a test for spl_load_simple_fit() Simon Glass
2021-03-04 13:51 ` [PATCH v4 41/42] test: sandbox: Move sandbox test docs into doc/develop Simon Glass
2021-03-04 13:51 ` [PATCH v4 42/42] doc: Explain briefly how to write new tests Simon Glass
2021-03-04 18:14   ` Heinrich Schuchardt
2021-03-07 23:21     ` Simon Glass

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='CAPnjgZ3Rbk=WYQsj1jcWGL6iOXnDw=3gBd5HQQoZ6gtm0Oe6_g@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.