root/trunk/umem_test4

Revision 48, 499 bytes (checked in by wez, 7 years ago)

fix portability issue reported by Mito

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1 #!/bin/sh
2 #
3 # Check that LD_PRELOAD'ing libumem works. This is how it can be used
4 # to replace malloc for any program.
5 #
6
7 FILE=Makefile.am
8 TMPLOC=`mktemp -d /tmp/umem_test4.XXXXXX`
9 trap 'rm -rf $TMPLOC' 1 2 15
10
11 LD_PRELOAD=.libs/libumem.so /usr/bin/ldd /bin/ls >$TMPLOC/log 2>&1
12
13 # Check we got the expected result
14 ret=0
15 grep -E '(symbol lookup error|undefined symbol)' $TMPLOC/log >/dev/null 2>&1
16 if [ "$?" = "0" ]; then
17   # Matched = failed to load up libumem
18   ret=1
19 fi
20
21 rm -rf $TMPLOC
22
23 exit $ret
Note: See TracBrowser for help on using the browser.