]> git.lttng.org Git - lttng-tools.git/commitdiff
Tests: python logging: log enable-event command
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 14 Nov 2024 20:54:46 +0000 (15:54 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 22 Nov 2024 20:32:54 +0000 (20:32 +0000)
Log the enable-event commands by using the _run_lttng_cmd util
to improve the debuggability of failed test cases.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: If250e014a7a22438ea3320fb90bf194dd7646a3d

tests/regression/ust/python-logging/test_python_logging.in

index 28e5f524b5d9b6d8c24abdef9a3125dc3d7ae400..dc7cfaba65d41785e5fd1cd60b5a031626c3c8c8 100755 (executable)
@@ -70,14 +70,15 @@ function enable_python_loglevel_only()
        loglevel=$3
        channel_name=$4
 
-       if [ -z $channel_name ]; then
+       if [ -z "$channel_name" ]; then
                # default channel if none specified
                chan=""
        else
-               chan="-c $channel_name"
+               chan="--channel $channel_name"
        fi
 
-       $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event --loglevel-only $loglevel "$event_name" $chan -s $sess_name -p >$OUTPUT_DEST
+       _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)"  enable-event \
+               --loglevel-only "$loglevel" "$event_name" $chan --session "$sess_name" --python
        ok $? "Enable Python event $event_name for session $sess_name with loglevel-only $loglevel"
 }
 
@@ -87,7 +88,8 @@ function enable_python_filter()
        local event_name="$2"
        local filter="$3"
 
-       $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$event_name" -s $sess_name -p --filter "$filter" >$OUTPUT_DEST
+       _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" enable-event \
+               "$event_name" --session "$sess_name" --python --filter "$filter"
        ok $? "Enable event $event_name with filter $filter for session $sess_name"
 }
 
@@ -98,7 +100,9 @@ function enable_python_filter_loglevel_only()
        local filter="$3"
        local loglevel="$4"
 
-       $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event --loglevel-only $loglevel "$event_name" -s $sess_name -p --filter "$filter" >$OUTPUT_DEST
+       _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" enable-event \
+               --loglevel-only "$loglevel" "$event_name" --session "$sess_name" \
+               --python --filter "$filter"
        ok $? "Enable event $event_name with filter \"$filter\" and loglevel-only $loglevel for session $sess_name"
 }
 
This page took 0.031274 seconds and 4 git commands to generate.