qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [qpid-dispatch] kgiusti commented on a change in pull request #595: DISPATCH-1450: enable thread sanitizer (TSAN) run time checking
Date Mon, 21 Oct 2019 14:03:03 GMT
kgiusti commented on a change in pull request #595: DISPATCH-1450: enable thread sanitizer
(TSAN) run time checking
URL: https://github.com/apache/qpid-dispatch/pull/595#discussion_r337035408
 
 

 ##########
 File path: README
 ##########
 @@ -100,10 +100,62 @@ This does the following:
 - Run system tests on the installation in 'install'.
 
 
-Using Valgrind
-==============
+Run Time Validation
+===================
 
-If valgrind is installed and cmake option 'USE_VALGRIND' is 'ON' the tests will
-be run with valgrind's memcheck debugger. You can set other types of test runner
-or modify the valgrind flags by setting the TEST_RUNNER cmake variable.
+The CTest test suite can be configured to enable extra run time
+validation checks against the dispatch router.
 
+Since run time validation slows down qdrouter considerably it is
+disabled by default.  It can be enabled by setting the RUNTIME_CHECK
+build flag via the cmake command.
+
+Note well: Depending on your environment the ctest suite may time out
+if validation is enabled due to the additional run time overhead it
+adds.  You can extend the default test time via the ctest "--timeout"
+option.  Example:
+
+ctest --timeout 1500 -VV
+
+The Qpid Dispatch Router test suite supports the following run time
+validation tools:
+
+Valgrind Memcheck
+-----------------
+Runs qdrouterd under Valgrind's memcheck leak checker during the CTest
+suite.  This will cause tests to fail if a memory error is
+encountered.  Use the grinder tool (in the bin directory) to create a
+summary of the errors found during the test run.
+
+The valgrind toolset must be installed in order to use memcheck.
+
+To enable memcheck set the RUNTIME_CHECK build flag to "memcheck":
+
+cmake .. -DRUNTIME_CHECK=memcheck
+
+If valgrind detects errors the qdrouterd process will exit with an
+exit code of 42. This will be displayed in the CTest output. For
+example:
+
+RuntimeError: Errors during teardown:
+Process XXXX error: exit code 42, expected 0
+
+GCC/Clang Thread Sanitizer (TSAN)
+---------------------------------
+This option turns on extra run time threading verification.
+
+Applicable only to GCC versions >= 4.8 and Clang versions >= 4.1.
+
+To enable the thread sanitizer set the RUNTIME_CHECK build flag to "tsan":
+
+cmake .. -DRUNTIME_CHECK=tsan
 
 Review comment:
   Right now the level of optimization (-Ox) is determined by the build type.  So, by default
(RelWithDebInfo) this will supply -O2.
   
   the only target that does not enable optimization is Debug, which is by design.  Running
tsan on a Debug build is not a priority - we should be running tsan on optimized targets only.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message