Coverage Analysis on rtems 4.10 of switch case structures

Aitor Viana Sanchez aitor.viana.sanchez at esa.int
Thu Apr 30 08:22:00 UTC 2015


Hola Juanma,

are you using sparc-gcov <https://github.com/aitorvs/sparc-gcov>? I 
don’t remember whether I ever had a problem with switch-case while 
developing/testing the tool. If you’re using it and its a bug send me 
some files so I can reproduce the problem and fix the bug.
If you’re using another gcov wrapper, have a look at sparc-gcov and see 
whether it fixes the problem.

regards

//avs

On 29/04/15 10:46, Juanma Mail List wrote:

> Hello,
>
> I am doing a coverage analysis for a software code which is based on 
> RTEMS 4.10 and runs on a sparc-leon3 platform from Gaisler. I have 
> problem with the coverage of switch-case structures.
>
> The software mostly processes the commands that are send to it, and do 
> the actions associated to the them. To do the coverage, I have added 
> some wrappers and compiled the software as a static library.
>
> And finally a set of test application do the call to the library and 
> check the coverage.
>
> My framework uses:
>
>     - TSIM/LEON3 SPARC simulator, version 2.0.19 (professional version).
>     - covoar tool and leon3 simulation script  from rtems-testing tools.
>     - sparc-rtems-gcov, lcov and genhtml.
>
> I am not able to cover the switch-case structures. The coverage shows 
> that the execution always hit the first case of the switch-case.
>
> Does anyone seen this behavior before?
>
> Many thanks, Juanma.
>
> *$ *sparc-rtems-gcc -v
>         Reading specs from /opt/rtems-4.10/lib/gcc/sparc-rtems/4.4.6/specs
>         Target: sparc-rtems
>         Configured with: ../../gcc/configure --target=sparc-rtems 
> --with-gnu-as --with-gnu-ld --with-newlib --verbose --enable-threads 
> --enable-languages=c,c++ --disable-nls         
> --prefix=/opt/rtems-4.10 --enable-version-specific-runtime-libs 
> --with-system-zlib --disable-libstdcxx-pch --disable-win32-registry 
> --without-included-gettext
>         Thread model: rtems
>         gcc version 4.4.6 (GCC)
>
>
> *$* sparc-rtems-gcov -v
>     gcov (GCC) 4.4.6
>     Copyright (C) 2010 Free Software Foundation, Inc.
>     This is free software; see the source for copying conditions.
>     There is NO warranty; not even for MERCHANTABILITY or
>     FITNESS FOR A PARTICULAR PURPOSE.
>
> The tests are compiled wth the flags
>
>         CCFLAGS =  -fprofile-arcs -ftest-coverage
>         LDFLAGS = -lgcov -coverage
>
>
> My coverage script:
>
> ./leon3 -c -l 120 simpletest.exe
> echo "Cleaning counters and create intial..."
> lcov --zerocounters --directory "$SOURCE_DIR" > log/gcov.log 2>&1
> lcov --capture --initial --directory "$SOURCE_DIR" --output-file  
> "$OUTPUT_DIR/coverage.info" --gcov-tool "$GCOV" >> log/gcov.log 2>&1
>
> covoar -v -C config $TESTSUITE >> log/gcov.log 2>&1
> lcov --no-checksum -d $SOURCE_DIR  --capture --output-file 
> "$OUTPUT_DIR/coverage.info" --gcov-tool $GCOV --config-file 
> ../rtemsNOMAD/sfs.lcovrc >> log/gcov.log 2>&1
>
> echo "Generating report $OUTPUT_DIR/$REPORTDIR"
> genhtml --highlight --legend --output-directory 
> "$OUTPUT_DIR"/"$REPORTDIR"  coverage.info --config-file 
> ../rtemsNOMAD/sfs.lcovrc >> log/gcov.log 2>&1
>
>
>
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users

​

This message and any attachments are intended for the use of the addressee or addressees only.
The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its
content is not permitted.
If you received this message in error, please notify the sender and delete it from your system.
Emails can be altered and their integrity cannot be guaranteed by the sender.

Please consider the environment before printing this email.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20150430/ee64bedf/attachment.html>


More information about the users mailing list