Commit 70d558be authored by Mohit Agarwal's avatar Mohit Agarwal Committed by Ian Lance Taylor

misc/cgo/testsanitizers: check linux major/minor versions

Fix a typo in de5b3861; using `$ver` to determine linux major/minor
versions would produce those for clang, use `$linuxver` instead.

Updates #12898.

Change-Id: I2c8e84ad02749fceaa958afd65e558bb0b08dddb
Reviewed-on: https://go-review.googlesource.com/17323Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 65b31e14
...@@ -33,14 +33,14 @@ if $CC --version | grep clang >& /dev/null; then ...@@ -33,14 +33,14 @@ if $CC --version | grep clang >& /dev/null; then
echo "skipping msan test; clang version $major.$minor (older than 3.6)" echo "skipping msan test; clang version $major.$minor (older than 3.6)"
exit 0 exit 0
fi fi
# Clang before 3.8 does not work with Linux at or after 4.1. # Clang before 3.8 does not work with Linux at or after 4.1.
# golang.org/issue/12898. # golang.org/issue/12898.
if test "$major" -lt 3 || test "$major" -eq 3 -a "$minor" -lt 8; then if test "$major" -lt 3 || test "$major" -eq 3 -a "$minor" -lt 8; then
if test "$(uname)" = Linux; then if test "$(uname)" = Linux; then
linuxver=$(uname -r) linuxver=$(uname -r)
linuxmajor=$(echo $ver | sed -e 's/\([0-9]*\).*/\1/') linuxmajor=$(echo $linuxver | sed -e 's/\([0-9]*\).*/\1/')
linuxminor=$(echo $ver | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/') linuxminor=$(echo $linuxver | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/')
if test "$linuxmajor" -gt 4 || test "$linuxmajor" -eq 4 -a "$linuxminor" -ge 1; then if test "$linuxmajor" -gt 4 || test "$linuxmajor" -eq 4 -a "$linuxminor" -ge 1; then
echo "skipping msan test; clang version $major.$minor (older than 3.8) incompatible with linux version $linuxmajor.$linuxminor (4.1 or newer)" echo "skipping msan test; clang version $major.$minor (older than 3.8) incompatible with linux version $linuxmajor.$linuxminor (4.1 or newer)"
exit 0 exit 0
......
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