[U-Boot] [PATCH V2 4/4] test: Add basic tests for remoteproc
Nishanth Menon
nm at ti.com
Thu Sep 17 01:57:36 CEST 2015
On 21:46-20150901, Simon Glass wrote:
> On 27 August 2015 at 22:07, Nishanth Menon <nm at ti.com> wrote:
> > Use the sandbox environment for the basic tests.
> >
> > Signed-off-by: Nishanth Menon <nm at ti.com>
> > ---
> > New patch.
> >
> > test/dm/Makefile | 1 +
> > test/dm/remoteproc.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 68 insertions(+)
> > create mode 100644 test/dm/remoteproc.c
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Tested-by: Simon Glass <sjg at chromium.org>
>
> Nit below.
Thanks. Will fix the same in the next rev.
[...]
> > +
> > + /* dt device device 2 */
> > + ut_assertok(rproc_stop(0));
> > + ut_assertok(rproc_reset(0));
> > + /* -> invalid attempt tests.. */
> > + ut_asserteq(-EINVAL, rproc_start(0));
> > + ut_asserteq(-EINVAL, rproc_ping(0));
> > + /* Valid tests.. */
>
> You don't need a period at the end of these comments\
Yep. Will fix.
>
> > + ut_assertok(rproc_load(2, 1, 0));
> > + ut_assertok(rproc_start(2));
> > + ut_assertok(rproc_is_running(2));
> > + ut_assertok(rproc_ping(2));
> > + ut_assertok(rproc_reset(2));
> > + ut_assertok(rproc_stop(2));
>
> Would it be worth having a test that goes through things in the wrong
> sequence? It's up to you.
The current tests does attempt to perform basic sanity tests - there
are invalid sequence attempts as well.
>
> BTW you don't have to put all your tests in one function, e.g. if some
> have a different purpose you can put them in a separate function.
I agree and had started it that way, then as I started putting things
together, considering the tests were simple sequence based, they were
good enough to put them in the test sequence in one shot. We can
definitely evolve as folks find specific needs of improvement in the
future.
--
Regards,
Nishanth Menon
More information about the U-Boot
mailing list