Prev |  | Next

## 1. NUT Quality Assurance

Recognizing the critical nature of NUT, the NUT Quality Assurance (NQA) effort has been established to improve NUT where necessary, and to maintain software quality as high as it should be.

NQA is present in many aspects and areas of NUT.

### 1.1. Documentation

The documentation toolchain uses AsciiDoc to output both HTML pages and manual pages (troff). This single point of control fills many gaps, suppresses many redundancies, and optimizes documentation management in general.

- The NUT website and HTML documentation are tested for W3C XHTML 1.1 and CSS compliance. This can be counter verified by clicking the W3C XHTML 1.1 and CSS icons, at the bottom of each page.

- Documentation source files are spell checked, using Aspell, both interactively (using make spellcheck-interactive) and automatically in NUT CI farm runs (using make spellcheck).

### Note

A NUT dictionary is also available (as `docs/nut.dict` in NUT sources), providing a glossary of terms related to power devices and management, as well as partial terms, technical jargon and author names.

### 1.2. Source code

#### Use of standards

NUT promotes and uses many standards, such as:

- the variable names standard used in NUT,
- the coding rules and best practices for developers,
- the use of a software architecture limiting developments to the very minimum,

- the use of standard Free and OpenSource Software components, like:

  - the USB library,
  - the Net SNMP project,
  - the Neon library,
  - the OpenSSL library (to be replaced by NSS, which is more license compliant with NUT and can be FIPS 140 certified),
  - the TCP Wrappers library.

#### QA tools and metrics

NUT’s quality is constantly monitored using many tools, like:

- a Revision Control System (Git) to track development and ease regression fixes.

- OBSOLETE: Buildbot for older take on multi-platform builds, and the
- new dedicated Jenkins incarnation of the NUT CI Farm with "legacy UI" for main branch and PRs, also accessible at the slower but slicker-looking Blue Ocean user interface for activity, branches and PRs, are all used to automate the compile/test cycle, using numerous platforms, target distributions, C/C++ revisions, compiler toolkits and make program implementations. Any build failure is caught early, and fixed quickly. Also we get to see if incoming pull requests (as well as Git branch HEADs) do not have code (or recipe) that is instantly faulty and can not build on one of the platforms we track even with relaxed warnings.

- a project portal with trackers for bugs, feature request, patches and tasks, currently at GitHub
- CodeQL (previously LGTM.COM) automatically checking C/C++ and Python code

- Static code analysis:

  - Coverity Scan overview of NUT
  - cppcheck as part of NUT CI farm builds and reports

NUT QA also relies on external tools and trackers, like:

- Clang

- the Debian QA tools, available through the NUT Package Tracking System:

  - Lintian general QA checks,
  - piuparts automates the installation, upgrade and removal testing processes.

- a runtime testing suite, which automates the inter-layer communication testing (driver — upsd — upsmon / clients), that is part of Ubuntu. The NUT testing script is available in the Ubuntu QA Regression Testing suite.

  It installs NUT packages, configures it with the dummy-ups driver, changes a few data points and checks that these are well propagated with upsc.

- similar approach is explored in NIT (NUT Integration Testing) suite, which is part of the codebase and automated with `make check-NIT`; it can also be added to default `make check` activities by running `configure --enable-check-NIT`

  - Note that developers updating components which directly impact NIT runs may benefit from `make check-NIT-devel` target, to rebuild the `upsd`, `dummy-ups`, `cppnit` and other programs used in the test as they iterate.
- Redhat / Fedora Bug tracker
- Black Duck Open Hub (formerly Ohloh.net) provides metrics on NUT source code base and activity.

#### Runtime quality

- NUT provides many security features (or `docs/security.txt` in NUT sources for up-to-date information) to ensure a maximum runtime security level.
- Packages use several Hardening methods to protect NUT binaries.

Prev |  | Next
| Home |