Add DRD suppression patterns for races triggered by std::ostream
[valgrind.git] / drd / tests / run_openmp_test
blobf507676156b251efdeb6e12309c1bbd6c17cdab8
1 #!/bin/sh
3 # Shell script with one argument (path of an OpenMP executable) that exits
4 # with status 0 if the OpenMP test program should be run and that exits with
5 # status 1 if the OpenMP test program should not be run.
7 test -e "$1" || exit $?
9 ./supported_libpthread || exit $?
11 # Do not accept any statically linked executable.
12 if /usr/bin/file "$1" | grep -q 'statically linked'; then
13 exit 1
16 if [ "$(uname)" = Linux ]; then
18 # Let the dynamic linker/loader print the path of libgomp. See also man ld.so
19 libgomp_path="$(LD_TRACE_LOADED_OBJECTS=1 "$1" \
20 | while read soname arrow path offset; \
21 do if [ "${soname#libgomp.so}" != "${soname}" ]; then echo $path; fi; done)"
23 # Inspect the output of nm. If nm does not find any symbol information,
24 # echo 1. If the symbol gomp_barrier_init is found, echo 0. Otherwise echo
25 # nothing. The second case occurs if gcc has been compiled with
26 # --disable-linux-futex, and the last case occurs if gcc has been compiled
27 # with --enable-linux-futex.
28 rc="$(nm "${libgomp_path}" 2>&1 \
30 while read line
32 if [ "${line%: no symbols}" != "${line}" ]; then
33 echo 1
34 break
35 elif [ "${line% gomp_barrier_init}" != "${line}" ]; then
36 echo 0
37 break
39 done)"
40 exit ${rc:-1}