5 GDB=$PWD/gdb.`uname -i`
8 TEST=tst-core.`uname -i`
10 LIB=libobjid.so.`uname -i`
22 check test ! -e $STORAGE
27 cp -p $LIB ./libobjid.so
28 cp -p $LIB.debug ./libobjid.so.debug
35 check ulimit -c unlimited
36 [ -f Makefile ] && check make libobjid.so $TEST
40 # Move to an empty directory to better test by losing any absolute references.
45 STORAGE2=$STORAGE/`hostname -s`
47 libs="$(ldd $DIR/$TEST $DIR/libobjid.so | sed -n 's/^\t\(.* => \)\?\([^ ]*\).*$/\2/p' | sort -u)"
48 for obj in $DIR/$TEST $DIR/libobjid.so $libs
53 ln -s $link $STORAGE2/`basename $obj`
54 obj=`dirname $obj`/$link
56 check cp -p $obj $STORAGE2/`basename $obj`
57 # It may not be present.
58 cp -p /usr/lib/debug/$obj.debug $STORAGE2/`basename $obj`.debug
61 # Provide relative pathname to lose the reference to the original.
62 check ln -s $DIR/libobjid.so
63 check ln -s $DIR/$TEST
64 LD_PRELOAD=./libobjid.so ./$TEST &
72 strace -s200 -o x -q $GDB --objectdirectory=$STORAGE2 --core=$CORE