Skip to contentSkip to conversation

how does one "extend" the list of POST tests?

U-Boot Robert P. J. Day 1 participant 2 messages Mar 29, 2016

lore
Share & tools
lore
#0 lore raw

one more question, i think, on the framework of u-boot POST tests.
the README.POST file states:

o) Extensibility

The framework shall allow adding/removing/replacing POST tests. Also, standalone POST tests shall be supported.

how many different ways are there to extend the list of POST tests?

given that post/tests.c defines the list of tests statically, you
clearly can't *dynamically* add tests. i do see that that list of tests includes the generic tests:

#if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
CONFIG_POST_BSPEC1,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
CONFIG_POST_BSPEC2,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
CONFIG_POST_BSPEC3,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
CONFIG_POST_BSPEC4,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
CONFIG_POST_BSPEC5,
#endif

so, sure, one can take advantage of any of those five available test slots, but that's not really a general solution.

so other than editing post/tests.c and manually adding more tests,
is there any other mechanism for adding POST tests?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 30 lines · Robert P. J. Day

one more question, i think, on the framework of u-boot POST tests.
the README.POST file states:

o) Extensibility

The framework shall allow adding/removing/replacing POST tests. Also, standalone POST tests shall be supported.

how many different ways are there to extend the list of POST tests?

given that post/tests.c defines the list of tests statically, you
clearly can't *dynamically* add tests. i do see that that list of tests includes the generic tests:

#if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
CONFIG_POST_BSPEC1,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
CONFIG_POST_BSPEC2,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
CONFIG_POST_BSPEC3,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
CONFIG_POST_BSPEC4,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
CONFIG_POST_BSPEC5,
#endif

Quoted 5 lines

so, sure, one can take advantage of any of those five available test slots, but that's not really a general solution.

so other than editing post/tests.c and manually adding more tests,
is there any other mechanism for adding POST tests?

whoops, i just noticed the ability to add tests through the
environment in post/post.c:

#ifndef CONFIG_POST_SKIP_ENV_FLAGS
static void post_get_env_flags(int *test_flags)

{
        int  flag[] = {  POST_POWERON,   POST_NORMAL,   POST_SLOWTEST,
                         POST_CRITICAL };
        char *var[] = { "post_poweron", "post_normal", "post_slowtest",
                        "post_critical" };

as i read it, that still limits one to selecting tests already implemented, but it's still an increase in flexibility. will keep reading ...

rday

p.s. once i nail all this down, i plan on submitting a few more patches, and writing this up for public consumption on my wiki.

p.p.s. if anyone has a board-specific implementation of some POST tests they want to share, i can use all the examples i can get.

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================