Skip to content

Commit

Permalink
Testing approach doc (oneapi-src#914)
Browse files Browse the repository at this point in the history
* Signed-off-by:Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com

* Update testing_approach.rst
  • Loading branch information
aepanchi committed Sep 26, 2022
1 parent f103502 commit 104fb5c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Here are [Release Notes](RELEASE_NOTES.md) and [System Requirements](SYSTEM_REQU
* [oneTBB Developer Guide and Reference](https://oneapi-src.github.io/oneTBB)
* [Migrating from TBB to oneTBB](https://oneapi-src.github.io/oneTBB/main/tbb_userguide/Migration_Guide.html)
* [README for the CMake build system](cmake/README.md)
* [oneTBB Testing Approach](https://oneapi-src.github.io/oneTBB/main/intro/testing_approach.html)
* [Basic support for the Bazel build system](Bazel.md)
* [oneTBB Discussions](https://github.com/oneapi-src/oneTBB/discussions)

Expand Down
1 change: 1 addition & 0 deletions doc/index/toctree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/main/intro/notation
/main/intro/intro_os
/main/intro/Benefits
/main/intro/testing_approach


.. toctree::
Expand Down
31 changes: 31 additions & 0 deletions doc/main/intro/testing_approach.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. _testing_approach:

Testing Approach
================

You can face four main hazard types in the libraries for parallelism:

* Interface correspondence to specification
* Memory errors
* Data race
* Race conditions and deadlocks

|short_name| testing approach is designed to provide high coverage of these error types.
All types of errors are covered with unit testing and review.

Code coverage metrics are tracked to ensure high code coverage with tests. Uncovered branches are analyzed manually.
Memory errors and data races are additionally covered by special tools that include thread and memory sanitizers.

Race conditions and deadlocks are the most complicated errors.
They are covered by:

* **Unit tests** that, however, have limited capability to catch such errors
* **Integration tests**. Multiple different functionalities are heavily combined to emulate user use cases that may trigger such errors based on prior knowledge and expertise.
* **Stress testing with different possible combinations**. It ensures that even rarely triggered error conditions are caught by testing.

.. note:: Every fix is required to be covered by a test to guarantee the detection of such issues in the future.

Continuous Integration triggers all the tests on each commit. This ensures that:

* Issues are detected, starting from the early development phase and up to the moment of integration of changes into the library.
* The highest quality of the library even in such error-prone domains as parallelism.

0 comments on commit 104fb5c

Please sign in to comment.