On test-suite coverage
Hugo Lefeuvre
hle at owl.eu.com
Fri Jan 14 15:45:31 UTC 2022
Hello!
As part of a research project, I measured the coverage achieved by Nginx's
test-suite using gcov. Taking a look at the results, my colleagues and
myself were somewhat surprised to realize that the coverage capped at about
70% line coverage and 81% function coverage; we expected something closer
to 90% line coverage. core/nginx.c for example only gets 268 lines / 584
covered. Similarly, more than half of core/ngx_resover.c (1042 lines /
2138) is not covered.
I was wondering if I did something wrong in my measurements, if this is a
known weakness of the test-suite, and in the latter case, if this is
something that the Nginx project is open to receiving contributions on.
For the record, I built the Nginx server (version 1.20.1) with the
following configure:
./configure --sbin-path=$(pwd)/nginx --conf-path=$(pwd)/conf/nginx.conf
--pid-path=$(pwd)/nginx.pid --with-http_ssl_module
--with-http_realip_module --with-http_addition_module
--with-http_xslt_module --with-http_image_filter_module
--with-http_geoip_module --with-http_sub_module --with-http_dav_module
--with-http_flv_module --with-http_mp4_module
--with-http_gzip_static_module --with-http_gunzip_module
--with-http_random_index_module --with-http_secure_link_module
--with-http_stub_status_module --with-cc-opt="-fprofile-arcs
-ftest-coverage" --with-ld-opt="-lgcov" --with-http_auth_request_module
--with-http_v2_module
Thanks for your work!
Cheers,
Hugo
--
Hugo Lefeuvre (hle) | www.owl.eu.com
RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD
ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20220114/c0b72270/attachment.bin>
More information about the nginx-devel
mailing list