tempesta-tech / tempesta

All-in-one solution for high performance web content delivery and advanced protection against DDoS and web attacks
https://tempesta-tech.com/
GNU General Public License v2.0
606 stars 103 forks source link

Test coverage & fuzzing #1181

Open krizhanovsky opened 5 years ago

krizhanovsky commented 5 years ago

Functional tests coverage

Need to deploy a gcov in https://github.com/tempesta-tech/tempesta-test . A test coverage report must be generated (preferably for each CI build or at least by a separate test run). gcov(1) show percentage coverage, so the output can be used directly in the report. Maybe it makes sense to use lcov(1) to get HTML output for all the files at once.

The task is crucial since high (as close to 100% as possible) statement coverage is the minimal requirement for GA (high branch and predicate coverages are also wished).

Fuzzing

Kcov with AFL can should be used for fuzzing, see A gentle introduction to Linux Kernel fuzzing.

This must be done at least for TLS handshakes and the HTTP parser - the most security sensitive pieces of code. Different functions should be called by the fuzzer to reveal issues like #1683 , i.e. there should be unit tests using fuzzing.

Open source tools to consider:

References

krizhanovsky commented 1 year ago

We need to know our test coverage to release Beta: 80% is absolute minimum, 95% is the desired value.