summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-04-15 16:58:25 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-04-15 17:01:12 +0200
commit4bf87f329493cdbb8acef403be2a26a325da97cc (patch)
tree6ce2d56b3ae95442f9405e7c5385f8dfe3be4fa1 /doc
parent3488c7fe316c9cae6c6f2891e5df4ee151401a52 (diff)
downloadcmocka-4bf87f329493cdbb8acef403be2a26a325da97cc.tar.gz
cmocka-4bf87f329493cdbb8acef403be2a26a325da97cc.tar.bz2
cmocka-4bf87f329493cdbb8acef403be2a26a325da97cc.zip
cmocka: Add CMOCKA_TEST_ABORT env variable to leave threading apps.
BUG: https://open.cryptomilk.org/issues/26 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/mainpage.dox14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 4b7acb0..d159bf0 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -82,4 +82,18 @@ the mock object to return. CMocka provides and API to easily mock code.
<a href="https://lwn.net/Articles/558106/">Learn more ...</a>
+@section main-threads Threading
+
+cmocka is not thread safe and it is not the goal of it to be it. However if
+you use cmocka for writing tests in an application which uses threads, you
+can set the following envionment variable:
+
+<pre>
+ CMOCKA_TEST_ABORT='1' ./my_threading_test
+</pre>
+
+With this environment variable set to '1', cmocka will call <tt>abort()</tt> if
+a test fails. Else it is likely that you will run into deadlocks with mutexes
+or other funny errors.
+
*/