Gyorgy Szing | c805f11 | 2022-11-25 11:53:08 +0100 | [diff] [blame^] | 1 | Verification methodology |
| 2 | ======================== |
| 3 | |
| 4 | This page discusses discusses verification tools and techniques used by the project. |
| 5 | |
| 6 | |
| 7 | Static Checks |
| 8 | ------------- |
| 9 | |
| 10 | This verification step checks quality by examining the source code. The project currently uses two tools which are |
| 11 | discussed in the chapters below. |
| 12 | |
| 13 | Checkpatch |
| 14 | '''''''''' |
| 15 | |
| 16 | `Checkpatch`_ is a tool developed and maintained by the Linux Kernel community. It can look for errors related to: |
| 17 | |
| 18 | - C and C++ coding style |
| 19 | - spelling mistakes |
| 20 | - git commit message formatting |
| 21 | |
| 22 | Please find the configuration of this tool in the :download:`TS repository.<../../../.checkpatch>` |
| 23 | |
| 24 | Cppcheck tool |
| 25 | ''''''''''''' |
| 26 | |
| 27 | `CppCheck`_ is a C/C++ static analysis tool. It can detect code depending on implementation defined behavior, and |
| 28 | dangerous coding constructs and thus it verifies coding guidelines. |
| 29 | |
| 30 | Please find the configuration of this tool in the :download:`TS repository.<../../../.cppcheck>` |
| 31 | |
| 32 | Build verification |
| 33 | ------------------ |
| 34 | |
| 35 | The :ref:`Build test runner` captures reference build configurations for all TS build products and can be used to verify |
| 36 | these. |
| 37 | |
| 38 | Runtime verification |
| 39 | -------------------- |
| 40 | |
| 41 | During the runtime versification step various test and demo executables are executed on the host PC and/or on target |
| 42 | platforms. |
| 43 | |
| 44 | Tests are targeting three different environment types: |
| 45 | |
| 46 | - ``arm-linux``: test executables to be run from Linux user-space on the target. |
| 47 | - ``pc-linux``: executables to run on the host PC. These tests have a lower verification level, as the binary is likely |
| 48 | not running on an arm target. Portability issues in the source may hide error or trigger false alarms. In turn |
| 49 | this type of test is cheap, |
| 50 | - ``sp`` and ``opteesp``: test executables targeting these environments run in the SWd and server as: |
| 51 | |
| 52 | - test payloads to help exercise trusted services |
| 53 | - test payload to help platform porting |
| 54 | |
| 55 | Each of these test applications manifest as a "deployment" in trusted services. For more details please see the |
| 56 | :ref:`Deployments` section. |
| 57 | |
| 58 | Compliance testing |
| 59 | '''''''''''''''''' |
| 60 | |
| 61 | The project hosts deployment helping compliance testing. For more information please refer to |
| 62 | :ref:`Platform Certification`. |
| 63 | |
| 64 | ------------------ |
| 65 | |
| 66 | .. _`Checkpatch`: https://docs.kernel.org/dev-tools/checkpatch.html |
| 67 | .. _`CppCheck`: https://cppcheck.sourceforge.io/ |
| 68 | |
| 69 | *Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.* |
| 70 | |
| 71 | SPDX-License-Identifier: BSD-3-Clause |