summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcompiler-rt/lib/asan/tests/test_output.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler-rt/lib/asan/tests/test_output.sh b/compiler-rt/lib/asan/tests/test_output.sh
index dff48d2c286..594394dd2be 100755
--- a/compiler-rt/lib/asan/tests/test_output.sh
+++ b/compiler-rt/lib/asan/tests/test_output.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+set -e # fail on any error
+
OS=`uname`
CXX=$1
CC=$2
@@ -7,9 +9,14 @@ CXXFLAGS="-mno-omit-leaf-frame-pointer"
SYMBOLIZER=../scripts/asan_symbolize.py
C_TEST=use-after-free
-$CC -g -faddress-sanitizer -O2 $C_TEST.c || exit 1
echo "Sanity checking a test in pure C"
-./a.out 2>&1 | grep "heap-use-after-free" > /dev/null || exit 1
+$CC -g -faddress-sanitizer -O2 $C_TEST.c
+./a.out 2>&1 | grep "heap-use-after-free" > /dev/null
+rm ./a.out
+
+echo "Sanity checking a test in pure C with -pie"
+$CC -g -faddress-sanitizer -O2 $C_TEST.c -pie
+./a.out 2>&1 | grep "heap-use-after-free" > /dev/null
rm ./a.out
for t in *.tmpl; do
@@ -29,7 +36,7 @@ for t in *.tmpl; do
else
actual_t="$t"
fi
- ./$exe 2>&1 | $SYMBOLIZER 2> /dev/null | c++filt | ./match_output.py $actual_t || exit 1
+ ./$exe 2>&1 | $SYMBOLIZER 2> /dev/null | c++filt | ./match_output.py $actual_t
echo $exe
rm ./$exe
[ -e "$so" ] && rm ./$so
OpenPOWER on IntegriCloud