From: Jonathan Rajotte Date: Tue, 15 Dec 2020 19:03:15 +0000 (-0500) Subject: Tests: utils.sh: pass arbitrary arguments to start_lttng_sessiond* X-Git-Tag: v2.13.0-rc1~195 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1d302e3d872acf649b968c870b1f3ff8b839af75;p=lttng-tools.git Tests: utils.sh: pass arbitrary arguments to start_lttng_sessiond* 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 --- 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=$?