From 8d51ddbc52f9f5796f61fb661d47095c1ff1503f Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Julien Date: Mon, 28 Jul 2014 10:56:05 -0400 Subject: [PATCH] Mi test: make sure to not auto load session when using lttng-sessiond Signed-off-by: Jonathan Rajotte Julien --- tests/regression/tools/mi/test_mi | 3 ++- tests/utils/utils.sh | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/regression/tools/mi/test_mi b/tests/regression/tools/mi/test_mi index b70450e33..fa46b514e 100755 --- a/tests/regression/tools/mi/test_mi +++ b/tests/regression/tools/mi/test_mi @@ -32,6 +32,7 @@ NR_USEC_WAIT=10000 #Temp file output OUTPUT_DIR=$(mktemp -d) +FOO_LOAD_DIR=$(mktemp -d) OUTPUT_FILE="default.xml" #Path to custom xml utilities @@ -683,7 +684,7 @@ function test_snapshot () { destroy_lttng_sessions } -start_lttng_sessiond +start_lttng_sessiond $FOO_LOAD_DIR TESTS=( test_version test_create_session diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 3f287d21f..4b081a48b 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -153,8 +153,11 @@ function stop_lttng_relayd fi } +#First argument: load path for automatic loading function start_lttng_sessiond() { + + local load_path="$1" if [ -n $TEST_NO_SESSIOND ] && [ "$TEST_NO_SESSIOND" == "1" ]; then # Env variable requested no session daemon return @@ -171,7 +174,12 @@ function start_lttng_sessiond() export LTTNG_SESSION_CONFIG_XSD_PATH if [ -z $(pidof lt-$SESSIOND_BIN) ]; then - $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" + # Have a load path ? + if [ -n "$1" ]; then + $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --load "$1" --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" + else + $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" + fi #$DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --verbose-consumer >>/tmp/sessiond.log 2>&1 & status=$? ok $status "Start session daemon" -- 2.34.1