Hi,

I would like to generate gcov/lcov report by using LTP test source.

1. ./configure CFLAGS="-Wall -fprofile-arcs -ftest-coverage -g"
LDFLAGS="-lgcov -fprofile-arcs"
2. make all
3. make install (easy and serve the purpose)
4. ./runltp -f syscalls (obvious nothing happens, because i am running it
from ltp dir)

gcov need source and binary should be present in the same location to
generate final  gcov output file sourcefile.c.gcov

I am looking for (three years) old style of running tests in ltp ( like as
runltp do not look for /ltp/bin or testcase/bin or /opt/bin for test
binaries, just go to each testcase/kernel/syscall/each-dir-and-run). Not
ready to go back and use old ltp version, instead i am looking a way to run
test from its source directory which will benefits gcov/lcov to generate
coverage report.

Manual execution of gcov:
--------------------------------------
naresh@linaro:/mnt/home/naresh/ltp-git/ltp/testcases/kernel/syscalls/accept$
ls
accept01  accept01.c  accept01.gcno  Makefile
naresh@linaro:/mnt/home/naresh/ltp-git/ltp/testcases/kernel/syscalls/accept$
./accept01
accept01    1  TPASS  :  bad file descriptor successful
accept01    2  TPASS  :  bad file descriptor successful
accept01    3  TPASS  :  invalid socket buffer successful
accept01    4  TPASS  :  invalid salen successful
accept01    5  TPASS  :  invalid salen successful
accept01    6  TPASS  :  no queued connections successful
accept01    7  TPASS  :  UDP accept successful
naresh@linaro:/mnt/home/naresh/ltp-git/ltp/testcases/kernel/syscalls/accept$
ls
accept01  accept01.c  accept01.gcda  accept01.gcno  Makefile
naresh@linaro:/mnt/home/naresh/ltp-git/ltp/testcases/kernel/syscalls/accept$
gcov accept01.c
File 'accept01.c'
Lines executed:83.87% of 62
accept01.c:creating 'accept01.c.gcov'

File '/usr/include/x86_64-linux-gnu/bits/fcntl2.h'
Lines executed:100.00% of 1
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:creating 'fcntl2.h.gcov'

naresh@linaro:/mnt/home/naresh/ltp-git/ltp/testcases/kernel/syscalls/accept$
ls
accept01  accept01.c  accept01.c.gcov  accept01.gcda  accept01.gcno
fcntl2.h.gcov  Makefile

Best regards
Naresh Kamboju
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to