1/** 2 @page qa Quality Assurance 3 4There is a wide scale effort in progress to improve the quality of the ISC 5DHCP implementation. The following section describes the major aspects of 6quality assurance that are being implemented. As this is a work in progress, 7expect radical changes in this area. 8 9 @section qaTests ATF Unit-tests 10 11 See @ref tests Section for details description of ATF-based unit-tests. 12 13 @section cppcheck cppcheck tool 14 15<a href="http://cppcheck.sourceforge.net/">cppcheck</a> is a static analysis tool 16for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not 17detect syntax errors in the code. Cppcheck primarily detects the types of bugs 18that the compilers normally do not detect. To generate cppcheck report, you 19must have cppcheck installed in your system. Generation is simple: 20 21@verbatim 22cd doc/ 23make cppcheck 24@endverbatim 25 26The log files will be stored in doc/html/cppcheck.log and 27doc/html/cppcheck-error.log. While the former is useful for verifying that all 28sources were checked, the latter is much more useful. It contains a list of 29problems that were detected by cppcheck. The goal is to correct all problems 30and make this an empty file. 31 32In the unlikely event of cppcheck finding false positives it is possible to add 33special comments formatted to instruct cppcheck to not report what it thinks is 34an issue. make cppcheck target is configured to make cppcheck print out a 35specific issue type reported. For example to disable the following error report: 36 37@verbatim 38bind/bind-9.8.1/bin/dnssec/dnssec-keygen.c:522: check_fail: Memory leak: algname (error,memleak) 39@endverbatim 40 41the following line could be added before line 522 in dnssec-keygen.c: 42@verbatim 43// cppcheck-suppress memleak 44@endverbatim 45 46Please consult cppcheck manual for details. It is section 6.2 "Inline 47suppressions" in cppcheck 1.54 manual. Section number may change in later 48versions. 49 50 @section doxygen Doxygen checks 51 52ISC DHCP Developer's Guide (the documentation you are reading now) is 53generated with doxygen. Doxygen is an open source tool for generating 54source code documentation. It is available from 55<a href="http://www.doxygen.org">www.doxygen.org</a> website. Once Doxygen 56is installed, ISC DHCP documentation can be generated with: 57 58@verbatim 59cd doc 60make devel 61@endverbatim 62 63Note that cppcheck (see @ref cppcheck Section) reports are linked from 64Developer's Guide. It is useful to generate both. 65 66 @section systemTests System level tests 67 68ISC is developing a comprehensive set of system level tests. 69They are described by a separate document called DHCP Test Plan. 70 71 @section perfdhcp Performance tests using perfdhcp 72 73ISC is also developing a performance measurement tool, called 74perfdhcp. Its main purpose is to measure performance of DHCPv4 and 75DHCPv6 servers. It is being developed as part of the BIND10 project. 76See tests/tools/perfdhcp directory in BIND10 source code. 77 78 @section tahiTests Conformance tests using TAHI 79 80<a href="http://tahi.org">TAHI project</a> developed an extensive suite of <a 81href="http://tahi.org/logo/dhcpv6/">DHCPv6 conformance tests</a>. ISC plans to 82deploy and run them periodically in the near future. 83 84 @section valgrind Memory correctness using valgrind 85 86<a href="http://valgrind.org/">Valgrind</a> is a powerful tool for dynamic code 87analysis. It allows running existing code (often even without recompiling) in a 88special environment that tracks memory operations. In particular, it is able to 89detect: memory leaks, buffer overflows, usage of uninitialized memory, double 90frees and similar errors. We currently do not use valgrind in ISC DHCP testing, 91but there are plans for starting to use it. 92 93*/ 94