From 1d302e3d872acf649b968c870b1f3ff8b839af75 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 15 Dec 2020 14:03:15 -0500 Subject: [PATCH] Tests: utils.sh: pass arbitrary arguments to start_lttng_sessiond* MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Allows for easier arguments passing to lttng-sessiond. This is useful both for debugging manually and passing specific flag as needed in testing. Passing "--event-notifier-error-number-of-bucket=X" or "-vvv" for examples. Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau Change-Id: I36bd6eaf1c4fc84c3a1e8cfe70a37a46e7130c75 --- tests/utils/utils.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 7e8100f00..15d7e8b56 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -565,6 +565,9 @@ function start_lttng_sessiond_opt() local withtap=$1 local load_path=$2 + # The rest of the arguments will be passed directly to lttng-sessiond. + shift 2 + local env_vars="" local consumerd="" @@ -609,10 +612,10 @@ function start_lttng_sessiond_opt() # Have a load path ? if [ -n "$load_path" ]; then # shellcheck disable=SC2086 - env $env_vars --load "$load_path" --background "$consumerd" + env $env_vars --load "$load_path" --background "$consumerd" "$@" else # shellcheck disable=SC2086 - env $env_vars --background "$consumerd" + env $env_vars --background "$consumerd" "$@" fi #$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" --verbose-consumer >>/tmp/sessiond.log 2>&1 status=$? -- 2.34.1