From: Russ Cox Date: Wed, 2 Nov 2016 20:33:33 +0000 (-0400) Subject: misc/cgo/testsanitizers: skip tests when vm.overcommit_memory=2 X-Git-Tag: go1.8beta1~346 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ced137fad48ad18518cdd4ed3a77e75d5e58c78c;p=gostls13.git misc/cgo/testsanitizers: skip tests when vm.overcommit_memory=2 Fixes #17689. Change-Id: I45a14e6bf4b2647431105f3e0b63b7076b6655d2 Reviewed-on: https://go-review.googlesource.com/32635 Run-TryBot: Russ Cox Reviewed-by: Brad Fitzpatrick Reviewed-by: Ian Lance Taylor --- diff --git a/misc/cgo/testsanitizers/test.bash b/misc/cgo/testsanitizers/test.bash index d1d2dc6ae2..abbfb27d4b 100755 --- a/misc/cgo/testsanitizers/test.bash +++ b/misc/cgo/testsanitizers/test.bash @@ -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}