From: Pierre-Marc Fournier Date: Wed, 17 Mar 2010 03:30:53 +0000 (-0400) Subject: runtests: add a ustd/valgrind check X-Git-Tag: v0.4~9 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6c42ce2c7f9c9f2c91170e87029c9c2702a76c6e;p=ust.git runtests: add a ustd/valgrind check --- diff --git a/tests/runtests b/tests/runtests index 5fb836a..3cb9da6 100755 --- a/tests/runtests +++ b/tests/runtests @@ -87,6 +87,28 @@ wait $USTD_PID NOFAIL $MATCHES -N "manual - find - ust.malloc" "^ust.malloc:" "$TRACE_DIR" +### Valgrind ustd ### +starttest "ustd valgrind check" +TRACE_DIR="/tmp/ust-testsuite-ustdvalgrind-trace" +rm -rf "$TRACE_DIR" +mkdir "$TRACE_DIR" + +pidfilepath="/tmp/ust-testsuite-$USER-$(date +%Y%m%d%H%M%S%N)-ustd-pid" +mkfifo -m 0600 "$pidfilepath" +# It's not useful to run ustd in NOFAIL because it's running in the background +VALG_OUT=/tmp/ust-testsuite-valg.txt +valgrind -q ustd --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>"$VALG_OUT" & +VALG_PID=$! +USTD_PID="$(<$pidfilepath)" + +usttrace -s $TESTDIR/basic/.libs/basic + +kill -SIGTERM $USTD_PID +wait $! + +echo "Valgrind output is in $VALG_OUT" +NOFAIL [ -z "$(<$VALG_OUT)" ] + echo "************************************" echo "$0: All passed" echo "************************************"