[PATCH 36/40] test: lmb: add a separate class of unit tests for lmb

Sughosh Ganu sughosh.ganu at linaro.org
Mon Jul 29 10:56:33 CEST 2024


On Fri, 26 Jul 2024 at 05:03, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Sughosh,
>
> On Wed, 24 Jul 2024 at 00:05, Sughosh Ganu <sughosh.ganu at linaro.org> wrote:
> >
> > Add the LMB unit tests under a separate class of tests. The LMB tests
> > involve changing the LMB's memory map. With the memory map now
> > persistent and global, running these tests has a side effect and
> > impact any subsequent tests. Run these tests separately so that the
> > system can be reset on completion of these tests.
> >
>
> This is just not a good idea...we should fix the tests so they don't
> have these side effects.

But this test *will* have side-effects -- if we are making the lmb
memory maps persistent, testing that code will have an impact. There
is no getting around it. Btw, I got this idea based on how the VBE
tests are run. This is similar to what is being done for the VBE
tests.

As an aside, what issue do you see with running these tests separately?

-sughosh

>
> > Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> > ---
> > Changes since rfc: None
> >
> >  include/test/suites.h        |  1 +
> >  test/Kconfig                 |  9 ++++++
> >  test/Makefile                |  1 +
> >  test/cmd_ut.c                |  7 +++++
> >  test/lib/Makefile            |  1 -
> >  test/{lib/lmb.c => lmb_ut.c} | 53 ++++++++++++++++++++++--------------
> >  6 files changed, 50 insertions(+), 22 deletions(-)
> >  rename test/{lib/lmb.c => lmb_ut.c} (93%)
>
> Regards,
> Simon


More information about the U-Boot mailing list