blob: 39d570b976732bf77506dec64f2a05b8be7369ba [file] [log] [blame]
Kostya Serebryanyb82ae882012-05-10 15:10:03 +00001#!/bin/bash
2set -u
3
4RES=$(./analyze_libtsan.sh)
5PrintRes() {
6 printf "%s\n" "$RES"
7}
8
9PrintRes
10
11mops="write1 \
12 write2 \
13 write4 \
14 write8 \
15 read1 \
16 read2 \
17 read4 \
18 read8"
19func="func_entry \
20 func_exit"
21
22check() {
23 res=$(PrintRes | egrep "$1 .* $2 $3; ")
24 if [ "$res" == "" ]; then
25 echo FAILED $1 must contain $2 $3
26 exit 1
27 fi
28}
29
30for f in $mops; do
31 check $f rsp 1 # To read caller pc.
32 check $f push 0
33 check $f pop 0
34done
35
36for f in $func; do
37 check $f rsp 0
38 check $f push 0
39 check $f pop 0
40 check $f call 1 # TraceSwitch()
41done
42
43echo LGTM