Skip to content

Commit 70d558b

Browse files
0xmohitianlancetaylor
authored andcommitted
misc/cgo/testsanitizers: check linux major/minor versions
Fix a typo in de5b386; 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/17323 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 65b31e1 commit 70d558b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

misc/cgo/testsanitizers/test.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ if $CC --version | grep clang >& /dev/null; then
3333
echo "skipping msan test; clang version $major.$minor (older than 3.6)"
3434
exit 0
3535
fi
36-
36+
3737
# Clang before 3.8 does not work with Linux at or after 4.1.
3838
# golang.org/issue/12898.
3939
if test "$major" -lt 3 || test "$major" -eq 3 -a "$minor" -lt 8; then
4040
if test "$(uname)" = Linux; then
4141
linuxver=$(uname -r)
42-
linuxmajor=$(echo $ver | sed -e 's/\([0-9]*\).*/\1/')
43-
linuxminor=$(echo $ver | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/')
42+
linuxmajor=$(echo $linuxver | sed -e 's/\([0-9]*\).*/\1/')
43+
linuxminor=$(echo $linuxver | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/')
4444
if test "$linuxmajor" -gt 4 || test "$linuxmajor" -eq 4 -a "$linuxminor" -ge 1; then
4545
echo "skipping msan test; clang version $major.$minor (older than 3.8) incompatible with linux version $linuxmajor.$linuxminor (4.1 or newer)"
4646
exit 0

0 commit comments

Comments
 (0)