Multi-threaded search testing with valgrind
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Thu, 31 Aug 2017 20:11:09 +0000 (22:11 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 1 Sep 2017 18:19:43 +0000 (20:19 +0200)
Also check with valgrind the multi-threaded search.

On top of the fix for issue #1227 (PR #1235).

No functional change.

.travis.yml
tests/instrumented.sh

index c42badd..02e35bc 100644 (file)
@@ -63,6 +63,7 @@ script:
   #
   - export CXXFLAGS=-O1
   - if [ -x "$(command -v valgrind )" ]; then make clean && make -j2 ARCH=x86-64 debug=yes optimize=no build > /dev/null && ../tests/instrumented.sh --valgrind; fi
+  - if [ -x "$(command -v valgrind )" ]; then ../tests/instrumented.sh --valgrind-thread; fi
   #
   # Sanitizer
   #
index 878d6cb..2cae793 100755 (executable)
@@ -17,15 +17,22 @@ case $1 in
     postfix='1>/dev/null'
     threads="1"
   ;;
+  --valgrind-thread)
+    echo "valgrind-thread testing started"
+    prefix=''
+    exeprefix='valgrind --error-exitcode=42'
+    postfix='1>/dev/null'
+    threads="2"
+  ;;
   --sanitizer-undefined)
-    echo "sanitizer testing started"
+    echo "sanitizer-undefined testing started"
     prefix='!'
     exeprefix=''
     postfix='2>&1 | grep "runtime error:"'
     threads="1"
   ;;
   --sanitizer-thread)
-    echo "sanitizer testing started"
+    echo "sanitizer-thread testing started"
     prefix='!'
     exeprefix=''
     postfix='2>&1 | grep "WARNING: ThreadSanitizer:"'