Pre-processor magic or test library?
Chris Johns
chrisj at rtems.org
Mon Oct 30 20:56:16 UTC 2017
On 31/10/2017 01:21, Joel Sherrill wrote:
> On Oct 30, 2017 8:43 AM, "Chris Johns" <chrisj at rtems.org
> <mailto:chrisj at rtems.org>> wrote:
> On 28/10/2017 22:42, Sebastian Huber wrote:
> > we have currently some pre-processor magic to map the standard output
> functions to the RTEMS test printer. This works only if you include
> <tmacros.h> in every test file in the right spot. An alternative would be to
> use a separate library for all tests, e.g. librtemstest.a which provides
> puts(), printf(), fprintf(), etc. How do you think about this?
>
> I like it.
>
> I like the idea but not using the same names for the.methods. this will mean
> that if the linker magic isn't right, you end up getting the wrong implementation
>
The testing output routings could postfix a character like '|' to '\n' and the
tester can check the output always have that character in column 1 and flag the
test and incorrectly linked if it does not?
> Also, some of the tests are portable with the RTEMS configuration separate from
> the test and the test entry being main(). If we hack on the tests enough, we
> lose this ability.
Should we implement this using ld's remap? The check I just mentioned can still
be used.
> How do we test stdio and related pieces of code? Is that a specially built test?
>
> It will have to be.
>
Chris
More information about the devel
mailing list