* [ltt-dev] [UST PATCH] Change the valgrind test to use the libraries from the build directory
@ 2011-02-22 23:25 Yannick Brosseau
2011-02-23 8:58 ` Nils Carlson
0 siblings, 1 reply; 2+ messages in thread
From: Yannick Brosseau @ 2011-02-22 23:25 UTC (permalink / raw)
Also add the $USER name to all temp files so multiple users don't conflict.
Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
---
tests/valgrind_ust-consumerd.sh | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/tests/valgrind_ust-consumerd.sh b/tests/valgrind_ust-consumerd.sh
index 1b10772..5b348d7 100755
--- a/tests/valgrind_ust-consumerd.sh
+++ b/tests/valgrind_ust-consumerd.sh
@@ -17,11 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with LTTng-UST. If not, see <http://www.gnu.org/licenses/>.
-if ! which valgrind > /dev/null; then
- echo "$0: Valgrind not found on the system." >/dev/stderr
- exit 1;
-fi
-
TESTDIR=$(dirname $0)
source $TESTDIR/test_functions.sh
@@ -29,21 +24,30 @@ source $TESTDIR/tap.sh
starttest "ust-consumerd valgrind check"
+if ! which valgrind > /dev/null; then
+ echo "$0: Valgrind not found on the system." >/dev/stderr
+ exit 1;
+fi
+
plan_tests 2
-TRACE_DIR="/tmp/ust-testsuite-ust-consumerdvalgrind-trace"
+TRACE_DIR="/tmp/ust-testsuite-$USER-ust-consumerdvalgrind-trace"
rm -rf "$TRACE_DIR"
mkdir "$TRACE_DIR"
pidfilepath="/tmp/ust-testsuite-$USER-$(date +%Y%m%d%H%M%S%N)-ust-consumerd-pid"
mkfifo -m 0600 "$pidfilepath"
-VALG_OUT=/tmp/ust-testsuite-valg.txt
-valgrind --suppressions=$TESTDIR/valgrind_suppress.txt -q ust-consumerd --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>"$VALG_OUT" &
+UST_CONSUMERD="$TESTDIR/../ust-consumerd/.libs/ust-consumerd"
+USTTRACE="$TESTDIR/../usttrace"
+
+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=$!
UST_CONSUMERD_PID="$(<$pidfilepath)"
-okx usttrace -s $TESTDIR/basic/.libs/basic
+okx $USTTRACE -L -s $TESTDIR/basic/.libs/basic
kill -SIGTERM ${UST_CONSUMERD_PID}
wait $!
@@ -54,6 +58,6 @@ if [ -z "$(<$VALG_OUT)" ]; then
else
fail "Valgrind found errors in ust-consumerd:"
cat $VALG_OUT | while read; do
- diag $REPLY
+ diag "$REPLY"
done
fi
--
1.7.2.3
^ permalink raw reply [flat|nested] 2+ messages in thread* [ltt-dev] [UST PATCH] Change the valgrind test to use the libraries from the build directory
2011-02-22 23:25 [ltt-dev] [UST PATCH] Change the valgrind test to use the libraries from the build directory Yannick Brosseau
@ 2011-02-23 8:58 ` Nils Carlson
0 siblings, 0 replies; 2+ messages in thread
From: Nils Carlson @ 2011-02-23 8:58 UTC (permalink / raw)
On Wed, 23 Feb 2011, Yannick Brosseau wrote:
> Also add the $USER name to all temp files so multiple users don't conflict.
>
> Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
Acked-by: Nils Carlson <nils.carlson at ericsson.com>
> ---
> tests/valgrind_ust-consumerd.sh | 24 ++++++++++++++----------
> 1 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/tests/valgrind_ust-consumerd.sh b/tests/valgrind_ust-consumerd.sh
> index 1b10772..5b348d7 100755
> --- a/tests/valgrind_ust-consumerd.sh
> +++ b/tests/valgrind_ust-consumerd.sh
> @@ -17,11 +17,6 @@
> # You should have received a copy of the GNU General Public License
> # along with LTTng-UST. If not, see <http://www.gnu.org/licenses/>.
>
> -if ! which valgrind > /dev/null; then
> - echo "$0: Valgrind not found on the system." >/dev/stderr
> - exit 1;
> -fi
> -
> TESTDIR=$(dirname $0)
>
> source $TESTDIR/test_functions.sh
> @@ -29,21 +24,30 @@ source $TESTDIR/tap.sh
>
> starttest "ust-consumerd valgrind check"
>
> +if ! which valgrind > /dev/null; then
> + echo "$0: Valgrind not found on the system." >/dev/stderr
> + exit 1;
> +fi
> +
> plan_tests 2
>
> -TRACE_DIR="/tmp/ust-testsuite-ust-consumerdvalgrind-trace"
> +TRACE_DIR="/tmp/ust-testsuite-$USER-ust-consumerdvalgrind-trace"
> rm -rf "$TRACE_DIR"
> mkdir "$TRACE_DIR"
>
> pidfilepath="/tmp/ust-testsuite-$USER-$(date +%Y%m%d%H%M%S%N)-ust-consumerd-pid"
> mkfifo -m 0600 "$pidfilepath"
>
> -VALG_OUT=/tmp/ust-testsuite-valg.txt
> -valgrind --suppressions=$TESTDIR/valgrind_suppress.txt -q ust-consumerd --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>"$VALG_OUT" &
> +UST_CONSUMERD="$TESTDIR/../ust-consumerd/.libs/ust-consumerd"
> +USTTRACE="$TESTDIR/../usttrace"
> +
> +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=$!
> UST_CONSUMERD_PID="$(<$pidfilepath)"
>
> -okx usttrace -s $TESTDIR/basic/.libs/basic
> +okx $USTTRACE -L -s $TESTDIR/basic/.libs/basic
>
> kill -SIGTERM ${UST_CONSUMERD_PID}
> wait $!
> @@ -54,6 +58,6 @@ if [ -z "$(<$VALG_OUT)" ]; then
> else
> fail "Valgrind found errors in ust-consumerd:"
> cat $VALG_OUT | while read; do
> - diag $REPLY
> + diag "$REPLY"
> done
> fi
> --
> 1.7.2.3
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-23 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-22 23:25 [ltt-dev] [UST PATCH] Change the valgrind test to use the libraries from the build directory Yannick Brosseau
2011-02-23 8:58 ` Nils Carlson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox