In previous version of the test-case the test-case would hang forever
if valgrind crashes (which it does on my debian squeeze PPC).
Fix this by checking that valgrind is alive.
Also cleanup leftover fifos in /tmp
Signed-off-by: Nils Carlson <nils.carlson@ericsson.com>
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TESTDIR/../libustconsumer/.libs/"
valgrind --suppressions=$TESTDIR/valgrind_suppress.txt -q $UST_CONSUMERD --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>"$VALG_OUT" &
VALG_PID=$!
+
+# Paranoid check that valgrind is alive or we will hang forever on the fifo
+if ! ps $VALG_PID > /dev/null; then
+ echo "Valgrind appears to have died, giving up"
+ rm $pidfilepath
+ exit
+fi
+
UST_CONSUMERD_PID="$(<$pidfilepath)"
okx $USTTRACE -L -s $TESTDIR/basic/.libs/basic
diag "$REPLY"
done
fi
+
+rm $pidfilepath