VERSION SPOOFING: tests: spoof the version for the live unit test.
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 26 May 2022 14:11:54 +0000 (10:11 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 19 Aug 2022 16:11:33 +0000 (12:11 -0400)
Otherwise since that the default trace format is now CTF2 the attach
session fail and lead to an abort since the code expect success only in
continuation.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I2ccb302300117f5dc900c0072f1a48ba490b1110

tests/regression/tools/live/live_test.cpp

index 559b9a7b1e8298885ae574090a26683e6058eb82..f6554231c3eb28db86d619fbe16a8fa4bf9a4fa8 100644 (file)
@@ -158,7 +158,8 @@ int establish_connection(void)
 
        memset(&connect, 0, sizeof(connect));
        connect.major = htobe32(VERSION_MAJOR);
-       connect.minor = htobe32(VERSION_MINOR);
+       /* JORAJ: TODO: remove when minor version is updated */
+       connect.minor = htobe32(15);
        connect.type = htobe32(LTTNG_VIEWER_CLIENT_COMMAND);
 
        ret_len = lttng_live_send(control_sock, &cmd, sizeof(cmd));
@@ -688,9 +689,9 @@ int main(void)
        ret = connect_viewer("localhost");
        ok(ret == 0, "Connect viewer to relayd");
 
+       /* JORAJ: TODO: Remove when minor version is updated */
        ret = establish_connection();
-       ok(ret == 0, "Established connection and version check with %d.%d",
-                       VERSION_MAJOR, VERSION_MINOR);
+       ok(ret == 0, "Established connection and version check with %d.%d", VERSION_MAJOR, 15);
 
        ret = list_sessions(&session_id);
        ok(ret > 0, "List sessions : %d session(s)", ret);
This page took 0.026274 seconds and 5 git commands to generate.