All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Bin Meng <bmeng.cn@gmail.com>, Sean Anderson <seanga2@gmail.com>
Subject: Re: [PATCH v3 06/19] test: Avoid failing skipped tests
Date: Tue, 25 Jun 2024 08:14:32 -0600	[thread overview]
Message-ID: <20240625141432.GP38804@bill-the-cat> (raw)
In-Reply-To: <CAFLszTiJYVQZ=2kqC6FUQMfrFwtSraET_3nG-2oZhMV=Ts7OEw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2815 bytes --]

On Tue, Jun 25, 2024 at 01:38:00PM +0100, Simon Glass wrote:
> Hi Tom,
> 
> On Mon, 24 Jun 2024 at 19:06, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sun, Jun 23, 2024 at 02:32:00PM -0600, Simon Glass wrote:
> >
> > > When a test returns -EAGAIN this should not be considered a failure.
> > > Fix what seems to be a problem case, where the pytests see a failure
> > > when a test has merely been skipped.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > ---
> > >
> > > (no changes since v1)
> > >
> > >  test/test-main.c | 16 +++++++++++-----
> > >  1 file changed, 11 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/test/test-main.c b/test/test-main.c
> > > index 3fa6f6e32ec..cda1a186390 100644
> > > --- a/test/test-main.c
> > > +++ b/test/test-main.c
> > > @@ -448,7 +448,7 @@ static int ut_run_test(struct unit_test_state *uts, struct unit_test *test,
> > >  static int ut_run_test_live_flat(struct unit_test_state *uts,
> > >                                struct unit_test *test)
> > >  {
> > > -     int runs;
> > > +     int runs, ret;
> > >
> > >       if ((test->flags & UT_TESTF_OTHER_FDT) && !IS_ENABLED(CONFIG_SANDBOX))
> > >               return skip_test(uts);
> > > @@ -458,8 +458,11 @@ static int ut_run_test_live_flat(struct unit_test_state *uts,
> > >       if (CONFIG_IS_ENABLED(OF_LIVE)) {
> > >               if (!(test->flags & UT_TESTF_FLAT_TREE)) {
> > >                       uts->of_live = true;
> > > -                     ut_assertok(ut_run_test(uts, test, test->name));
> > > -                     runs++;
> > > +                     ret = ut_run_test(uts, test, test->name);
> > > +                     if (ret != -EAGAIN) {
> > > +                             ut_assertok(ret);
> > > +                             runs++;
> > > +                     }
> > >               }
> > >       }
> > >
> > > @@ -483,8 +486,11 @@ static int ut_run_test_live_flat(struct unit_test_state *uts,
> > >           (!runs || ut_test_run_on_flattree(test)) &&
> > >           !(gd->flags & GD_FLG_FDT_CHANGED)) {
> > >               uts->of_live = false;
> > > -             ut_assertok(ut_run_test(uts, test, test->name));
> > > -             runs++;
> > > +             ret = ut_run_test(uts, test, test->name);
> > > +             if (ret != -EAGAIN) {
> > > +                     ut_assertok(ret);
> > > +                     runs++;
> > > +             }
> > >       }
> > >
> > >       return 0;
> >
> > How did you trigger this case exactly?
> 
> I noticed this in CI, where some skipped tests were shown as failed in
> the log, even though they were not counted as failures in the final
> results.

That's really really strange, do you have an example log or something
around still?

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2024-06-25 14:14 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 20:31 [PATCH v3 00/19] labgrid: Provide an integration with Labgrid Simon Glass
2024-06-23 20:31 ` [PATCH v3 01/19] test: Allow signaling that U-Boot is ready Simon Glass
2024-06-23 20:31 ` [PATCH v3 02/19] test: Use a constant for the test timeout Simon Glass
2024-06-23 20:31 ` [PATCH v3 03/19] test: Pass stderr to stdout Simon Glass
2024-06-23 20:31 ` [PATCH v3 04/19] test: Release board after tests complete Simon Glass
2024-06-23 20:31 ` [PATCH v3 05/19] test: Allow connecting to a running board Simon Glass
2024-06-23 20:32 ` [PATCH v3 06/19] test: Avoid failing skipped tests Simon Glass
2024-06-24 18:05   ` Tom Rini
2024-06-25 12:38     ` Simon Glass
2024-06-25 14:14       ` Tom Rini [this message]
2024-06-26  8:00         ` Simon Glass
2024-06-26 13:56           ` Tom Rini
2024-06-26 13:59             ` Tom Rini
2024-08-22  3:00           ` Simon Glass
2024-08-22 14:11             ` Tom Rini
2024-08-22 14:22               ` Simon Glass
2024-08-22 14:29                 ` Tom Rini
2024-06-23 20:32 ` [PATCH v3 07/19] test: Create a common function to get the config Simon Glass
2024-06-23 20:32 ` [PATCH v3 08/19] test: Introduce the concept of a role Simon Glass
2024-06-24 18:13   ` Tom Rini
2024-06-25 12:38     ` Simon Glass
2024-06-25 14:27       ` Tom Rini
2024-06-26  8:00         ` Simon Glass
2024-06-26 14:29           ` Tom Rini
2024-06-27  8:37             ` Simon Glass
2024-07-02 23:12               ` Tom Rini
2024-07-13 15:13                 ` Simon Glass
2024-07-13 16:57                   ` Tom Rini
2024-07-15  7:11                     ` Simon Glass
2024-07-15 21:03                       ` Tom Rini
2024-07-31 14:39                         ` Simon Glass
2024-06-23 20:32 ` [PATCH v3 09/19] test: Move the receive code into a function Simon Glass
2024-06-23 20:32 ` [PATCH v3 10/19] test: Separate out the exception handling Simon Glass
2024-06-23 20:32 ` [PATCH v3 11/19] test: Detect dead connections Simon Glass
2024-06-23 20:32 ` [PATCH v3 12/19] test: Tidy up remaining exceptions Simon Glass
2024-06-23 20:32 ` [PATCH v3 13/19] test: Introduce lab mode Simon Glass
2024-06-23 20:32 ` [PATCH v3 14/19] test: Improve handling of sending commands Simon Glass
2024-06-23 20:32 ` [PATCH v3 15/19] test: Fix mulptiplex_log typo Simon Glass
2024-06-23 20:32 ` [PATCH v3 16/19] test: Avoid double echo when starting up Simon Glass
2024-06-23 20:32 ` [PATCH v3 17/19] test: Try to shut down the lab console gracefully Simon Glass
2024-06-23 20:32 ` [PATCH v3 18/19] test: Add a section for closing the connection Simon Glass
2024-06-23 20:32 ` [PATCH v3 19/19] CI: Allow running tests on sjg lab Simon Glass
2024-06-24  7:13   ` Andrejs Cainikovs
2024-06-24 14:56     ` Michael Nazzareno Trimarchi
2024-06-24 18:01       ` Tom Rini
2024-06-25 12:30         ` Simon Glass
2024-08-09 16:10           ` 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=20240625141432.GP38804@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=bmeng.cn@gmail.com \
    --cc=seanga2@gmail.com \
    --cc=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.