]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testsanitizers: skip tests when vm.overcommit_memory=2
authorRuss Cox <rsc@golang.org>
Wed, 2 Nov 2016 20:33:33 +0000 (16:33 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 3 Nov 2016 16:04:33 +0000 (16:04 +0000)
Fixes #17689.

Change-Id: I45a14e6bf4b2647431105f3e0b63b7076b6655d2
Reviewed-on: https://go-review.googlesource.com/32635
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testsanitizers/test.bash

index d1d2dc6ae24ea068162b863ef212520d3c10ab32..abbfb27d4b771c680389c1160b999ef1aefb298a 100755 (executable)
@@ -15,6 +15,11 @@ if test -x "$(type -p clang)"; then
 fi
 export CC
 
+if [ "$(sysctl -n vm.overcommit_memory)" = 2 ]; then
+  echo "skipping msan/tsan tests: vm.overcommit_memory=2" >&2
+  exit 0
+fi
+
 msan=yes
 
 TMPDIR=${TMPDIR:-/tmp}