Commit f4717a90 authored by Ian Lance Taylor's avatar Ian Lance Taylor

misc/cgo/testsanitizers: test that tsan links

Update #14559.

Change-Id: I92603602e5d0a5fcae43f3084f234ff606447190
Reviewed-on: https://go-review.googlesource.com/20056
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 80968819
...@@ -18,7 +18,7 @@ export CC ...@@ -18,7 +18,7 @@ export CC
msan=yes msan=yes
TMPDIR=${TMPDIR:-/tmp} TMPDIR=${TMPDIR:-/tmp}
echo > ${TMPDIR}/testsanitizers$$.c echo 'int main() { return 0; }' > ${TMPDIR}/testsanitizers$$.c
if $CC -fsanitize=memory -c ${TMPDIR}/testsanitizers$$.c -o ${TMPDIR}/testsanitizers$$.o 2>&1 | grep "unrecognized" >& /dev/null; then if $CC -fsanitize=memory -c ${TMPDIR}/testsanitizers$$.c -o ${TMPDIR}/testsanitizers$$.o 2>&1 | grep "unrecognized" >& /dev/null; then
echo "skipping msan tests: -fsanitize=memory not supported" echo "skipping msan tests: -fsanitize=memory not supported"
msan=no msan=no
...@@ -93,7 +93,7 @@ tsan=yes ...@@ -93,7 +93,7 @@ tsan=yes
TMPDIR=${TMPDIR:-/tmp} TMPDIR=${TMPDIR:-/tmp}
echo > ${TMPDIR}/testsanitizers$$.c echo > ${TMPDIR}/testsanitizers$$.c
if $CC -fsanitize=thread -c ${TMPDIR}/testsanitizers$$.c -o ${TMPDIR}/testsanitizers$$.o 2>&1 | grep "unrecognized" >& /dev/null; then if $CC -fsanitize=thread ${TMPDIR}/testsanitizers$$.c -o ${TMPDIR}/testsanitizers$$ 2>&1 | grep "unrecognized" >& /dev/null; then
echo "skipping tsan tests: -fsanitize=thread not supported" echo "skipping tsan tests: -fsanitize=thread not supported"
tsan=no tsan=no
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment