Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-12-08 15:12:47 +0300
committerPetr Štetiar <ynezz@true.cz>2019-12-25 12:31:58 +0300
commitbf680707acfdadcd6301657448dcf3bd8c8fa60c (patch)
tree1deb2ca4557f56f2e89f87d5987b47dc2b1b489b /tests/cram/test_runqueue.t
parentf804578847de49112d414841df928921e62cc216 (diff)
tests: add unit tests covered with Clang sanitizers
Currently we run all tests via Valgrind. This patch adds 2nd batch of tests which are compiled with Clang AddressSanitizer[1], LeakSanitizer[2] and UndefinedBehaviorSanitizer[3] in order to catch more issues during QA on CI. AddressSanitizer is a fast memory error detector. The tool can detect the following types of bugs: * Out-of-bounds accesses to heap, stack and globals * Use-after-free, use-after-return, use-after-scope * Double-free, invalid free LeakSanitizer is a run-time memory leak detector. It can be combined with AddressSanitizer to get both memory error and leak detection, or used in a stand-alone mode. UndefinedBehaviorSanitizer (UBSan) is a fast undefined behavior detector. UBSan modifies the program at compile-time to catch various kinds of undefined behavior during program execution, for example: * Using misaligned or null pointer * Signed integer overflow * Conversion to, from, or between floating-point types which would overflow the destination 1. http://clang.llvm.org/docs/AddressSanitizer.html 2. http://http://clang.llvm.org/docs/LeakSanitizer.html 3. http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'tests/cram/test_runqueue.t')
-rw-r--r--tests/cram/test_runqueue.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/cram/test_runqueue.t b/tests/cram/test_runqueue.t
index 4d49110..227f414 100644
--- a/tests/cram/test_runqueue.t
+++ b/tests/cram/test_runqueue.t
@@ -12,3 +12,15 @@ check that runqueue is producing expected results:
[1/1] cancel 'sleep 1'
[0/1] finish 'sleep 1'
All done!
+
+ $ test-runqueue-san
+ [1/1] start 'sleep 1'
+ [1/1] cancel 'sleep 1'
+ [0/1] finish 'sleep 1'
+ [1/1] start 'sleep 1'
+ [1/1] cancel 'sleep 1'
+ [0/1] finish 'sleep 1'
+ [1/1] start 'sleep 1'
+ [1/1] cancel 'sleep 1'
+ [0/1] finish 'sleep 1'
+ All done!