tests: force the trace format to ctf1
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 18 Aug 2022 14:09:25 +0000 (10:09 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 19 Aug 2022 16:11:10 +0000 (12:11 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I9d1d11dc531379612c37c88234c972115a676cce

tests/regression/tools/live/test_kernel
tests/regression/tools/live/test_lttng_kernel
tests/utils/test_utils.py
tests/utils/utils.sh

index b622b52143d3bc4a740fb9e7a1ade7739dc60f19..b01dfda141784ad07be11b6d03c4de5e3ad84cbc 100755 (executable)
@@ -25,7 +25,7 @@ source $TESTDIR/utils/utils.sh
 function setup_live_tracing()
 {
        # Create session with default path
-       $TESTDIR/../src/bin/lttng/$LTTNG_BIN create $SESSION_NAME --live $DELAY_USEC \
+       $TESTDIR/../src/bin/lttng/$LTTNG_BIN create --trace-format=ctf1 $SESSION_NAME --live $DELAY_USEC \
                -U net://localhost >/dev/null 2>&1
 
        $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$EVENT_NAME" -s $SESSION_NAME -k >/dev/null 2>&1
index a23d9373a842fbb41eb55d0a8c2a3828140a804f..e0e823d6652e0bf0ce9aa43a720360c49ab80fa4 100755 (executable)
@@ -30,7 +30,7 @@ print_test_banner "$TEST_DESC"
 function setup_live_tracing()
 {
        # Create session with default path
-       $TESTDIR/../src/bin/lttng/$LTTNG_BIN create $SESSION_NAME --live $DELAY_USEC \
+       $TESTDIR/../src/bin/lttng/$LTTNG_BIN create --trace-format=ctf1 $SESSION_NAME --live $DELAY_USEC \
                -U net://localhost >/dev/null 2>&1
        ok $? "Create session in live mode with delay $DELAY_USEC"
 
index ba9c2946e7654cea703f74cd43b23a872ec662b9..39ff21bfd3bd0398c7bb7b9bfdd6a3c31ed45574 100644 (file)
@@ -72,9 +72,14 @@ def create_session():
     session_name = str(uuid.uuid1())
     tmp_directory = tempfile.mkdtemp()
     trace_path = tmp_directory + "/" + session_name
+    trace_format_desc = lttng_trace_format_ctf_1_descriptor_create()
 
-    res = create(session_name, trace_path)
-    if res < 0:
+    session_descriptor = lttng_session_descriptor_local_create(session_name, trace_path)
+
+    lttng_session_descriptor_set_trace_format_descriptor(session_descriptor, trace_format_desc)
+
+    res = lttng_create_session_ext(session_descriptor)
+    if res != 10:
         bail("Failed to create recording session.")
 
     channel = Channel()
index 18b673b11452491bc3946abda5aa0225d53be587..a4698c4afabce57da889f986a6c7b7512c8c3c7a 100644 (file)
@@ -1054,9 +1054,10 @@ function create_lttng_session_no_output ()
 {
        local sess_name=$1
        local opts="${@:2}"
+       local trace_format=("--trace-format" "ctf1")
 
        _run_lttng_cmd "$OUTPUT_DEST" "$ERROR_OUTPUT_DEST" \
-               create $sess_name --no-output $opts
+               create "${trace_format[@]}" $sess_name --no-output $opts
        ok $? "Create session $sess_name in no-output mode"
 }
 
@@ -1064,9 +1065,10 @@ function create_lttng_session_uri () {
        local sess_name=$1
        local uri=$2
        local opts="${@:3}"
+       local trace_format=("--trace-format" "ctf1")
 
        _run_lttng_cmd "$OUTPUT_DEST" "$ERROR_OUTPUT_DEST" \
-               create $sess_name -U $uri $opts
+               create "${trace_format[@]}" $sess_name -U $uri $opts
        ok $? "Create session $sess_name with uri:$uri and opts: $opts"
 }
 
@@ -1077,6 +1079,7 @@ function create_lttng_session ()
        local sess_name=$3
        local trace_path=$4
        local opt=$5
+       local trace_format=("--trace-format" "ctf1")
 
        if [ -z "$trace_path" ]; then
                # Use lttng-sessiond default output.
@@ -1086,7 +1089,7 @@ function create_lttng_session ()
        fi
 
        _run_lttng_cmd "$OUTPUT_DEST" "$ERROR_OUTPUT_DEST" \
-               create "$sess_name" $trace_path $opt
+               create "${trace_format[@]}" "$sess_name" $trace_path $opt
        ret=$?
        if [ $expected_to_fail -eq "1" ]; then
                test "$ret" -ne "0"
This page took 0.0288 seconds and 5 git commands to generate.