[rtems commit] cpukit, testsuite: Add rtems_printf and rtems_printer support.
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jun 1 05:39:50 UTC 2016
On 26/05/16 01:04, Chris Johns wrote:
> On 25/05/2016 21:30, Sebastian Huber wrote:
>> I get now an undefined reference error:
>>
>> Making all in loopback
>> gmake[6]: Entering directory
>> `/build/git-build/b-sis/sparc-rtems4.12/c/sis/testsuites/samples/loopback'
>>
>> sparc-rtems4.12-gcc -B../../../../../sis/lib/ -specs bsp_specs -qrtems
>> -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall
>> -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
>> -Wnested-externs -Wl,--gc-sections -mcpu=cypress -o loopback.exe
>> init.o
>> ../../../../../sis/lib/librtemscpu.a(testbeginend.o): In function
>> `rtems_test_begin':
>> /home/EB/sebastian_h/git-rtems/c/src/../../cpukit/libmisc/testsupport/testbeginend.c:23:
>>
>> undefined reference to `rtems_test_printer'
>> /home/EB/sebastian_h/git-rtems/c/src/../../cpukit/libmisc/testsupport/testbeginend.c:23:
>>
>> undefined reference to `rtems_test_printer'
>> ../../../../../sis/lib/librtemscpu.a(testbeginend.o): In function
>> `rtems_test_end':
>> /home/EB/sebastian_h/git-rtems/c/src/../../cpukit/libmisc/testsupport/testbeginend.c:31:
>>
>> undefined reference to `rtems_test_printer'
>> /home/EB/sebastian_h/git-rtems/c/src/../../cpukit/libmisc/testsupport/testbeginend.c:31:
>>
>> undefined reference to `rtems_test_printer'
>>
>
> Sorry about this, it looks like my --enable-network build is not
> working. I will take a look.
Maybe an --enable-networking typo?
>
>> Why is it defined multiple times in the individual tests and not in
>> libmisc?
>
> I could have gone one of two ways and decided to be specific for now.
> I did not want to add a new global to all tests yet and create a
> further variation on how to print in the tests. I wanted to narrow the
> focus and limit the options so we have a chance at cleaning this stuff
> up.
The testbeginend.c in libmisc.c needs this variable, so I would rather
define it here and not in this and that test.
>
> The testsuite is not great in this area and that is being polite. The
> tmacros.h defines to replace printf, puts etc is not great and prone
> to errors. The test code does not have a single approach to printed
> output, you could use a define and include tmacros.h, or use
> *_begink/*_endk and then implicitly manage the calls to printk, and/or
> a combination of these. I am not sure if a single approach can be used
> for all tests or if it matters. I did not have time to review the
> tests and see what could be done.
>
> I see a second bigger pass over the code to remove the support from
> tmacros.h and add it to libmisc and to change all prints, where ever
> possible to rtems_printf, and rtems_puts (which will need to be
> added). There could even be a test version of these added which uses
> the rtems_printer. Each test will need a printer defined in Init and
> the output path defined.
We should first open a ticket and gather all requirements, before we
start to work on this. It will be very labour intensive to add a proper
test infrastructure to our existing test suite. The test suite itself is
great, but it is more or less unstructured.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list