-
Notifications
You must be signed in to change notification settings - Fork 478
uftrace code coverage
Honggyu Kim edited this page Jul 10, 2022
·
3 revisions
This document is written by Minchul Kang
lcov is a code coverage tool for linux.
1. Download lcov
$ sudo apt-get install lcov
or
$ git clone https://github.com/linux-test-project/lcov.git
2. Build lcov
$ make clean
$ make COVERAGE=1
if you want to reset coverage, you can use command below:
$ make reset-coverage
3. compile test code with -pg
option
$ gcc -pg -o t-abc tests/s-abc.c
4. record the object data with uftrace
record t-abc file with uftrace.
$ ./uftrace record --libmcount-path=. t-abc
Note that as we want to load necessary internal libraries from this path
for testing purpose, -L
option is given.
5. run script for lcov
Command below will generate coverage.html
file.
./misc/run-lcov.sh
6. Check the generated html
$ cd coverage.html
7. Run a web server
In this case, we used SimpleHTTPServer as a simple web server with port number 18080.
$ python -m SimpleHTTPServer 18080
you can get some data sample in link down below:
open index.html in coverage.html.zip
- Home
- Tutorial
- Development
- Practical Use Cases
- GCC
- Clang/LLVM
- Node.js
- Chromium
- MySQL/InnoDB
- FFmpeg
- CPython
- POCO
- Telegram
- yara
- RustPython
- cURL
- bpftrace
- SpiderMonkey
- Apache HTTP Server
- GStreamer
- Squid
- TCPDUMP
- OpenCV
- Libav
- Wireshark
- LXC
- Git
- Radare2
- uftrace on Android
- deno
- parallel sort algorithm
- LevelDB/RocksDB (YCSB)
- Redis
- libjpeg‐turbo (JPEG)
- JM (H.264/AVC)
- HM (HEVC)
- VTM (VVC)
- CUDA
- Erlang/OTP BEAM
- uftrace on Yocto
- TTCN3