[PATCH 5/5] test: unit test for smbios command

Simon Glass sjg at chromium.org
Wed Dec 27 08:40:40 CET 2023


Hi Heinrich,

On Tue, Dec 26, 2023 at 10:11 AM Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 12/26/23 10:47, Simon Glass wrote:
> > Hi Heinrich,
> >
> > On Sat, Dec 23, 2023 at 12:49 AM Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> >>
> >> Provide a unit test for the smbios command.
> >>
> >> Provide different test functions for QEMU, sandbox, and other systems.
> >>
> >> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> >> ---
> >>   test/py/tests/test_smbios.py | 47 ++++++++++++++++++++++++++++++++++++
> >>   1 file changed, 47 insertions(+)
> >>   create mode 100644 test/py/tests/test_smbios.py
> >
> > Can you please write this test in C?
> >
> > Regards,
> > Simon
>
> According to our documentation we can use either Python or C tests.
> We generally use Python tests for testing the CLI.

Not really...there are lots of C tests for the CLI. It is actually
easier to code, in most cases.

>
> I cannot see any benefit in trying to write this in C.

I did go to some effort to document this:

https://docs.u-boot.org/en/latest/develop/tests_writing.html#test-types

Regards,
Simon


More information about the U-Boot mailing list