Welcome! Log In Create A New Profile

Advanced

On test-suite coverage

Hugo Lefeuvre
January 14, 2022 10:48AM
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
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

On test-suite coverage

Hugo Lefeuvre 267 January 14, 2022 10:48AM

Re: On test-suite coverage

Maxim Konovalov 108 January 14, 2022 11:34AM

Re: On test-suite coverage

Hugo Lefeuvre 138 January 15, 2022 04:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 253
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready