projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use boot_id as monotonic clock uuid
[lttng-ust.git]
/
tests
/
valgrind_ust-consumerd.sh
diff --git
a/tests/valgrind_ust-consumerd.sh
b/tests/valgrind_ust-consumerd.sh
index 5b348d7825a5b01a2adc54cbb3d250c585dbdbe4..7dd66681db666dfe689b1f4f72ab842c9a56dd75 100755
(executable)
--- a/
tests/valgrind_ust-consumerd.sh
+++ b/
tests/valgrind_ust-consumerd.sh
@@
-25,7
+25,7
@@
source $TESTDIR/tap.sh
starttest "ust-consumerd valgrind check"
if ! which valgrind > /dev/null; then
starttest "ust-consumerd valgrind check"
if ! which valgrind > /dev/null; then
- echo "$0: Valgrind not found on the system."
>/dev/stderr
+ echo "$0: Valgrind not found on the system."
1>&2
exit 1;
fi
exit 1;
fi
@@
-45,6
+45,14
@@
VALG_OUT=/tmp/ust-testsuite-$USER-valg.txt
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=$!
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
UST_CONSUMERD_PID="$(<$pidfilepath)"
okx $USTTRACE -L -s $TESTDIR/basic/.libs/basic
@@
-61,3
+69,5
@@
else
diag "$REPLY"
done
fi
diag "$REPLY"
done
fi
+
+rm $pidfilepath
This page took
0.025753 seconds
and
4
git commands to generate.